Dynamic fee hook on Ethereum

Uniswap v4 Hook Contract 0xecd03bf3928ca9125335b8ca282fba42c9a6a0cc 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 charges a dynamic fee on swaps that starts high and decays toward a floor over time, with part of the fee sent to a fixed recipient, though which trade direction pays more could not be confirmed from the bytecode.

How it works step by step

  • Exposes a fee in basis points that is read per swap direction via feeBps(bool) and currentFeeBps().
  • Uses beforeSwap and afterSwap with return deltas, so the hook can take a portion of swap amounts as its own claim.
  • Takes fees as ERC6909 claims through mint and burn on the pool manager, then can redeem them via redeem().
  • Starts from START_BPS and decays toward FLOOR_BPS over DECAY_SECONDS, according to the constant names decoded from the bytecode.
  • Sends a share of collected value to FEE_RECIPIENT, as indicated by the constant and the take/unlock calls.
  • Uses self-unlock (unlock and unlockCallback) to settle currency movements with the pool manager.
Swap behaviour
Swap callbacks compute a directional fee from feeBps and the current decay state, then take a return delta on the swap; the exact direction that pays more or less could not be fully resolved from decoded bytecode.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fee is dynamic: it starts at START_BPS, decays toward FLOOR_BPS over DECAY_SECONDS, is readable per direction through feeBps(bool), and part is routed to FEE_RECIPIENT; exact formula not confirmed without source.
Owner & admin controls
No explicit owner or pause selectors were decoded; the presence of an OnlyPoolManager guard indicates callbacks are restricted to the pool manager, but parameter changes or upgrades could not be determined.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize validates or sets up the pool at creation; beforeSwap computes the fee and return delta before execution; afterSwap settles the hook's take after execution; beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take currency from swaps.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, medium confidence).

Who controls it: The fee recipient is a fixed address; no owner-only setter was decoded, so a privileged key's power is unclear, but any configurable parameters would let it change the fee applied to swaps.

Risk to user funds: The hook can take currency from swaps via return deltas and holds ERC6909 claims on the pool manager, so user swap proceeds are exposed to the fee logic.

Security findings

  • [medium] Return-delta fee capture: The hook enables beforeSwapReturnDelta and afterSwapReturnDelta and moves currency via take/mint, so it can extract value from every swap routed through the pool.
  • [info] Fee recipient routing: A FEE_RECIPIENT constant indicates a fixed address receives a share of collected fees; this is a neutral design observation.
  • [medium] Unverified source: Without verified source, the decay formula, fee bounds and any hidden admin paths cannot be fully confirmed from bytecode alone.
  • [low] Claim redemption: redeem() lets callers burn ERC6909 claims for underlying tokens; correctness of claim accounting cannot be verified without source.

Contract details

Verified source
No
Bytecode size
6,960 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, moves-currency, return-delta, self-unlock

Pools using Dynamic fee hook