AvalancheSimpleFeeHookV2 on Avalanche

Uniswap v4 Hook Contract 0xd2676fb8b163cc58d8ee7dd64f55c2ba60856044 on Avalanche · Fee sharing · Verified contract

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

What it does

A Uniswap v4 hook that charges an owner-configured fee on the output token of every swap in its pools and splits the fee among recipients defined by an external fee helper contract.

How it works step by step

  • Reads the total fee in ppm for the pool from the feeHelper contract
  • Takes that fee from the output currency after each swap via the PoolManager claim balance
  • Splits the fee among recipients returned by feeHelper.getFeesForPool
  • Assigns any rounding remainder to the final recipient
  • Restricts pool initialization to addresses approved as deployers by the owner
  • Emits HookFee and SwapFeesRouted events for each swap
Swap behaviour
After each swap, the hook takes the fee share of the unspecified output currency from the PoolManager, pays out the split to the configured recipients, and returns the fee amount to adjust the swapper's delta.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Charges an output-side fee on every swap: the hook reads the total fee in ppm from the external feeHelper for the pool, takes that share of the unspecified (output) currency into its own balance via the PoolManager claim mechanism, then splits it among the recipients returned by feeHelper.getFeesForPool, with any rounding remainder going to the last recipient. The fee is taken on top of the pool's own fee through afterSwap return delta.
Owner & admin controls
Owner (Ownable2Step, two-step transfer) can set the fee helper via setFeeHelper, which determines the total fee in ppm and the list of fee recipients for every pool, and can authorize pool deployers via setDeployer. renounceOwnership is disabled. The contract is not proxied, so no upgrade path exists.

Enabled Uniswap v4 callbacks

beforeInitialize, afterSwap, afterSwapReturnDelta

beforeInitialize restricts pool creation to addresses flagged by the owner as deployers. afterSwap and afterSwapReturnDelta take the output-side fee after each swap and return its amount so the PoolManager adjusts the swapper's delta.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: The owner can point the hook to any fee helper contract, which can set the total fee and recipient list arbitrarily, including routing all fees to the owner or setting fees high enough to make swaps uneconomic. The owner also controls who can initialize pools.

Risk to user funds: The hook takes a share of every swap's output token and holds it transiently before sending it to fee recipients. Swaps can be taxed at whatever rate the fee helper reports, and the recipient list is controlled by the owner through the helper. The hook does not hold pool liquidity or LP principal directly.

Security findings

  • [high] Owner-controlled fee and recipients: The owner can change the feeHelper to one returning any total fee and recipients; no cap on the fee is enforced here beyond the 100% MAX_HOOK_FEE bound, so swappers can be charged up to the full output amount.
  • [medium] Dependency on external fee helper: Fee rates and recipients are read from an external helper contract at swap time, so their behaviour depends on code outside the verified hook source.
  • [info] Initialization allowlist: Pool initialization is gated by isDeployer, so only owner-approved addresses can create pools using this hook.
  • [info] Disabled functions: handleHookFees reverts with 'Not implemented', and renounceOwnership is disabled, so the owner cannot be removed by renouncing.
  • [medium] Hook holds and redistributes swap output: The hook takes output tokens into its own balance and routes them to recipients. The swapper receives the post-fee amount, so the fee is borne by traders on each swap.

Contract details

Verified source
Yes (AvalancheSimpleFeeHookV2)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
5,197 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency, ownable, return-delta

Pools using AvalancheSimpleFeeHookV2