Dynamic fee hook on Ethereum
Uniswap v4 Hook Contract 0x0194c9023de5cdf645fe97cb1cf108069fff0888 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
- 287
What it does
A dynamic-fee hook that intercepts liquidity additions and swaps, using a return-delta on swaps to apply its own fee logic for traders and LPs.
How it works step by step
- Intercepts swaps in beforeSwap and can alter swap settlement via a return delta.
- Exposes an innerFee getter, indicating an internally managed fee value.
- Runs logic before liquidity is added via beforeAddLiquidity.
- Tracks a derived key through innerKey, possibly identifying the pool or position.
- Implements afterSwap, afterAddLiquidity, afterRemoveLiquidity and donate hooks as dispatchable entry points, although only beforeAddLiquidity, beforeSwap and beforeSwapReturnDelta are enabled by permissions.
- Swap behaviour
- beforeSwap is nonpayable and returns a delta that adjusts swap accounting; afterSwap is also dispatched, and the fee is likely taken through the return delta, based on the innerFee getter.
- Liquidity behaviour
- beforeAddLiquidity is enabled and performs a check or adjustment on add-liquidity; no removal return-delta permission is enabled, so removal is not modified by the hook.
- Fee behaviour
- Exposes an 'innerFee' getter, suggesting the hook sets or overrides the swap fee internally; the exact fee formula cannot be determined from the decoded bytecode.
- Owner & admin controls
- No admin controls found in the decoded selectors; no owner, pause or upgrade functions were identified, though 'innerFee' and 'innerKey' getters suggest an internal fee and key are stored and may be settable by an unidentified path.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeAddLiquidity: runs logic before liquidity is added to the pool. beforeSwap: runs logic before each swap. beforeSwapReturnDelta: lets the hook return a delta that alters the amounts a swap settles, enabling custom swap accounting.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: Without identified admin functions the privileged surface appears limited, but the presence of getters for an inner fee and key means the fee logic may depend on stored values that could be updated by an unidentified privileged path.
Risk to user funds: Because beforeSwapReturnDelta is enabled, the hook can alter the token amounts settled in swaps and so can affect user and pool funds; the exact extent cannot be confirmed without source.
Security findings
- [medium] Swap return delta enabled: beforeSwapReturnDelta lets the hook alter swap amounts, so the hook can take or give tokens during swaps.
- [info] Limited visibility into logic: Storage layout was not inferred and no source is available, so the fee calculation and any mutable state cannot be fully verified.
- [low] State mutation during swap: The beforeSwap selector is nonpayable, meaning it can modify state during swaps.
Contract details
- Verified source
- No
- Bytecode size
- 4,542 bytes
- Upgradeable proxy
- No
- Detected patterns
- return-delta
Pools using Dynamic fee hook
- USDC / WETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today