Skip to main content
Clanker v4 is a modular framework where individual components can be swapped for new implementations as needed. The code is on GitHub.

Core contracts

Clanker v4 has three main contracts. They are non-upgradeable and stay unchanged for the lifetime of v4:
  • Clanker: The factory contract. It deploys tokens and triggers pool creation, the extensions and liquidity placement through the LpLocker.
  • ClankerFeeLocker: Lets users view and claim their accumulated token fees. This single contract accrues fees for all tokens deployed on Clanker v4.
  • ClankerToken: A Superchain-compatible ERC20 contract. A new contract is deployed for every call to deployToken().
Clanker v4 also defines four interfaces that the Clanker factory works with:
  • IClankerLpLocker: The interface liquidity lockers implement to work with the v4 factory. The implementation manages placement of LP positions and the collection and distribution of fees to the ClankerFeeLocker.
  • IClankerExtensions: The interface extensions implement to work with the v4 factory. Extensions add functionality to the token deployment process outside of LP and pool management.
  • IClankerMevModule: The interface MEV modules implement to work with the v4 factory. The Clanker team develops these modules per chain to help with MEV scenarios.
  • IClankerHook: The interface Uniswap v4 hooks implement to work with the Clanker factory. These hooks contain Clanker-specific logic, such as the protocol fee and automatic fee collection.
All implementations must be allowlisted on the Clanker factory by the Clanker team before they can be used in deployments.

Modular contracts

Clanker v4 includes the following contracts, which implement the interfaces above.

IClankerHook

v4.0
  • ClankerHook: An abstract implementation of IClankerHook. It contains Clanker’s protocol fee, automatic fee claiming, MEV module support and fee customization, which the static and dynamic hooks build on.
  • ClankerHookStaticFee: Extends ClankerHook so users can set a static fee for both the deployed token and the paired token.
  • ClankerHookDynamicFee: Extends ClankerHook so users can configure a dynamic fee that adjusts with the pool’s volatility.
v4.1

IClankerLpLocker

  • ClankerLpLockerFeeConversion: A locker that supports up to 7 reward recipients and up to 7 initial LP positions. Each recipient chooses which token they want to accumulate fees in. It works with the IClankerHook implementations to collect LP fees on every swap and distribute them to reward recipients via the ClankerFeeLocker.

IClankerExtensions

  • ClankerVault: Lets deployers vault a portion of the token supply, with an optional linear vest after unlock. The minimum lockup is 7 days.
  • ClankerAirdrop: Allocates a portion of the token supply to airdrop recipients. You supply a merkle root whose leaves contain each recipient and the amount of tokens they’re entitled to. Lockup and linear vesting options are available. The minimum lockup is 1 day.
  • ClankerAirdropV2: Similar to ClankerAirdrop, with more admin controls and the ability to change the merkle root after launch.
  • ClankerUniv4EthDevBuy: Lets the deployer make an initial swap of the token using passed-in ETH. If the paired token isn’t WETH, the paired token must have a WETH<>PairedToken Uniswap v4 pool to use this extension.

IClankerMevModule

v4.0
  • ClankerMevModule2BlockDelay: Makes the pool non-swappable for the first 2 blocks after deployment. This stops people from front-running deployments in the block they’re created.
  • ClankerSniperAuctionV0: For priority-ordered L2s. Auctions off the first swaps on a block and sends the auction fees to token creators.
v4.1
  • ClankerMevDescendingFees: Lets deployers select a starting LP fee (up to 80%), an ending fee and a duration to decay the fee over (max 2 minutes). The fee descends parabolically.
  • ClankerSniperAuctionV2: The same as ClankerSniperAuctionV0, with the fee behavior of ClankerMevDescendingFees. Auctioned swaps pay the starting fee, and the fee descent starts after the auction ends.