Dynamic fee hook on Ethereum
Uniswap v4 Hook Contract 0xc4c408d261b549ab370ec00f6f5e071176bf0088 on Ethereum · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 9
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 1
What it does
A pausable Uniswap v4 hook that gates swaps through a beforeSwap callback and can return a delta to the pool, with an owner-controlled per-pool fee setter and a pause switch, apparently part of a protocol using WSOHM, GOHM and a legacy staking contract.
How it works step by step
- Runs logic in beforeSwap on every swap routed through the pool manager, and can return a before-swap delta that adjusts the swap amounts
- Stores a per-pool fee value keyed by pool id (setPoolFee(bytes32,uint24)), suggesting the hook can override the fee for specific pools
- Maintains an owner-set pause flag (setPaused, paused) that the swap path reads, allowing trading to be halted
- Keeps a registry of pools (isPoolRegistered, pools, allPools, getPoolCount), indicating it only acts on pools it has registered
- Includes an execute(address,uint256,bytes) function that makes arbitrary external calls, and a setOwner function for ownership transfer
- References WSOHM, GOHM, LEGACY_STAKING and MIGRATOR, which suggests protocol-specific token and migration logic tied to an OlympusDAO-style ecosystem
- Swap behaviour
- beforeSwap is non-view and reads the pause flag and the pool registry. It may return a before-swap delta, so the hook can alter the amounts settled for the swapper. Exact fee and delta math cannot be confirmed from the decoded bytecode alone.
- Liquidity behaviour
- beforeAddLiquidity, beforeRemoveLiquidity, afterAddLiquidity and afterRemoveLiquidity are present as view selectors. The decoded permissions show these callbacks are not enabled, so they do not run in practice.
- Fee behaviour
- The owner can set a fee per pool through setPoolFee, which implies the hook overrides the pool's fee for registered pools. The exact application path could not be verified without source.
- Owner & admin controls
- The owner (set via setOwner, owner) can pause and unpause swaps (setPaused), set per-pool fees (setPoolFee), and transfer ownership. The execute function can make arbitrary calls as the hook, which is a broad privilege. No upgrade proxy pattern was identified, but this is unconfirmed.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap: gates or adjusts each swap, including the pause check and registry lookup. beforeSwapReturnDelta: lets the hook return a delta that changes what the swapper and pool settle, so the hook can take or give tokens during a swap.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: A single owner key controls pausing, per-pool fees, ownership transfer and arbitrary execute calls. Compromise of that key could halt trading, change fees, or drain any tokens the hook holds.
Risk to user funds: The hook can hold tokens and can take or give value during swaps through its return delta. execute can move any tokens the hook holds. Users could be affected by pausing or by fee changes, and a compromised owner could drain hook-held funds.
Security findings
- [high] Arbitrary execute capability: execute(address,uint256,bytes) lets the owner make arbitrary calls with the hook's address and any value it holds. Its scope cannot be bounded without source.
- [medium] Owner can halt swaps: setPaused is read by beforeSwap, so the owner can stop trading in every pool this hook serves.
- [medium] Owner can set pool fees: setPoolFee(bytes32,uint24) lets the owner change the fee on registered pools; the allowed range and any cap are unknown from bytecode.
- [medium] Return delta grants token-taking power: beforeSwapReturnDelta is enabled, so the hook can settle amounts against swappers and could extract value if its logic is manipulated or compromised.
- [info] No source verification: The contract is unverified, so the behaviour described here is inferred from selectors and storage access patterns and may be incomplete.
Contract details
- Verified source
- No
- Bytecode size
- 18,960 bytes
- Upgradeable proxy
- No
- Detected patterns
- pausable, return-delta
Pools using Dynamic fee hook
- gOHM / OHM (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- OHM / OHM (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sOHM / OHM (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sOHM / OHM (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sOHM / OHM (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sOHM / OHM (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- OHM / wsOHM (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sOHM / gOHM (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sOHM / OHM (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today