Rewards hook on Optimism
Uniswap v4 Hook Contract 0xd24fb41950e2d71f9eebab0177201949d2401fe0 on Optimism · Rewards
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 4
- Swaps (24h)
- 8 (1 traders)
- Total swaps
- 8
What it does
This hook tracks liquidity and swap activity on its pool and appears to accrue rewards, though it does not set the swap fee, so trader and LP costs follow the pool's static fee.
This read was written for the hook 0xc5d0…1fe0 on Optimism and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Hook is attached to a Uniswap v4 pool and receives callbacks for initialize, add/remove liquidity, swap and donate.
- Storage holds an address set at slot 0 and slot 1 plus a per-pool initialized flag mapping (slot 5), indicating per-pool setup on initialization.
- Tracks a swap-related observer and a liquidity ledger, with the swap path gated by an active flag and a productionReady check.
- Exposes an unclaimedRewards(bytes32) lookup and calls initializePool and checkInfrastructure on external contracts, suggesting it accrues or distributes rewards tied to pool activity.
- Heuristic tags point to oracle and rewards behaviour, but the exact reward math cannot be confirmed from decoded bytecode alone.
- Swap behaviour
- beforeSwap and afterSwap are both enabled and write to swap-related state (slots 3, 6), so the hook does observe and likely record swaps; the exact fee or reward effect of a swap cannot be determined without source.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are all enabled and read and write position-related storage, so liquidity changes are tracked by the hook.
- Fee behaviour
- Uses the pool's static fee; no dynamic fee selector (getFee-style override) or fee-override return flag was identified in the decoded functions, so the hook does not appear to set the swap fee.
- Owner & admin controls
- Dispatch includes admin() and a function at selector 0x4c6f43c1 taking an address that writes to slots 0, 1 and 2, which is consistent with an owner or admin being able to reassign core contract addresses; the exact access check cannot be confirmed without source, and an active flag suggests a pause or enable switch.
Enabled Uniswap v4 callbacks
afterInitialize, beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeDonate
afterInitialize records pool setup state; beforeAddLiquidity and afterAddLiquidity track liquidity entry; beforeRemoveLiquidity and afterRemoveLiquidity track liquidity exit; beforeSwap and afterSwap track swap activity; beforeDonate is enabled but its selector is pure and returns no meaningful logic.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: A privileged key may be able to change core addresses and toggle the active flag, which could block swaps or redirect hook dependencies for pools using this hook.
Risk to user funds: The hook does not appear to take tokens via return deltas or hold user funds directly from the decoded selectors; exposure depends on whether the privileged setters can disrupt swaps or liquidity flows.
Security findings
- [medium] Admin can reassign core addresses: Selector 0x4c6f43c1 accepts an address and writes to storage slots 0 to 2 that feed the swap and liquidity paths, so a privileged key may be able to repoint dependencies if the setter lacks a strict access check.
- [medium] Swap path gated by active flag: Slot 6 holds a bool read by beforeSwap, so if an admin can toggle it the hook could block swaps for the pool.
- [info] Upgradeability not determined: Bytecode does not show a clear proxy pattern, but this could not be ruled out from decoded bytecode alone.
- [info] Unverified source: No verified source is available, so reward and oracle logic and access checks are inferred rather than confirmed.
Contract details
- Verified source
- No
- Bytecode size
- 8,659 bytes
- Upgradeable proxy
- No
Pools using Rewards hook
- TEST-USDG / TEST-STOCK (0.25% fee) — 24h volume $0, TVL $0, 2 swaps today
- TEST-USDG / TEST-PARTNER (0.25% fee) — 24h volume $0, TVL $0, 2 swaps today
- TEST-LOX / TEST-USDG (0.25% fee) — 24h volume $0, TVL $0, 2 swaps today
- TEST-USDG / TEST-SH (0.25% fee) — 24h volume $0, TVL $0, 2 swaps today