StrategyFeeHook on Avalanche

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

Volume (24h)
$6.56
Value locked (TVL)
$2.34K
All-time volume
$615.88K
Pools using this hook
1
Swaps (24h)
74 (1 traders)
Total swaps
21,340

What it does

On allowlisted BLACK/USDC-style pools this hook takes a flat 10% of whatever token a trader receives in each swap, so swappers get about 90% of the output in either direction and the fee is converted to AVAX and sent to a strategy manager.

How it works step by step

  • Allowlists specific pools via setPoolAllowed; swaps on non-allowlisted pools revert with PoolNotAllowed
  • In afterSwap, takes 10% (FEE_BPS 1000) of the output (unspecified) currency amount from the pool manager into the hook
  • If the output currency is not AVAX, swaps the collected fee into AVAX through an in-hook pool swap and settles the deltas with the pool manager
  • Forwards the AVAX (native or WAVAX via approve) to the configured strategyManager through receiveFees
  • Returns the fee amount as an afterSwap return delta so the trader pays it from the output side
  • Tracks totalFeesCollected and emits FeesCollected and FeesSentToStrategy events
Swap behaviour
Only allowlisted pools accept swaps; for all others the swap reverts. On allowlisted pools every swap, regardless of direction, has 10% of the output currency diverted as a hook fee, so the trader receives roughly 90% of the output amount on each swap.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Hook takes a fixed 10% (1000 bps) of the output token on every swap in allowlisted pools, on top of the pool's own fee. The fee is taken via the afterSwap return delta and the take() call, and forwarded to the strategy manager, with non-AVAX fees converted to AVAX first.
Owner & admin controls
Owner (Ownable) can allowlist or de-allowlist pools, change the strategyManager address to any non-zero address, rescue arbitrary ERC20 tokens held by the hook to the owner, and renounce or transfer ownership. No pause or upgrade mechanism is visible.

Enabled Uniswap v4 callbacks

afterSwap, afterSwapReturnDelta

afterSwap is used to take the 10% output-currency fee and convert/forward it to the strategy manager; afterSwapReturnDelta lets the returned fee amount adjust the swapper's settled output.

Security & trust assessment

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

Who controls it: A single owner key can allowlist pools, redirect all fees to any strategyManager address, withdraw any token balance held by the hook, and transfer ownership, with no timelock or multisig requirement visible.

Risk to user funds: The hook holds fee tokens transiently during swaps and can hold AVAX or ERC20 balances between operations; the owner can withdraw these through rescueTokens. Swappers in allowlisted pools lose about 10% of their output to the hook.

Security findings

  • [medium] Owner can redirect all fees: setStrategyManager lets the owner point fee forwarding at any address without a timelock, so accrued and future fees could be sent to an arbitrary destination.
  • [medium] Hook takes return delta on every swap: afterSwapReturnDelta with a fixed 10% take means traders on allowlisted pools always receive about 10% less output, and the owner can add pools to this regime at will.
  • [medium] Owner can drain held tokens: rescueTokens transfers any ERC20 balance held by the hook to the owner, which includes fees awaiting forwarding.
  • [low] Fee swap uses pool price without slippage bound: _swapToAvax performs an exact-input swap with price limits at the tick extremes and no minimum output, so the fee conversion can be sandwiched or executed at poor prices.
  • [low] Unchecked ERC20 transfer in settlement: _settleDeltas uses IERC20.transfer without checking the return value, relying on the token reverting on failure.

Contract details

Verified source
Yes (StrategyFeeHook)
Compiler
solc 0.8.24+commit.e11b9ed9
Bytecode size
12,135 bytes
Upgradeable proxy
No
Detected patterns
ownable, return-delta

Pools using StrategyFeeHook