What it does
ClankerHook handles:- Automatic collection of the initial LP position’s fees. The IClankerLpLocker contracts collect the fees and route them to the ClankerFeeLocker contract for users to claim.
- Collection of a DEX-level protocol fee, separate from the creator LP fees, always in the paired token.
- Triggering the pool’s
MevModuleuntil it is disabled or expires. MEV modules can run for up to 2 minutes.
PoolManager contract after the swap completes.
Fees
The v4.0 release has two fee hook types:ClankerHookStaticFee and ClankerHookDynamicFee. For both hooks, the protocol’s DEX fee is always taken in the paired token and is always 20% of the active LP fee.
The maximum LP fee is 30% of a swap. Clanker does not recommend setting the fee this high if you want the token to work with every router. Fees that high should be reserved for esoteric use cases.
Open pool initialization
Clanker’s hooks also allow pools not created by the factory, through an “open” initialization pathway. Pools created this way don’t get automatic LP fee claiming or MEV module operations. This function reverts if called with theclanker address set to WETH, because the protocol fee is only collected on the paired token and Clanker prefers that to be WETH when possible.