Fee sharing hook on Avalanche
Uniswap v4 Hook Contract 0x6513895e26e2af174c39c8ddfde4e7121fa0a5cf on Avalanche · Fee sharing
- Volume (24h)
- $0.95
- Value locked (TVL)
- $0.96
- All-time volume
- $0.95
- Pools using this hook
- 1
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 1
What it does
This hook charges an extra tax on swaps and liquidity moves that is taken by the hook and sent to a treasury, with anti-dump limits that can affect large sells, so traders and LPs pay more than the pool's base fee.
How it works step by step
- Enables beforeSwapReturnDelta and afterSwapReturnDelta, so the hook can take a cut of swap amounts outside the pool's normal fee accounting.
- Exposes a currentTaxBps() reader and a LIQUIDITY_TAX_BPS constant, indicating a tax applied to liquidity actions.
- Uses afterAddLiquidityReturnDelta and afterRemoveLiquidityReturnDelta to skim tokens from liquidity additions and removals.
- Calls take, mint and burn on the pool manager (ERC6909 claims), and moves ERC20 tokens via transfer, so it holds and redistributes value.
- Has collect(address) and a treasury() getter, suggesting accrued tax is collected and forwarded to a treasury address.
- Includes setAntiDump(uint256,uint256), which points to swap-size or sell-pressure limits that alter swap pricing for some trades.
- Swap behaviour
- beforeSwap and afterSwap run on every swap and both have return-delta permissions, so the hook can take a portion of swap amounts on top of the pool fee; the exact rate and which direction is taxed could not be determined from bytecode alone, and anti-dump logic may further restrict or reprice large sells.
- Liquidity behaviour
- afterAddLiquidity and afterRemoveLiquidity run after liquidity changes and can return deltas, so a liquidity tax (LIQUIDITY_TAX_BPS) is taken from deposits and withdrawals, with the taken tokens held as claims or transferred out.
- Fee behaviour
- The pool's LP fee is reported via LP_FEE_BPS and capped by MAX_LP_FEE_BPS; on top of that, a swap tax (currentTaxBps) and a liquidity tax are taken by the hook and routed to a treasury, with collect(address) sweeping accrued amounts.
- Owner & admin controls
- A treasury address and setAntiDump suggest privileged control over tax destination and anti-dump parameters; the presence of an initializer() selector suggests an initialization step, but whether an owner can change tax rates or pause swaps could not be confirmed from decoded bytecode.
Enabled Uniswap v4 callbacks
beforeInitialize, afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta
beforeInitialize validates pool setup; beforeSwap and afterSwap run swap logic and anti-dump checks with return deltas to take tax; afterAddLiquidity and afterRemoveLiquidity apply the liquidity tax via return deltas; beforeSwapReturnDelta and afterSwapReturnDelta let the hook alter swap amounts; afterAddLiquidityReturnDelta and afterRemoveLiquidityReturnDelta let the hook alter liquidity amounts. beforeAddLiquidity, beforeRemoveLiquidity, beforeDonate and afterDonate are present as selectors but their hook flags are not enabled.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, medium confidence).
Who controls it: A privileged key may be able to change anti-dump settings, choose the treasury recipient and trigger collection of accrued tax, and could alter tax behaviour if such controls exist in the bytecode.
Risk to user funds: The hook holds claim balances and can take tokens from swaps and liquidity actions via return deltas and transfers, so user funds passing through these pools are directly exposed to the hook's tax logic.
Security findings
- [high] Hook takes value via return deltas: The hook enables beforeSwapReturnDelta, afterSwapReturnDelta and liquidity return-delta flags and calls take/mint/burn, so it can extract a portion of every swap and liquidity action from users.
- [medium] Privileged anti-dump parameter setter: setAntiDump(uint256,uint256) is callable to alter thresholds that affect swap execution, which may let a privileged key block or reprice sells if access control is weak or absent.
- [medium] Treasury sweep via collect: collect(address) and treasury() indicate accrued fees can be forwarded to an address set by the deployer or admin, creating a centralization point over collected funds.
- [info] Unverified source: No verified source is available, so access checks on setAntiDump, collect and initializer could not be confirmed and the exact tax rates are unknown.
Contract details
- Verified source
- No
- Bytecode size
- 9,948 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, erc6909-claims, moves-currency, return-delta, self-unlock, tax
Pools using Fee sharing hook
- USDC / GKK6 (0.00% fee) — 24h volume $0.95, TVL $0.96, 1 swaps today