Dynamic fee hook on Arbitrum

Uniswap v4 Hook Contract 0x6cc486dd171a8de0586d26c36c4562e07b3cc088 on Arbitrum · Dynamic fee

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
28
Swaps (24h)
0 (0 traders)
Total swaps
0

What it does

A dynamic-fee style hook on Arbitrum that can override the swap fee per pool through an owner-set fee parameter and can be paused, with the owner able to change the pool fee and the hook able to return a delta during swaps.

How it works step by step

  • Implements a beforeSwap callback that runs before every swap in pools using this hook.
  • Holds a per-pool fee value that the owner can set through setPoolFee(bytes32,uint24).
  • Maintains a pools mapping and a list of registered pool identifiers (allPools, getPoolCount), suggesting a registry of pools that use the hook.
  • Has a global pause flag (setPaused, paused) that the swap path reads, so the hook can be toggled off or on.
  • Exposes a generic execute(address,uint256,bytes) and a token/ETH-handling entry point, which means the owner can make the hook call arbitrary external contracts.
Swap behaviour
Not stated.
Liquidity behaviour
Liquidity callback selectors exist (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) but the corresponding permissions are not enabled on the address, so they are not expected to be invoked by the pool manager.
Fee behaviour
The owner can set a per-pool fee through setPoolFee; the hook's beforeSwap is the place that applies it, so the effective fee is set by the hook rather than only the pool's static fee. Exact fee math cannot be confirmed without source.
Owner & admin controls
Owner (slot 0) can transfer ownership (setOwner), pause or unpause swaps (setPaused), set pool fees (setPoolFee), set a stored address (the function at 0xbeafcdc4/0x8ec6cd0d area), and execute arbitrary calls via execute. No timelock or upgrade mechanism was identified; upgradeability is not evident from the decoded selectors.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap: runs the fee and pause logic before each swap. beforeSwapReturnDelta: lets the hook alter swap deltas, so it can take or give tokens as part of a swap.

Security & trust assessment

Risk level: high, estimated (decoded bytecode, low confidence).

Who controls it: A single owner key controls pool fees, the pause switch, arbitrary external calls, and ownership transfer. Compromise of that key could drain or redirect hook-held funds and manipulate fees for every pool using the hook.

Risk to user funds: The hook can alter swap settlement through its return delta and can execute arbitrary calls as the owner, so it can potentially hold, move, or block user and pool funds. The exact balances it custodies cannot be determined from the bytecode alone.

Security findings

  • [high] Owner can set arbitrary pool fees: setPoolFee(bytes32,uint24) is callable by the owner and the stored fee is applied in beforeSwap, so the owner could raise a pool's fee to the maximum or otherwise distort trade pricing for users. Whether an owner check is present cannot be confirmed without source.
  • [medium] Owner can pause all swaps: setPaused(bool) toggles a flag read by the swap path (beforeSwap reads slot 0 offset 23), so the owner can halt trading on pools using this hook.
  • [high] Return delta grants the hook control over settlement: beforeSwapReturnDelta is enabled, meaning the hook can change the amounts a swap settles. Combined with an owner-controlled execute function, this gives a privileged key influence over where swap value flows.
  • [high] Generic execute capability: execute(address,uint256,bytes) lets the owner make arbitrary calls with a chosen value from the hook, which could move any tokens or ETH the hook holds or is authorized for.
  • [medium] Unverified source: No verified source is available, so the owner checks, reentrancy protection, and exact fee math are inferred from selectors only and could not be confirmed.

Contract details

Verified source
No
Bytecode size
17,804 bytes
Upgradeable proxy
No
Detected patterns
pausable, return-delta

Pools using Dynamic fee hook