Dynamic fee hook on Arbitrum

Uniswap v4 Hook Contract 0x1a6e3ab9f237e0864b495eb52db6d6ae1b218080 on Arbitrum · Dynamic fee

Volume (24h)
$0
Value locked (TVL)
$1.42
All-time volume
$18.16M
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
54,060

What it does

A dynamic-fee hook that raises or lowers the swap fee for a pool based on recent price volatility so that traders pay more during turbulent periods and LPs are compensated for adverse selection.

How it works step by step

  • Stores a per-pool volatility value that is updated over time with EWMA smoothing.
  • Sets a dynamic LP fee in beforeSwap based on the current volatility tier.
  • Tiers volatility using immediate, short, medium and moderate windows and thresholds.
  • Clamps the resulting fee between a minimum and maximum basis-point bound around a base fee.
  • Calls updateDynamicLPFee on the pool manager to apply the computed fee.
Swap behaviour
beforeSwap recomputes the volatility-based fee and sets it for the swap; the swap itself is executed by the pool manager with that fee.
Liquidity behaviour
No liquidity callbacks are enabled in the permissions; add and remove liquidity selectors exist in the dispatch table but the hook flags only enable beforeSwap, so they are not invoked by the pool manager.
Fee behaviour
Sets a dynamic LP fee per swap. beforeSwap computes a volatility-based fee using a stored volatility value (poolVolatilityData, slot 0 mapping) with EWMA smoothing (EWMA_ALPHA), bounded between MIN_FEE_BPS and MAX_FEE_BPS around BASE_FEE_BPS, and applies it via updateDynamicLPFee on the pool manager. Volatility is updated in afterInitialize and beforeSwap/afterSwap paths and tiered by window and threshold constants (IMMEDIATE_WINDOW, SHORT_WINDOW, MEDIUM_SHORT_WINDOW, MEDIUM_WINDOW, MODERATE_THRESHOLD, HIGH_THRESHOLD, UPDATE_FREQUENCY).
Owner & admin controls
No admin controls found. Selectors for owner, pause, upgrade or parameter setters were not decoded; fee constants (MIN_FEE_BPS, MAX_FEE_BPS, BASE_FEE_BPS and window/threshold constants) are view getters only, so they appear fixed in bytecode.

Enabled Uniswap v4 callbacks

beforeSwap

beforeSwap is enabled and used to compute and set the dynamic LP fee for each swap.

Security & trust assessment

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

Who controls it: Decoded bytecode shows no owner or privileged setter, so no single key appears to control fees directly. Fee parameters are constants in code, meaning changes would require redeploying the hook.

Risk to user funds: The hook does not hold, move or block user or pool funds based on decoded selectors; its effect is limited to the dynamic fee applied during swaps. Exact bounds depend on constant values not fully decoded.

Security findings

  • [info] Fee derived from pool-state volatility: Fee is computed from on-chain volatility state rather than an external oracle, so it can be influenced by swap activity that moves the pool price.
  • [info] Bounded fee range: Fee is clamped between MIN_FEE_BPS and MAX_FEE_BPS, limiting the worst-case fee charged to traders and bounding LP revenue.
  • [low] No custody of pool funds: The hook does not appear to take custody of tokens or return deltas; it only sets the LP fee, so pool funds are not held by the hook.

Contract details

Verified source
No
Bytecode size
14,975 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee

Pools using Dynamic fee hook