Dynamic fee hook on Ethereum

Uniswap v4 Hook Contract 0xbb10beffcae36fbde7869ab3c3be37b24cc910c4 on Ethereum · Dynamic fee

Volume (24h)
$27.02K
Value locked (TVL)
$198.65K
All-time volume
$27.02K
Pools using this hook
1
Swaps (24h)
46 (37 traders)
Total swaps
46

What it does

A pausable dynamic-fee hook that charges swaps an admin-set fast or slow LP fee plus a capped hook fee sent to a fee collector, while LPs can always withdraw freely.

How it works step by step

  • Sets a per-swap LP fee dynamically, with separate 'fast' and 'slow' fee levels apparently chosen using an external lookahead provider (ethgas lookahead).
  • Takes an extra hook fee from swap output and accrues it per token for later collection by a fee collector.
  • Lets an ACL-managed admin set default and per-token LP fees and hook fees, which appear bounded by LP_FEE_CAP and HOOK_FEE_CAP constants.
  • Can be paused by an admin, which likely blocks swaps.
  • Never runs on liquidity add or removal, so LPs can withdraw freely.
Swap behaviour
Before each swap the hook picks an LP fee (fast or slow tier, default or per-token) and after the swap it deducts a hook fee from the swap amount via return delta. Swaps may revert while the hook is paused.
Liquidity behaviour
No liquidity callbacks; LPs can add and withdraw freely.
Fee behaviour
LP fee and hook fee are set dynamically from admin-configured default and per-token fast/slow values, capped by on-chain LP_FEE_CAP and HOOK_FEE_CAP constants whose exact values cannot be read from bytecode. Hook fees accrue in the contract and are sent to a configurable fee collector.
Owner & admin controls
An ACL-managed admin can pause/unpause, update default and per-token LP and hook fees (up to the coded caps), switch the lookahead provider, change the fee collector, and send accrued hook fees. Exact cap values are unknown from bytecode.

Enabled Uniswap v4 callbacks

afterInitialize, beforeSwap, afterSwap, afterSwapReturnDelta

afterInitialize: sets up the pool on creation; beforeSwap: selects the dynamic LP fee and checks pause state; afterSwap: computes the hook fee; afterSwapReturnDelta: deducts the hook fee from the swap amount.

Security & trust assessment

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

Who controls it: Accounts authorised through the ACL manager can pause swaps, change fees up to the coded caps, and redirect the fee collector. They cannot touch LP principal.

Risk to user funds: The hook can take a hook fee from swap amounts, capped by an unverified HOOK_FEE_CAP, and holds accrued fees until sent out. LP principal cannot be locked or drained.

Security findings

  • [low] Admin-adjustable swap fees: Admins can change LP and hook fees per token, bounded by fee cap constants whose exact values are not verifiable from bytecode.
  • [medium] Pausable swaps: An admin can pause the hook, which likely stops swaps in its pools.
  • [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled, so the hook cannot block or charge LP withdrawals.

Contract details

Verified source
No
Bytecode size
18,757 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, pausable, return-delta, self-unlock

Pools using Dynamic fee hook