Dynamic fee hook on Base
Uniswap v4 Hook Contract 0xab60e33e7af5f369607a94626c3718abbcc95000 on Base · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 129,695
What it does
A Uniswap v4 hook that lets an owner set and adjust a dynamic LP fee for a pool, capped by a maximum fee.
How it works step by step
- Initializes owner and fee state in afterInitialize when the pool is created
- Stores the current fee in a uint24 slot readable via fee()
- Allows the owner to call setFee to change the fee, subject to MAX_FEE
- Pushes fee updates into the pool through updateDynamicLPFee on the PoolManager
- Supports ownership transfer through transferOwnership
- Swap behaviour
- No swap callbacks are enabled; swap fees are applied through the dynamic fee that the owner sets via the PoolManager.
- Liquidity behaviour
- No liquidity callbacks are enabled in the permissions; the beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity selectors exist but the hook only uses afterInitialize for active logic.
- Fee behaviour
- Fee is stored in slot 0 (uint24 at offset 20), initialized in afterInitialize and adjustable by the owner through setFee, which pushes the new fee into the pool via updateDynamicLPFee on the PoolManager. A MAX_FEE getter indicates an upper bound on the fee.
- Owner & admin controls
- Owner (stored in slot 0) can transfer ownership via transferOwnership and set the pool fee via setFee, which is capped by MAX_FEE. The owner is set during the afterInitialize flow and is the only privileged role found.
Enabled Uniswap v4 callbacks
afterInitialize
afterInitialize is enabled and is used to initialize the hook state (owner and fee) when the pool is created.
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: A single owner key controls the pool fee within the MAX_FEE bound and can transfer ownership, so a compromised key could raise fees for all swappers up to the cap.
Risk to user funds: The hook does not hold or move user tokens based on the decoded functions, but an owner-set high fee up to MAX_FEE would cost swappers directly.
Security findings
- [medium] Owner-controlled dynamic fee: Owner can change the fee at any time through setFee, bounded by MAX_FEE, so swap pricing for all traders is controlled by one key.
- [low] Single-step ownership transfer: transferOwnership lets the current owner hand control to any address with no timelock or two-step confirmation visible in the bytecode.
- [info] No custody of pool funds: Hook does not appear to take custody of tokens or use return deltas; it only sets fees through the PoolManager.
Contract details
- Verified source
- No
- Bytecode size
- 3,007 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, ownable
Pools using Dynamic fee hook
- XAUG / USAD (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today