Rewards hook on Ethereum
Uniswap v4 Hook Contract 0x21f193a486861a5ce45f83802f3c4b993110a0cc on Ethereum · Rewards
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook takes part of swap flow through return deltas to fund reward payouts and burns, with the fee set by owner-adjustable parameters, though which trade direction pays more cannot be determined from the bytecode alone.
How it works step by step
- Hook with beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta and afterSwapReturnDelta permissions, so it can alter swap amounts and take currency through return deltas.
- Tracks a configured pool (poolId, ethFwaPool key) and gates swaps through an initialized flag and a trading-closed state.
- Contains round logic (closeRound, payout, burnExcess) and reward/claim accounting (rewards, nftEthClaims, nftFwaClaims, totalBurned), indicating a periodic distribution of collected value to claimants.
- Uses an unlockCallback path and calls PoolManager functions (unlock, take, accountTransferDelta, extsload), so it moves currency inside the pool manager during swaps and payouts.
- Maintains an approvedRouters allowlist set by setRouters, restricting which routers may trigger swap-time logic.
- Has a quoteFee(uint256,uint16) view and a feeBps value, plus conversion bounds set by setConversionBounds, which suggests a dynamic fee derived from parameters.
- Swap behaviour
- beforeSwap and afterSwap run on every swap of the pool, and both can return deltas that alter the amounts settled, so the hook can take a portion of swap flow or adjust the price; exact trade-by-trade effects cannot be determined from decoded bytecode alone.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Fee appears dynamic: feeBps and quoteFee(amount, bps) are exposed and conversion bounds are settable, so the fee is computed per swap, with the exact formula and which trade direction pays more not determinable from bytecode.
- Owner & admin controls
- An owner (owner() present) can set the ETH/FWA pool key, set conversion bounds, manage approved routers, and call payout, burnExcess and closeRound; pausing and upgrade mechanisms were not identified.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize validates and records the pool configuration at initialization; beforeSwap can gate or adjust a swap and return a delta; afterSwap settles accounting and updates rewards and round state; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take or give currency as part of the swap.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: A single owner key can change the fee-related bounds, the pool key and approved routers, and trigger payouts, burns and round closure, so a compromised or malicious owner could redirect or halt value flows.
Risk to user funds: The hook takes and settles currency via return deltas and transfers, and holds rewards and claim balances, so pool and user funds in the hook's accounting path can be moved or blocked by owner actions.
Security findings
- [high] Return-delta currency movement: beforeSwapReturnDelta and afterSwapReturnDelta are enabled and the bytecode calls take and accountTransferDelta, so the hook can move pool currency on every swap, which affects LP and trader balances.
- [medium] Owner-controlled payout and burn: Owner-gated selectors payout, burnExcess and closeRound can release or destroy accumulated balances; the owner can also reconfigure the pool key and conversion bounds.
- [medium] Router allowlist gating: setRouters maintains an approvedRouters mapping that can restrict swap-time logic to chosen routers; an owner change could block or redirect swaps through non-approved routers.
- [medium] Dynamic fee parameters adjustable: setConversionBounds and feeBps are owner-adjustable, so the fee charged to traders can be changed by the owner without user consent.
- [low] Trading closure state: A TradingClosed error and closeRound indicate swaps can be halted by a round-closing action, which can block trades.
Contract details
- Verified source
- No
- Bytecode size
- 12,577 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta, rewards, self-unlock
Pools using Rewards hook
- FWA / MAD (1.25% fee) — 24h volume $0, TVL $0, 0 swaps today