ClankerHookStaticFeeV2 on Base

Uniswap v4 Hook Contract 0x8e7640e6bbcc483be39c9898a41dae86013368cc on Base · Dynamic fee · Verified contract

Volume (24h)
$74
Value locked (TVL)
$10.23K
All-time volume
$889.16K
Pools using this hook
32
Swaps (24h)
7 (4 traders)
Total swaps
3,098

What it does

A Clanker token pool hook that charges a fixed per-pool swap fee split by direction, takes a 5% protocol share for the factory, claims LP locker fees, and temporarily blocks liquidity adds and raises fees via an optional MEV protection module.

How it works step by step

  • Stores a fixed clanker-side LP fee and paired-side LP fee per pool, each capped at 10%, and applies the one matching swap direction via updateDynamicLPFee.
  • Takes a protocol fee equal to 5% of the LP fee, minting claims to the hook and forwarding them to the factory.
  • Claims LP locker rewards and held hook fees on each swap before executing it.
  • Blocks liquidity additions while the pool's MEV module is operational, which lasts up to 30 days after creation.
  • Allows the pool's MEV module to raise the LP fee up to 80% during its active window.
  • Optionally runs a pool extension after swaps through a try/catch so extension failures do not revert the swap.
Swap behaviour
On each swap the hook sets the LP fee to the paired or clanker fee based on direction, claims accumulated fees, runs the optional MEV module, takes the protocol fee as a return-delta adjustment on the specified or unspecified side, and optionally runs a post-swap pool extension.
Liquidity behaviour
beforeAddLiquidity reverts with MevModuleEnabled while the pool's MEV module is operational (up to 30 days after creation). Otherwise adds are allowed. No callbacks on removal.
Fee behaviour
Each pool has a fixed clanker-side LP fee and paired-side LP fee set at initialization (both capped at 10%, 100000 out of 1000000). On every swap, _setFee chooses pairedFee or clankerFee depending on swap direction and pushes it via updateDynamicLPFee. A protocol fee of 5% of the LP fee is taken by minting claims to the hook and later forwarded to the factory; a MEV module, if enabled and operational, can raise the LP fee up to 80%.
Owner & admin controls
No owner or admin role on the hook itself; the factory (immutable) is the only address that can call initializePool and initializeMevModule. The mevModuleSetFee path is restricted to the pool's assigned MEV module contract. Pool fees are set once at initialization via feeData (clankerFee and pairedFee) with no setter found in source; the contract is not upgradeable (immutable constructor parameters, no proxy).

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize reverts to force pool creation through the factory-controlled initialize functions. beforeAddLiquidity blocks adds while the MEV module is active. beforeSwap sets the dynamic LP fee, claims accumulated hook and locker fees, runs the optional MEV module, and takes the protocol fee via a specified-amount delta. afterSwap takes the protocol fee on the unspecified side, adjusts returned deltas, and runs an optional pool extension. beforeSwapReturnDelta and afterSwapReturnDelta allow these fee adjustments to alter the net swap deltas.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: The factory address is immutable and controls pool creation and MEV module initialization; the factory can also direct collected protocol fees. Owner-level control over fee parameters does not exist after deployment since fees are fixed per pool. Trust in the MEV module and pool extension contracts (set by the factory) is required, and their failures are isolated only for pool extensions via try/catch.

Risk to user funds: The hook does not custody user liquidity directly but takes a fee on each swap via return deltas and holds minted protocol claims until they are forwarded to the factory. Swap amounts can be altered by up to the configured fee (max 10% LP plus 5% protocol share, or up to 80% if the MEV module is active). Liquidity adds are blocked while the MEV module is operational.

Security findings

  • [medium] External call in beforeSwap can block swaps: The LP locker claim and hook fee claim run inside beforeSwap, so an external locker contract call happens on every swap; a reverting locker's collectRewardsWithoutUnlock would block swaps for that pool.
  • [medium] MEV module can impose high swap fees: A MEV module can raise the LP fee up to 80% for up to 30 days after pool creation, and can disable itself; the module is a separately deployed contract chosen by the factory.
  • [low] Hook holds protocol fee claims: Protocol fees are minted as ERC6909 claims to the hook and later burned and sent to the factory during beforeSwap, so the hook holds pool-manager balances on behalf of the factory.
  • [info] Return-delta fee capture: Pool fees are fixed at initialization with a 10% cap, and beforeSwapReturnDelta/afterSwapReturnDelta are used to take fees from swap amounts.
  • [info] Pool extension runs post-swap: Pool extensions run after swaps via try/catch and cannot revert the swap, but do receive full swap parameters and deltas.

Contract details

Verified source
Yes (ClankerHookStaticFeeV2)
Compiler
solc 0.8.28+commit.7893614a
Bytecode size
12,735 bytes
Upgradeable proxy
No
Detected patterns
access-control, dynamic-fee, launchpad, mev-protection, moves-currency, return-delta

Pools using ClankerHookStaticFeeV2