Dynamic fee hook on Arc
Uniswap v4 Hook Contract 0x8d70573b4181b265324886117d01015cbaa86a88 on Arc · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 11
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 493
What it does
A Uniswap v4 hook implementing bin-based liquidity with a volatility-driven dynamic fee and a protocol fee share, administered by an owner who can pause pools and adjust parameters.
How it works step by step
- Creates pools through the hook (createPool) and registers them in beforeInitialize, requiring an allowed bin step
- Routes liquidity into price bins with mint and burn, enforcing minimum bin liquidity
- Computes a volatility-based dynamic total fee per pool and tracks fee growth per bin
- Takes a protocol fee share of swaps via return delta and accrues it to protocolFees and treasury
- Supports global and per-pool pausing of swaps, deposits and pool creation
- Uses timelocked propose and apply flows for minimum bin liquidity and protocol share changes
- Swap behaviour
- Swaps are gated by global and per-pool pause checks, the dynamic fee is computed from volatility parameters, and the hook takes its protocol fee share through beforeSwapReturnDelta while tracking bin state and fee growth.
- Liquidity behaviour
- Liquidity is added through mint (bin-based, with minimum bin liquidity enforced) and removed through burn, both routed through the hook with beforeAddLiquidity and beforeRemoveLiquidity callbacks. Position shares and reserves are tracked per bin, and JIT fees can be forfeited on removal via forfeitJitFees.
- Fee behaviour
- Fee is computed per pool from a volatility-based total fee (getTotalFee, maxTotalFee, binFeeCarry, feeGrowth per bin), bounded by admin-set parameters. A protocol share of swap fees is taken and accrues to protocolFees and treasury; LP fees accrue as pendingLpFees. The pool's static fee is not used.
- Owner & admin controls
- Owner (Ownable, two-step transfer via transferOwnership/acceptOwnership, renounceOwnership available) can pause globally (setGlobalPaused: swaps, deposits, creation), pause individual pools (setPoolPaused), set bin step allowance (setBinStepAllowed), change volatility parameters (setVolatilityParameters), set minimum bin liquidity and protocol fee share with timelocked propose/apply/lower flows, set pool creation fee, set treasury and position manager, and collect protocol fees. Initialize is gated to the poolManager.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, beforeSwapReturnDelta
beforeInitialize: validates and registers pools created through the hook. beforeAddLiquidity: gates or checks deposits (paused state, native liquidity restrictions). beforeRemoveLiquidity: checks removal conditions and JIT fee handling. beforeSwap: enforces swap pause state, computes the dynamic fee and tracks bin state. beforeSwapReturnDelta: returns a custom delta so the hook can take its protocol fee share and implement bin-based (custom accounting) swaps.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: The owner can pause swaps, deposits or pool creation globally or per pool, change fee and volatility parameters, raise the protocol fee share through a timelock, change the treasury and position manager, and collect accrued protocol fees. A malicious or compromised key could pause users out of trading or withdrawals (pausing affects deposits and swaps) and redirect fees.
Risk to user funds: The hook holds protocol fee balances and bin reserves and takes a share of swap amounts via return delta, so user funds in the pool flow through hook accounting. Owner pausing and fee-parameter control can affect exit and entry conditions, but no direct arbitrary transfer of user funds to the owner was identified from selectors alone.
Security findings
- [medium] Owner pause controls: Owner can pause swaps and deposits globally or per pool, which can block trading and liquidity provision for users.
- [medium] Return delta takes swap value: beforeSwapReturnDelta is enabled, so the hook takes a share of swap amounts through its return delta, meaning it custodies or redirects part of user swap flows.
- [low] Owner-adjustable economics: Fee parameters, minimum bin liquidity and protocol share are owner-adjustable; propose/apply timelocks mitigate but do not remove this power.
- [info] Unverified source: Proxy/upgrade pattern is not evident from selectors, but the contract is not verified so behavior cannot be fully audited from source.
Contract details
- Verified source
- No
- Bytecode size
- 22,855 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, ownable, return-delta, self-unlock
Pools using Dynamic fee hook
- ARCH / USDC (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / ARGUS (0.25% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / VIA (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ARCH / USDC (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ARCH / USDC (0.50% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / VIA (0.25% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / FAZE (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / VIA (3.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / VIA (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / ARC (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / FAZE (4.00% fee) — 24h volume $0, TVL $0, 0 swaps today