ClankerHookDynamicFeeV2 on Base
Uniswap v4 Hook Contract 0x7debe6943acefe85c4ee81aadd736466e07528cc on Base · Dynamic fee · Verified contract
- Volume (24h)
- $797
- Value locked (TVL)
- $695
- All-time volume
- $689.32K
- Pools using this hook
- 276
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 4,961
What it does
A Clanker launchpad hook that sets a volatility-based dynamic LP fee on each swap, takes a protocol fee equal to 20% of the LP fee on the paired token, and blocks liquidity adds during an early MEV-protection window.
How it works step by step
- Pools can only be created through initializePool (factory only) or initializePoolOpen (anyone). Direct PoolManager initialization reverts with UnsupportedInitializePath. All pools use the dynamic fee flag.
- Before each swap it simulates the swap via a self-call that reverts with TickReturned. It uses the estimated end tick to compute a volatility accumulator from the distance to a reference tick, then sets fee = baseFee + feeControlNumerator * volAccumulator^2 / 1e10, capped at maxLpFee (at most 10%).
- It takes a protocol fee of 20% of the current LP fee on the paired token only. The fee is minted as ERC-6909 claims to the hook and, on the next swap, burned and sent to the factory address.
- For the first 2 minutes after pool creation, an optional per-pool MEV module can raise the LP fee up to 80% and can run its own beforeSwap logic. Adding liquidity reverts during this window.
- On factory pools, each swap triggers the LP locker to collect rewards without unlocking, and can call an allowlisted pool extension after the swap. Extension failures are caught and only emitted as events.
- Swap behaviour
- beforeSwap updates the dynamic LP fee from a simulated tick move, claims accrued protocol fees to the factory, triggers the LP locker fee collection, and runs the MEV module. For swaps buying the Clanker token with exact input, or selling it with exact output, the protocol fee is taken on the paired-token amount in beforeSwap by reducing or increasing the specified amount. For the opposite cases afterSwap takes the fee from the unspecified amount via the return delta. afterSwap then runs the pool extension if one is set up and the sender is not the locker.
- Liquidity behaviour
- beforeAddLiquidity reverts with MevModuleEnabled while the pool's MEV module is operational (first 2 minutes after creation). There are no other liquidity restrictions, and no callbacks on remove.
- Fee behaviour
- LP fee is dynamic. It is the base fee (minimum 0.25%) plus a quadratic term on the tick deviation from a reference tick, capped at maxLpFee (up to 10%), with decay and reset logic over time. An MEV module can temporarily push the fee up to 80% in the first 2 minutes. A protocol fee of 20% of the LP fee is taken on the paired token, via the beforeSwap/afterSwap return deltas, and forwarded to the factory.
- Owner & admin controls
- No owner or pause function in the ABI. The factory address (immutable) is the only one that can call initializePool and initializeMevModule, and it receives all protocol fees. Per-pool settings (base fee, max LP fee, fee control, decay, reset) are set at pool creation and have no setter. The per-pool MEV module and the locker are set by the factory at creation. The hook is not an upgradeable proxy. The allowlist contract controls which pool extensions can be used, and its admin was not examined.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize blocks initialization paths other than the hook's own initializePool functions. beforeAddLiquidity blocks liquidity adds while the MEV module is operational. beforeSwap sets the dynamic fee, claims fees, runs the MEV module and takes the protocol fee on the specified amount. afterSwap takes the protocol fee on the unspecified amount and runs the pool extension. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to adjust swap amounts to collect the protocol fee.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The factory receives all protocol fees and chooses the locker, MEV module and pool extension for factory pools, so it can influence fees during the first 2 minutes and swap-time external calls. No key can change fee parameters, pause trading or upgrade the hook after pool creation.
Risk to user funds: The hook holds protocol fees only as ERC-6909 claims in the PoolManager between swaps, then sends them to the factory. It does not custody LP positions or user deposits. Swaps can be blocked if the locker or MEV module reverts, and liquidity adds are blocked for 2 minutes after creation.
Security findings
- [medium] Hook takes part of swap amounts via return deltas: beforeSwap and afterSwap return deltas divert a protocol fee (20% of the LP fee) from swappers to the hook, which forwards it to the factory. This is by design, but it raises the effective cost of trading.
- [medium] MEV module can set an 80% fee for 2 minutes: mevModuleSetFee lets the pool's assigned module raise the LP fee up to MAX_MEV_LP_FEE (800000, 80%) during the first 2 minutes after creation. Liquidity adds also revert in that window. The module is chosen by the factory and its code is external to this hook.
- [medium] Swaps depend on external contracts and a simulation: beforeSwap calls the LP locker, the MEV module and a self-simulated swap. A reverting or malicious locker or MEV module, or a failed simulation, would revert user swaps. Pool extensions are wrapped in try/catch, so they cannot block swaps.
- [low] Fee is bounded but variable: The base fee must be at least 0.25% and the max LP fee is capped at 10% outside the MEV window. Fees rise quadratically with tick deviation, so volatile conditions can reach the cap.
- [info] Open pool creation: initializePoolOpen lets anyone create a pool with arbitrary token and fee parameters within the validation bounds. These pools have no locker, MEV module or extensions.
Contract details
- Verified source
- Yes (ClankerHookDynamicFeeV2)
- Compiler
- solc 0.8.28+commit.7893614a
- Bytecode size
- 20,230 bytes
- Upgradeable proxy
- No
- Detected patterns
- access-control, dynamic-fee, launchpad, mev-protection, return-delta
Pools using ClankerHookDynamicFeeV2
- WETH / MBOT (Dynamic fee) — 24h volume $797, TVL $39, 1 swaps today
- WETH / MTX (Dynamic fee) — 24h volume $0, TVL $550, 0 swaps today
- LOLA / WETH (Dynamic fee) — 24h volume $0, TVL $1.06, 0 swaps today
- WETH / MLT (Dynamic fee) — 24h volume $0, TVL $1.79, 0 swaps today
- WETH / AGENT (Dynamic fee) — 24h volume $0, TVL $12, 0 swaps today
- WETH / MBOT (Dynamic fee) — 24h volume $0, TVL $0.04, 0 swaps today
- WETH / ART (Dynamic fee) — 24h volume $0, TVL $2.12, 0 swaps today
- WETH / GIT3 (Dynamic fee) — 24h volume $0, TVL $1.30, 0 swaps today
- WETH / ORV (Dynamic fee) — 24h volume $0, TVL $1.56, 0 swaps today
- WETH / ENTROPIC (Dynamic fee) — 24h volume $0, TVL $0.09, 0 swaps today
- PACE / WETH (Dynamic fee) — 24h volume $0, TVL $11, 0 swaps today
- WETH / CF (Dynamic fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- WETH / LFH (Dynamic fee) — 24h volume $0, TVL $0.14, 0 swaps today
- WETH / ODYSSEY (Dynamic fee) — 24h volume $0, TVL $0.28, 0 swaps today
- WETH / PTSD (Dynamic fee) — 24h volume $0, TVL $0.09, 0 swaps today
- WETH / 100% (Dynamic fee) — 24h volume $0, TVL $0.05, 0 swaps today
- GAME / WETH (Dynamic fee) — 24h volume $0, TVL $7.92, 0 swaps today
- WATCHBOT / WETH (Dynamic fee) — 24h volume $0, TVL $0.11, 0 swaps today
- WETH / TIMA (Dynamic fee) — 24h volume $0, TVL $0.08, 0 swaps today
- WETH / TOKENS (Dynamic fee) — 24h volume $0, TVL $10, 0 swaps today