SlippageFeeHook on Arbitrum

Uniswap v4 Hook Contract 0xc4bf39a096a1b610dd6186935f3ad99c66239080 on Arbitrum · Dynamic fee · Verified contract

Volume (24h)
<$0.01
Value locked (TVL)
$2.35
All-time volume
$1.95K
Pools using this hook
1
Swaps (24h)
1 (1 traders)
Total swaps
368

What it does

A dynamic-fee hook that charges swappers a fee proportional to how much their trade would move the pool price, to reduce LP impermanent loss, and blocks swaps that would slip more than about 5%.

How it works step by step

  • Simulates each incoming swap on the pool through a self-unlock to predict the post-swap tick
  • Computes the price impact in ticks in the direction of the swap, where one tick is 0.01%
  • Sets the swap fee to half the price impact in hundredths of a bip, with a minimum of 0.01%
  • Reverts swaps whose simulated price impact exceeds about 5%
  • Rejects pool initialization unless the pool uses a dynamic fee
Swap behaviour
On every swap, beforeSwap simulates the trade against the pool to find the post-swap tick, then overrides the swap fee to (price impact / 2) with a 0.01% floor. Swaps with more than about 5% price impact revert.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Before each swap the hook simulates the swap via a self-unlock on the pool manager to find the post-swap tick, computes tickDelta relative to the current tick in the swap direction, and sets fee = (tickDelta / 2) * 100 hundredths of a bip (one tick is 0.01%), with a minimum fee of 100 (0.01%). Swaps whose simulated slippage exceeds 1000 ticks (about 5%) revert. The fee is applied with the OVERRIDE_FEE_FLAG.
Owner & admin controls
No admin controls found. No owner, pause, upgrade or parameter setter is present in the verified source; the fee formula and 5% slippage cap are hardcoded.

Enabled Uniswap v4 callbacks

afterInitialize, beforeSwap

afterInitialize rejects pools that do not use a dynamic fee (reverts with SlippageFeeHook__NotDynamicFee). beforeSwap runs the slippage simulation and returns the computed dynamic fee for the swap.

Security & trust assessment

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

Who controls it: Fully permissionless and immutable. No privileged key can change fees, pause swaps or move funds, so centralization risk is minimal.

Risk to user funds: The hook never custodies or transfers tokens (beforeSwap returns a zero delta), so it cannot hold or move user or pool funds. Its only way to affect users is by setting the swap fee or reverting oversized swaps.

Security findings

  • [medium] Re-entrant swap simulation inside beforeSwap: The hook calls poolManager.unlock on itself and swaps against the pool inside beforeSwap to simulate the price impact, then reverts to read the tick. This is a re-entrant pool interaction during a swap, which is complex and relies on the pool manager's unlock semantics being respected.
  • [low] Large swaps are blocked by slippage cap: Swaps whose simulated price impact exceeds about 5% (tickDelta > 1000) revert with SlippageFeeHook__TooHighSlippage, so large trades in thin pools cannot execute through this hook.
  • [low] Fee depends on in-transaction pool state: The fee is derived from a simulated swap on the same pool, so an attacker could manipulate pool state within a transaction to influence the quoted fee. Impact is bounded to the fee level, since the hook never holds user funds.
  • [info] Fully immutable hook with no admin role: The fee is a pure function of the simulated tick move, not of volatility or time, and the hook is a standalone contract with no upgrade or admin path.

Contract details

Verified source
Yes (SlippageFeeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
12,776 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, self-unlock

Pools using SlippageFeeHook