PFWAMarketHook
RobinhoodPFWAMarketHook is a Uniswap v4 hook on Robinhood Chain. Runs code on every swap. Can take tokens from swaps. Runs at pool creation.
- Contract name
- PFWAMarketHook
How this hook works
Trading taxA trading tax hook. It takes a cut of every trade, burns tokens and only works with its own launcher.
Takes a cut of every trade
On top of the normal pool fee, it keeps a share of every trade for itself.
The code that does this (beforeSwap):function beforeSwap(address, PoolKey calldata key, SwapParams calldata params, bytes calldata) external onlyPoolManager returns (bytes4, BeforeSwapDelta, uint24) { PoolId id = key.toId(); PoolConfig storage c = pools[id]; if (!c.registered) revert PoolNotRegistered(); if (!c.market.tradingOpen()) revert TradingClosed(); if (params.amountSpecified >= 0) revert ExactOutputNotSupported(); (, int24 tick,,) = poolManager.getSlot0(id); bytes32 slot = PREVIOUS_TICK_SLOT; assembly { tstore(slot, tick) } // Buying the outcome with USDG: USDG is the input, so take the fee from it now. bool usdgIn = params.zeroForOne == c.usdgIsCurrency0; if (!usdgIn) return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); uint256 fee = _takeFee(id, key, c, uint256(-params.amountSpecified)); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(int128(int256(fee)), 0), 0); }Burns tokens
It destroys some tokens (or sends them to an address nobody controls), so there are fewer of them.
The code that does this (burnSet):function burnSet(uint256 amount, address to) external { if (amount == 0) revert ZeroAmount(); if (resolved) revert AlreadyResolved(); uint256 n = _outcomes.length; for (uint256 i; i < n; i++) { _outcomes[i].burn(msg.sender, amount); } collateral.safeTransfer(to, amount); emit SetBurned(msg.sender, to, amount); }Only its own launcher can use it
New pools with this hook can only be created by its own factory or launcher.
The code that does this (beforeInitialize):function beforeInitialize(address sender, PoolKey calldata key, uint160) external view onlyPoolManager returns (bytes4) { if (sender != factory) revert NotFactory(); if (!pools[key.toId()].registered) revert PoolNotRegistered(); return IHooks.beforeInitialize.selector; }Anyone can trigger payouts
Anyone can claim what they’re owed and send the collected fees on to where they go, so nobody has to wait on the hook developer.
The code that does this (claimCreatorFees):function claimCreatorFees(address to) external returns (uint256 amount) { amount = creatorFeesOwed[msg.sender]; creatorFeesOwed[msg.sender] = 0; if (amount > 0) usdg.safeTransfer(to, amount); emit CreatorFeesClaimed(msg.sender, to, amount); }
Who controls it: No admin functions: nobody can change its rules after deployment.
Based on the hook’s published code.
What it can do
Its code executes inside each trade in pools that use it.
It can take or add tokens during a swap. Fees, burns and custom curves work this way, and so do scams.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Registered pool 2 times
Latest transactions
- 0x7998864c…8e7275 block 110,102,274
- 0x7998864c…8e7275 block 110,102,274
Counted from what the hook recorded on-chain across all its pools, for every action in its published code, plus token transfers in and out of it. Still reading older history, so totals will grow.