Architecture
Auctions
The auction service runs independent loops for JIT and AOT markets. Each loop is deterministic, replayable, and exposes the exact rules we use to select winners.
JIT Loop
- Collect sealed bids for 2 seconds.
- Validate priority fee ≥ minBid (currentPriorityFee * 1.05).
- Sort by amount; highest bid wins first-price allocation.
- Emit reservation receipt + unlock lane for MEV shield.
AOT Loop
- Initialize slot auctions 35–120 slots ahead.
- Accept incremental bids until closing time.
- Anti-sniping: if bid < 30s before close, extend close by 30s.
- Clearing price becomes the winning bid; we emit a reservation + schedule.
API Surface
auction.ts
import { useAuctionStore } from '@/stores/auctionStore'
const { createJITAuction, submitJITBid } = useAuctionStore.getState()
const auction = createJITAuction(minBid)
submitJITBid(auction.auctionId, {
bidId: crypto.randomUUID(),
amount: 0.006,
priorityFee: 0.0045,
account: walletAddress,
timestamp: Date.now(),
})