Dynamic fee hook on Avalanche

Uniswap v4 Hook Contract 0x49fcc0afb268a0fbd17254c8ac1377ab55bec0c0 on Avalanche · Dynamic fee

Volume (24h)
$0
Value locked (TVL)
<$0.01
All-time volume
$1.85
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
7

What it does

A dynamic-fee hook for an Avalanche pool that adjusts the LP fee around swaps and manages an owner-funded reserve, with an owner-controlled executor and pause switch.

How it works step by step

  • Gates swaps through a swapsEnabled flag checked in beforeSwap.
  • Sets or reads a pool fee bounded by MAX_POOL_FEE and updated through setPoolFee and updateDynamicLPFee.
  • Holds a token reserve funded by depositReserve and withdrawable by the owner.
  • Runs post-swap logic in afterSwap that may update tracked backend price state and call hedge through an executor.
  • Exposes ownership, executor and reserve admin functions gated to the owner.
Swap behaviour
beforeSwap checks swapsEnabled and reads the pool fee; afterSwap updates internal state and may trigger hedging through the executor.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are present as callbacks; the hook is not listed as having liquidity-modifying permissions beyond these hook calls, so its liquidity behaviour is not fully determinable.
Fee behaviour
Owner-settable pool fee via setPoolFee with a MAX_POOL_FEE bound and an InvalidFee error; the hook also references updateDynamicLPFee, indicating a dynamic LP fee mechanism. Exact fee formula cannot be determined without source.
Owner & admin controls
Owner (slot 0) can transfer ownership, set the executor address, toggle swapsEnabled, set the pool fee via setPoolFee, and withdraw reserves via withdrawReserve and withdrawAllReserve; depositReserve funds the reserve. No upgrade proxy pattern is evident from the selectors.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap

beforeSwap: gates or prepares swaps and can read swapsEnabled and the pool fee. afterSwap: runs post-swap logic that appears to read and update reserve or price state and may call hedge-related logic via the executor. Other liquidity and initialize callbacks exist in the selector table but are not in the enabled permissions.

Security & trust assessment

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

Who controls it: The owner can disable swaps, change the pool fee within bounds, set the executor, and withdraw reserves, so a compromised owner key could halt trading or drain reserve balances.

Risk to user funds: The hook holds a reserve balance and performs token transfers and hedging, and the owner can withdraw that reserve, so pool participants depend on the owner key remaining secure.

Security findings

  • [medium] Owner can pause swaps: Owner can toggle swapsEnabled, halting all swaps through beforeSwap.
  • [high] Privileged reserve withdrawal and fee control: Owner can change the pool fee via setPoolFee and withdraw reserves via withdrawReserve and withdrawAllReserve.
  • [medium] Hook holds and moves tokens: Hook holds a reserve balance (depositReserve, tokenBalance) and transfers tokens (transfer, transferFrom, hedge), so it can hold and move funds.
  • [info] Single owner key: Owner is a single address with ownership transfer; no timelock or multisig is evident from the bytecode.

Contract details

Verified source
No
Bytecode size
13,231 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency, ownable

Pools using Dynamic fee hook