Fee sharing hook on Avalanche

Uniswap v4 Hook Contract 0x046a23058b1e56d6aa3e9ac11565bbe8a89728cc on Avalanche · Fee sharing

Volume (24h)
$393
Value locked (TVL)
$4.65K
All-time volume
$1.35M
Pools using this hook
541
Swaps (24h)
5 (4 traders)
Total swaps
9,008

What it does

A fee-sharing hook that charges a buy-side fee on swaps and splits it between holders, creators and a platform treasury, with claimable balances for each recipient.

How it works step by step

  • Charges a buy-side fee per pool, bounded by MAX_FEE_BPS and a beam fee constant
  • Splits collected fees between platform (PLATFORM_SHARE_BPS), creators and holders
  • Takes fees via beforeSwapReturnDelta and afterSwapReturnDelta
  • Accrues per-holder and per-creator balances that can be claimed
  • Maintains a per-pool stock and registry mapping pool IDs to pools
Swap behaviour
beforeSwap and afterSwap apply a fee through return deltas and update holder and creator accruals for each swap.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity are gated callbacks; afterAddLiquidity and afterRemoveLiquidity are present as views and the pool stock and holder accruals are updated around liquidity events.
Fee behaviour
Hook exposes a beam fee (BEAM_FEE_BPS), a max fee (MAX_FEE_BPS), a current buy fee per pool (currentBuyFeeBps) and a creator/platform revenue split (PLATFORM_SHARE_BPS, creatorSplit). Swap-time fees are taken via return deltas in beforeSwap/afterSwap and accrue to holder and creator balances, which are claimable through claimFees, pullHolderFees and claimable.
Owner & admin controls
Owner-style admin (setAdmin, setTreasury, adminSetCreatorRecipient, setCreatorRecipient) can change the treasury address and creator fee recipients; the admin slot is readable via admin(). Parameter-changing and pausing functions were not confirmed from selectors alone, and an initializer-style function (0x517fffa9, 0x629119fd) also writes pool config storage. Upgradeability was not determined.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize registers pools and their config; beforeAddLiquidity and beforeRemoveLiquidity check or adjust liquidity positions; beforeSwap and afterSwap apply the fee logic and record accruals; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of swap amounts as fees.

Security & trust assessment

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

Who controls it: The admin and treasury keys can redirect creator recipients and the treasury destination, which determines where fee revenue flows. Compromise of these keys could divert accrued fees for pools.

Risk to user funds: The hook can take a portion of swap amounts via return deltas and holds accrued balances for holders and creators. Whether it can block swaps was not determined from selectors alone.

Security findings

  • [medium] Return-delta fee capture: The hook takes swap amounts through return deltas, so it holds part of each swap's value and pays it out to holders, creators and the treasury.
  • [medium] Privileged redirection of fee recipients: setTreasury, setAdmin and setCreatorRecipient can change where fee revenue is sent, with no timelock visible in the selectors.
  • [info] Unverified fee accounting: Fee accrual mappings are written during swaps and claims; accounting correctness could not be verified without source.

Contract details

Verified source
No
Bytecode size
13,121 bytes
Upgradeable proxy
No
Detected patterns
return-delta

Pools using Fee sharing hook