ClankerSniperAuctionV2
ClankerSniperAuctionV2 is the same as ClankerSniperAuctionV0 but with fee behavior similar to that of ClankerMevDescendingFees. Deployers are able to specify a starting LP fee (up to 80%), an ending fee, and a time to descend (up to 2 minutes). Clanker's initial recommended configuration will start effective fees at 80% and descend to 5% over 30 seconds, after which the pool's normal fee behavior will commence. For the motivation behind these choices, see our v4 sniper activity writeup.
All auctioned swaps will pay the applied LP fee from the FeeConfig.startingFee
, and the fee descent will start in the block that the auction concludes in.
Initialization
ClankerSniperAuctionV2, unlike V0, requires configuration data to be passed in. The setup matches that of the ClankerMevDescendingFees module:
address clankerSniperAuctionV2; // address of the deployed mev module
IClanker.DeploymentConfig memory deploymentConfig;
// setup the mev module data
IClankerMevDescendingFees.FeeConfig memory feeConfig = IClankerMevDescendingFees.FeeConfig({
startingFee: 666777, // 66%, 80% applied fee
endingFee: 50000, // 5%
secondsToDecay: 30 // 30 seconds
});
deploymentConfig.mevModuleConfig.mevModule = address(clankerSniperAuctionV2);
deploymentConfig.mevModuleConfig.mevModuleData = abi.encode(feeConfig);
Sniper Interactions
The interface to pass in swap data changed between ClankerHook and ClankerHookV2. For a swap's hookData
to reach the Mev module, it needs to be encoded in the PoolSwapData
struct:
struct PoolSwapData {
bytes mevModuleSwapData;
bytes poolExtensionSwapData;
}
We made a new ClankerSniperUtilV2 example implementation which performs the expected encoding and works with both versions of the sniper auction.
Last updated