Dynamic fee hook on Ink

Uniswap v4 Hook Contract 0x7353b76ce326a3401162edb1cd802f88e5eb60cc on Ink · Dynamic fee

Volume (24h)
$4.53K
Value locked (TVL)
$9.04K
All-time volume
$57.93K
Pools using this hook
4
Swaps (24h)
39 (24 traders)
Total swaps
746

What it does

An unverified Uniswap v4 hook that appears to apply a fixed-basis-point swap fee with custom accounting of currency taken during swaps.

How it works step by step

  • Registers pools via registerPool and beforeInitialize, restricted to an authorized initializer
  • Exposes a fixed swap fee constant SWAP_FEE_BPS
  • Tracks per-pool fee accounting through feePools and pendingFees mappings
  • Uses return-delta permissions to adjust currency deltas during swaps
  • Includes an unlockCallback path that can self-unlock the pool manager
  • Exposes oracle state reads through oracleState
Swap behaviour
beforeSwap and afterSwap run hook logic and can adjust deltas via return-delta permissions, meaning the hook can take or give currency on each swap.
Liquidity behaviour
Liquidity add and remove hooks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) are present as selectors, but their internal logic is not confirmed from decoded input.
Fee behaviour
Swap fee appears to be a fixed basis-point constant exposed via SWAP_FEE_BPS(), with a pending fee accounting path (feePools, pendingFees) and a fee witness check (InvalidFeeWitness). Exact fee computation cannot be confirmed without source.
Owner & admin controls
Only an authorizedInitializer address (read via 0x6d7779d9) can register pools; the bytecode reverts with UnauthorizedInitializer and UnauthorizedPoolManager on unauthorized callers. No owner setter selector for fee or pause was identified, and no upgrade pattern was seen. Parameter-change controls cannot be confirmed without source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize registers the pool; beforeSwap and afterSwap run custom logic on swaps; beforeSwapReturnDelta and afterSwapReturnDelta let the hook alter swap deltas, which means it can take or give currency during swaps; liquidity and donate callbacks are exposed as selectors but their use is unclear.

Security & trust assessment

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

Who controls it: The authorized initializer controls which pools are registered with this hook. Without source it is unclear whether it can change fees or pause swaps.

Risk to user funds: The hook can move currency through take calls and return deltas during swaps and may hold or route pool funds. Impact depends on logic not visible without source.

Security findings

  • [medium] Return-delta currency movement: Hook has beforeSwapReturnDelta and afterSwapReturnDelta enabled and uses take and currency transfer selectors, so it can take user or pool currency during swaps.
  • [medium] Self-unlock path: Bytecode contains an unlockCallback path with a self-unlock selector (unlock), so the hook can open its own pool manager lock during execution.
  • [low] Fee logic not fully verifiable: A fixed fee constant and fee witness handling exist; the fee-setting authority is not verifiable from the bytecode alone.
  • [info] No verified source: Contract is unverified, so behaviour is inferred only from selectors and storage.

Contract details

Verified source
No
Bytecode size
14,098 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta, self-unlock

Pools using Dynamic fee hook