Dynamic fee hook on Ethereum
Uniswap v4 Hook Contract 0xf3cfab1f9dd02138e15dd24e0d11df3bd186c088 on Ethereum · Dynamic fee
- 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 the swap settlement and moves pool currency during every swap, but without verified source the exact trades that pay more or less cannot be determined.
How it works step by step
- Runs a custom beforeSwap callback on every swap in pools that use this hook
- Uses beforeSwapReturnDelta, so the hook can return a delta that overrides part of the swap amount settled by the PoolManager
- Calls take(currency0, currency1, amount) on the PoolManager, which means it moves pool currency out of the pool to a recipient during swaps
- Reads and writes three storage slots (0, 1 and 2) inside beforeSwap, likely tracking custom accounting state or parameters
- Exposes two view functions (selectors 0x12e1b7e6 and 0xb41f7a80) that read the same storage slots, likely for getters or quoting
- Without verified source, the exact purpose of the storage values and of the take recipient cannot be determined
- Swap behaviour
- On every swap the hook's beforeSwap runs first and can return a delta that changes how much the swapper pays or receives, while also taking currency from the pool through take(); the exact trades affected and the direction of the adjustment cannot be determined from the bytecode alone.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static fee, with no dynamic fee override observed; any economic effect comes from the beforeSwap return delta and the take() calls rather than from an LP fee.
- Owner & admin controls
- No admin controls found in the decoded functions; no owner, pause or upgrade selectors were observed, but absence of selectors does not prove immutability.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap is enabled to run custom logic before each swap; beforeSwapReturnDelta is enabled so the hook can alter the swap amounts and take currency through a returned delta.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: Without source, it is unknown whether a privileged key can change the state in slots 0 to 2; if it can, it could alter the return delta or take amounts for all swaps in the pool.
Risk to user funds: The hook can hold and move pool currency through take() and can adjust swap settlement through the return delta, so it has direct exposure over LP and trader funds in pools that use it.
Security findings
- [high] Hook moves pool currency during swaps: The bytecode calls take(address,address,uint256) on the PoolManager from within the swap path, so the hook can withdraw pool currency to an address during trades.
- [high] Return delta can alter swap settlement: beforeSwapReturnDelta is enabled, allowing the hook to change the amounts a swapper pays or receives, which can shift value between traders and LPs.
- [medium] Unverified source: No verified source is available, so the logic, recipient of taken funds and any privileged roles cannot be confirmed by reading code.
- [low] Mutable storage used in swap path: Storage slots 0 to 2 are both read and written during beforeSwap, so the hook's behaviour may depend on state that can change between swaps.
Contract details
- Verified source
- No
- Bytecode size
- 1,089 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Dynamic fee hook
- ETH / RETICLE (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today