Dynamic fee hook on Optimism
Uniswap v4 Hook Contract 0x16148789addb2af0e1ee2b0e75e305e225fd0800 on Optimism · Dynamic fee
- Volume (24h)
- $13.95K
- Value locked (TVL)
- $27
- All-time volume
- $41.28K
- Pools using this hook
- 2
- Swaps (24h)
- 1,934 (54 traders)
- Total swaps
- 5,368
What it does
A Uniswap v4 hook that restricts who can add liquidity to its pool through an owner-managed allowlist and sets a dynamic LP fee.
How it works step by step
- Runs a check in beforeAddLiquidity that gates liquidity additions
- Maintains an owner-managed allowed address list via setAllowed
- Calls updateDynamicLPFee on the pool manager to adjust the LP fee
- Caps the LP fee with a MAX_LP_FEE constant
- Exposes ownership transfer via transferOwnership
- Swap behaviour
- No swap callbacks.
- Liquidity behaviour
- beforeAddLiquidity checks the allowed state and can revert liquidity additions for non-allowed callers; removal is not hooked.
- Fee behaviour
- Hook calls updateDynamicLPFee on the pool manager, indicating it sets a dynamic LP fee via the a63f2855 function; MAX_LP_FEE constant suggests a capped fee. Exact fee formula cannot be determined from bytecode alone.
- Owner & admin controls
- Owner (slot 0) can transfer ownership via transferOwnership and can whitelist addresses via setAllowed (slot 1). The allowed mapping/address gates beforeAddLiquidity, so only allowed callers or LPs can add liquidity.
Enabled Uniswap v4 callbacks
beforeAddLiquidity
beforeAddLiquidity: gates or inspects liquidity additions before they are applied to the pool.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: The owner can reassign ownership and change the allowlist, controlling who may add liquidity and possibly the fee-setting path.
Risk to user funds: The hook does not appear to hold tokens. It can block liquidity additions for non-allowed callers, and its dynamic fee setting can affect swap pricing, but it cannot be confirmed from bytecode whether it moves pool funds.
Security findings
- [medium] Owner-controlled allowlist gating liquidity: Only the owner slot is written by transferOwnership and setAllowed is callable to modify the allowlist; no timelock is visible in the bytecode.
- [info] Dynamic fee path not fully verified: The hook calls updateDynamicLPFee on the pool manager; the fee-setting logic and bounds are not fully recoverable without source, so the fee range cannot be confirmed.
- [info] No upgrade or pause functions observed: The bytecode exposes an owner and allowlist with no visible pause or upgrade mechanism, which limits the scope of admin actions.
Contract details
- Verified source
- No
- Bytecode size
- 2,015 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, ownable
Pools using Dynamic fee hook
- USDC / ETHFI (Dynamic fee) — 24h volume $13.95K, TVL $27, 1,934 swaps today
- USDC / ETHFI (0.0975% fee) — 24h volume $0, TVL $0, 0 swaps today