Dynamic fee hook on Base
Uniswap v4 Hook Contract 0x24e081f4da1ce6f8c194a031ae7aecb7910968cc on Base · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $23
- All-time volume
- $2.10K
- Pools using this hook
- 23
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 157
What it does
A Clanker-related Uniswap v4 hook that charges a dynamic fee on swaps for tokens launched through the Clanker factory and can route part of that fee toward an MEV-protection module that is initialized per pool.
This read was written for the hook 0x2cb7…68cc on Ethereum 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
- Initializes pools created by a Clanker-style factory and records per-pool configuration such as a Clanker fee, a paired fee and a creation timestamp.
- Tracks which token of a pool is the Clanker token (clankerIsToken0) so the correct side of a swap is charged.
- Sets and updates a dynamic LP fee through the pool manager (updateDynamicLPFee), with the Clanker fee and paired fee bounded by ClankerFeeTooHigh and PairedFeeTooHigh checks.
- Supports an optional MEV-protection module (initializeMevModule, mevModuleSetFee, mevModuleOperational) that can gate liquidity additions and applies a higher LP fee capped by MAX_MEV_LP_FEE during an initial delay window.
- Runs optional pool extensions through an allowlist (poolExtensionAllowlist, _runPoolExtensionHelper) and can collect rewards (collectRewardsWithoutUnlock), with a protocol fee taken from fee revenue.
- Swap behaviour
- beforeSwap computes and applies the dynamic fee for the pool, and afterSwap runs post-swap logic including optional extensions and fee accounting. The hook uses return deltas, so it can adjust the amounts settled in a swap and take a protocol or Clanker share of the swap currency via take().
- Liquidity behaviour
- beforeAddLiquidity can restrict or gate additions while the MEV module is enabled and operational. beforeRemoveLiquidity and afterRemoveLiquidity exist as view-style checks with no state changes reported. afterAddLiquidity is present as a view function.
- Fee behaviour
- Fees are dynamic: the LP fee is set per pool through updateDynamicLPFee, using a stored Clanker fee and paired fee (each stored as a uint24). A protocol fee numerator and FEE_DENOMINATOR define the protocol's share, and the MEV module can impose a temporary higher LP fee bounded by MAX_MEV_LP_FEE and MAX_MEV_MODULE_DELAY.
- Owner & admin controls
- mevModuleSetFee and initializeMevModule are privileged setters for the MEV module fee and configuration, and mevModuleOperational toggles module state. The source is unverified, so the exact access-control modifiers (owner, factory, or other role) could not be confirmed from the bytecode. Fee caps appear enforced by constants and errors such as ClankerFeeTooHigh and PairedFeeTooHigh.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize sets up pool metadata at pool creation. beforeAddLiquidity can gate liquidity provision for MEV-protected pools. beforeSwap sets the dynamic fee for each swap. afterSwap handles post-swap accounting and extensions. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of swap currency by adjusting the returned deltas.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A privileged key that can call mevModuleSetFee, initializeMevModule or change the module operational state could raise LP fees up to the MEV cap, enable liquidity gating, and influence protocol fee revenue. The exact holder is unknown without verified source.
Risk to user funds: The hook can take currency through take() and return deltas, and it can gate liquidity additions. It does not show clear evidence of holding user funds in its own balance, but it can redirect part of swap flows and block LP entry for pools with the MEV module active.
Security findings
- [medium] Unverified source: No verified source is available, so the access-control on setters such as mevModuleSetFee, initializeMevModule and updateDynamicLPFee-related paths cannot be confirmed from the code.
- [medium] Return-delta fund capture: The hook enables beforeSwapReturnDelta and afterSwapReturnDelta and calls take(), so it can extract a share of swap currency from pool flows. The percentage and who receives it depend on stored fee values.
- [medium] Privileged fee configuration: Stored Clanker and paired fees, the MEV LP fee and the protocol fee numerator are writable through privileged paths. Bounded constants limit the maximum, but a privileged key can still change fee levels within those bounds, affecting swap costs.
- [low] Optional extension execution: _runPoolExtensionHelper executes allowlisted extension contracts during swaps, so the trust placed in those extensions extends into the hook's swap path.
- [low] Liquidity gating during MEV window: beforeAddLiquidity can block or restrict LP additions while the MEV module is operational, which could prevent liquidity provision on affected pools.
Contract details
- Verified source
- No
- Bytecode size
- 12,831 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, return-delta
Pools using Dynamic fee hook
- DCAT / DIEM (Dynamic fee) — 24h volume $0, TVL $11, 0 swaps today
- VVV / VVVDOG (Dynamic fee) — 24h volume $0, TVL $8.44, 0 swaps today
- JACKET / wtNVDA (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- VVVBRETT / VVV (Dynamic fee) — 24h volume $0, TVL $0.53, 0 swaps today
- wtSPCX / MOONBASE (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- RUSSELL / cbDOGE (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- wtNVDA / GPU (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- BASEDOLPHIN / POD (Dynamic fee) — 24h volume $0, TVL $3.09, 0 swaps today
- JACKET / wtNVDA (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- SPACEXINU / SPCXc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- TWINE / NVDAc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- BUTT / TAO (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- POKEH / NVDAc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- PENKE / CUM (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- SPCXc / NOSOUL (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- wtSPYM / MOONBASE (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- CHUBB / B420 (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- CUCK / B420 (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- PONS / cbBTC (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- wtCOIN / CHEESEBURGER (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today