Overview
At deployment, up to 5 auctions can run per pool, one every 2 blocks. If an auction block passes without any valid bids, the auction is disabled and normal swaps can go through. The original design doc is on HackMD. These contracts are part of the setup:ClankerSniperAuctionV0.sol: TheIClankerMevModuleinstance running Clanker’s first version of a sniper auction.ClankerSniperUtilV0.sol: An auxiliary helper contract that shows how snipers can interact with the auction.
How it works
The auction relies on Base using priority ordering, which places transactions with higher gas fees first. Each time the auction resets, the module records the gas price and uses an inflated version as the auction’s starting gas price. The WETH payment is a multiple of the difference between the winning transaction’s gas price and the inflated gas price. The inflated gas price, next auction block and current auction round can be read from the contract and are easy to replicate off-chain. Auction payments are split 80/20 between the token’s reward recipients and the Clanker factory.Auction configuration
These auction configuration variables matter to snipers:
All of these can be queried on the
ClankerSniperAuctionV0 contract, and the Clanker team can change them with advance notice.
Auction state
These auction state variables matter to snipers and can be queried perPoolId:
Auction events
These events matter to snipers and are emitted by theClankerSniperAuctionV0 contract:
Example auction round
A pool is deployed in block 1 with a base fee of 10 gwei. The first auction round happens in block 3 with a starting auction gas price of 12 gwei. Three snipers try to snipe:- Sniper A sets their transaction gas price to 13 gwei, approves a WETH payment of 0.0001 ether and lands in block 3.
- Sniper B sets their transaction gas price to 15 gwei, approves a WETH payment of 0.0003 ether and lands in block 3.
- Sniper C sets their transaction gas price to 17 gwei, approves a WETH payment of 0.0005 ether and lands in block 4.
ClankerSniperUtilV0 contract
TheClankerSniperUtilV0 contract is a shared utility for snipers to bid in auctions, and a user-facing example of how bidding works. It handles approval spending, round management and encoding the auction swap’s hook data. Snipers are welcome to rewrite and redeploy the utility themselves, since it’s auxiliary to the auction.