Likely dynamic fee hook on Avalanche

Uniswap v4 Hook Contract 0x0031d3fa5e9b6f5d3070f7f05a18ce1d8ee000c0 on Avalanche · Dynamic fee

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

What it does

A Uniswap v4 hook that runs owner-managed reserves alongside a pool, using swap callbacks to gate trading and possibly hedge exposure through an executor role.

How it works step by step

  • Gates swaps on and off with a swapsEnabled flag that the owner controls
  • Validates pool keys and initialization parameters during pool setup
  • Holds USDC and other reserve tokens deposited by the owner
  • Runs post-swap logic that may call a hedge function via an executor address
  • Exposes owner-only reserve deposit and withdrawal functions
Swap behaviour
beforeSwap checks whether swaps are enabled and may validate pool state; afterSwap runs post-swap logic that can include a hedge call.
Liquidity behaviour
Liquidity add and remove callbacks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) are present as selectors and appear to be pass-through or validation hooks; no clear custom accounting is identifiable from the decoded input.
Fee behaviour
Hook reads a fee-related value (V4_POOL_FEE, uint24 setter) and may rely on a dynamic fee, but the exact fee computation cannot be determined from decoded selectors alone; treat as unknown.
Owner & admin controls
Owner (slot 0) can transfer ownership, set the executor address (setExecutor), toggle swaps on or off (setSwapsEnabled), set the fee tier and tick spacing (uint24 and int24 setters), and deposit, withdraw and fully withdraw reserves (depositReserve, withdrawReserve, withdrawAllReserve). Executor address (slot 1) appears to be a second privileged role that can invoke hedging or reserve logic.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap

beforeSwap: gates swaps and reads pool state before execution. afterSwap: runs post-swap logic, possibly including a hedge call (hedge(address,address,uint256) selector present). beforeInitialize and afterInitialize: pool initialization checks, including pool key validation (InvalidPoolKey error). Other liquidity and donate callbacks are present in the dispatch table but their use is not determinable.

Security & trust assessment

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

Who controls it: The owner can disable swaps entirely, move reserve funds out via withdrawReserve and withdrawAllReserve, and change the executor and fee-related parameters. A compromised owner or executor key could drain reserves or block trading. Ownership is transferable with no timelock evident.

Risk to user funds: The hook holds reserve tokens (USDC and possibly others) via depositReserve and can transfer them out through withdrawReserve, withdrawAllReserve and hedge calls, so user-facing liquidity depends on the owner and executor keys.

Security findings

  • [high] Owner can withdraw all reserves: withdrawAllReserve and withdrawReserve let the owner move hook-held reserve tokens to any address.
  • [medium] Owner can disable swaps: setSwapsEnabled lets the owner halt all swaps through beforeSwap, which reverts with SwapsDisabled.
  • [medium] Executor role can trigger hedging with reserve funds: The hook includes a hedge(address,address,uint256) call and a separate executor role, so the executor may move funds during afterSwap.
  • [info] Unverified source: Source is unverified and only partial function selectors were decoded; intent and full logic cannot be confirmed.

Contract details

Verified source
No
Bytecode size
6,014 bytes
Upgradeable proxy
No
Detected patterns
ownable

Pools using Likely dynamic fee hook