ClankerHookStaticFee on Unichain

Uniswap v4 Hook Contract 0xbc6e5abda425309c2534bc2bc92562f5419ce8cc on Unichain · Launchpad · Verified contract

Volume (24h)
$0
Value locked (TVL)
$6.21K
All-time volume
$359.86K
Pools using this hook
1,310
Swaps (24h)
0 (0 traders)
Total swaps
4,357

What it does

A Clanker launchpad hook that sets a fixed per-direction LP fee on each token pool, skims a protocol fee equal to 20% of that LP fee on the paired token for the factory, and can gate early trading through an MEV module.

This read was written for the hook 0xdd5e…68cc on Base 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

  • Pools can only be created through initializePool (factory only) or initializePoolOpen (anyone). Direct PoolManager initialization reverts with UnsupportedInitializePath, and ETH pools are rejected.
  • Each pool stores two static fees, one for buys and one for sells of the Clanker token, each capped at 30% (300000). The hook applies the matching one before every swap through updateDynamicLPFee.
  • A protocol fee equal to 20% of the LP fee is taken in the paired token. It is minted to the hook as ERC-6909 claims via before/after-swap return deltas, then sent to the factory on the next swap.
  • Before each swap it calls the pool's LP locker (if set) to collect rewards without unlocking.
  • For the first 2 minutes after pool creation, an optional MEV module is called before swaps and can disable itself. Liquidity adds are blocked while the module is active.
Swap behaviour
beforeSwap picks the fee by swap direction, sets the pool protocol fee, forwards accumulated hook fee claims to the factory, triggers the LP locker fee claim, and runs the MEV module if the pool is under 2 minutes old and the module is enabled. For exact-input buys of the Clanker token and exact-output sells, it takes the protocol fee on the paired-token side through the before-swap delta. For exact-input sells and exact-output buys, afterSwap takes the fee from the unspecified paired-token amount.
Liquidity behaviour
beforeAddLiquidity reverts with MevModuleEnabled while the MEV module is enabled and the pool is under 2 minutes old. Otherwise adds are allowed. Removals have no callback.
Fee behaviour
The pool uses the dynamic fee flag. The hook sets a static clankerFee or pairedFee per pool at creation, each at most 30%, depending on swap direction. On top of that, a protocol fee of 20% of the LP fee is skimmed on the paired token and paid out to the factory address.
Owner & admin controls
The hook is Ownable, but no onlyOwner functions appear in the provided source beyond transferOwnership and renounceOwnership, so the owner (the deployer) has no visible parameter controls. The factory alone can call initializePool and initializeMevModule. Fees are set at pool creation, and the source shows no setter to change them. The hook is not an upgradeable proxy.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize always reverts so pools can only be created through the hook's own initialize functions. beforeAddLiquidity blocks liquidity adds during the MEV module window. beforeSwap sets the fee, claims fees, triggers the locker and runs the MEV module. afterSwap takes the protocol fee on the unspecified token amount. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take the protocol fee from swap amounts.

Security & trust assessment

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

Who controls it: The owner has no visible parameter controls. The factory (an external contract) chooses the locker and MEV module for each pool and receives all protocol fees. The factory's own logic is not in the provided source.

Risk to user funds: The hook holds ERC-6909 fee claims only briefly, and the next swap sends them to the factory. It does not custody user liquidity. Users are exposed to swap reverts if the locker or MEV module reverts, and to fees up to 30% plus the protocol skim on the paired token.

Security findings

  • [info] Hook skims protocol fee via return deltas: beforeSwap and afterSwap return deltas and mint ERC-6909 claims to the hook, which are then taken to the factory. The amount is 20% of the LP fee, so at most 6% of swap value with the 30% fee cap.
  • [medium] External MEV module and locker calls in the swap path: Every swap calls the per-pool locker's collectRewardsWithoutUnlock, and swaps in the first 2 minutes call the MEV module's beforeSwap. These addresses are set by the factory. A faulty or malicious one could revert swaps. The MEV module window is limited to 2 minutes, but the locker call has no time limit.
  • [low] Liquidity adds blocked at launch: beforeAddLiquidity reverts while the MEV module is enabled and the pool is under 2 minutes old, so LPs cannot add during that window.
  • [low] Open pool creation by anyone: initializePoolOpen lets anyone create a pool with arbitrary tokens and a fee up to 30% on either side. Users should check the fee configuration of any pool they use.
  • [low] Fee math casts and unchecked edge cases: The fee calculations use int128 and int24 casts on protocolFee and amounts. The protocol fee is stored in shared storage and overwritten on each swap. These could cause rounding or edge-case problems for very large swaps, but no concrete exploit is shown.

Contract details

Verified source
Yes (ClankerHookStaticFee)
Compiler
solc 0.8.28+commit.7893614a
Bytecode size
12,558 bytes
Upgradeable proxy
No
Detected patterns
launchpad, mev-protection, ownable, return-delta

Pools using ClankerHookStaticFee