Dynamic fee hook on Polygon

Uniswap v4 Hook Contract 0x078058e6c831dce6815c281e185bc0307118c080 on Polygon · Dynamic fee

Volume (24h)
$0
Value locked (TVL)
<$0.01
All-time volume
$68.08K
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
2,205

What it does

A dynamic-fee hook that adjusts the pool's LP fee on each swap based on recent price volatility, so traders pay more when the market is volatile and less when it is calm.

This read was written for the hook 0x28f7…8080 on Arbitrum and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Stores per-pool volatility data keyed by pool id in a mapping
  • Computes a smoothed volatility estimate using an EWMA alpha
  • Chooses a fee tier based on volatility thresholds (moderate and high)
  • Clamps the resulting fee between MIN_FEE_BPS and MAX_FEE_BPS
  • Pushes the new fee to the pool through updateDynamicLPFee
  • Throttles updates using UPDATE_FREQUENCY
Swap behaviour
In beforeSwap the hook reads stored volatility data for the pool, computes a fee within the configured min and max bounds, and updates the pool's dynamic LP fee via the PoolManager before the swap executes.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fee is set dynamically in beforeSwap via updateDynamicLPFee on the PoolManager, using per-pool volatility data (poolVolatilityData) and exposed bounds BASE_FEE_BPS, MIN_FEE_BPS and MAX_FEE_BPS, with EWMA smoothing (EWMA_ALPHA) and update throttling (UPDATE_FREQUENCY); the exact fee formula cannot be confirmed without source.
Owner & admin controls
No admin controls found.

Enabled Uniswap v4 callbacks

beforeSwap

beforeSwap is enabled and used to compute and push a dynamic LP fee for the pool based on tracked volatility windows and thresholds; all other callbacks are disabled in the permissions.

Security & trust assessment

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

Who controls it: No owner or privileged setter selectors were identified in the dispatch table, so parameters appear fixed in bytecode; no upgrade mechanism was observed, though this is not fully confirmed.

Risk to user funds: The hook does not take custody of tokens or return deltas; it only sets the dynamic LP fee, so user funds are not directly held or moved by the hook, though fee levels affect swap costs.

Security findings

  • [info] Narrow callback surface: Only beforeSwap is enabled, so the hook does not take or hold tokens and cannot block liquidity additions or removals.
  • [low] Fee is driven by on-chain volatility state: The hook writes pool-level state (slot 0 mapping keyed by pool) during initialization and swaps, and calls updateDynamicLPFee, so fee outcomes depend on its volatility computation.
  • [info] No apparent admin pause: No pause or owner selectors were found, so no admin can halt swaps, though the absence of source means this rests on the selector scan.

Contract details

Verified source
No
Bytecode size
13,833 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee

Pools using Dynamic fee hook