Status: Draft
Type: Standards Track
Category: Core
Created: 2026-01-18
Requires: CIP-20, CIP-21
Abstract
CIP-22 defines Continuous Clearing Auctions (CCAs) for Cowboy, a fair price discovery mechanism for token launches that eliminates sniping, timing games, and information asymmetry. Tokens are released gradually over time, with each block settling at a uniform clearing price. Upon auction completion, proceeds automatically seed a CIP-21 liquidity pool. This design is inspired by Uniswap’s CCA mechanism, adapted for Cowboy’s actor model with native timer integration for gas-efficient per-block clearing. Key features:- Gradual price discovery: Tokens released per-block according to a schedule
- Uniform pricing: All bidders in a block pay the same clearing price
- Anti-sniping: Early bidders achieve better average prices
- Automatic liquidity: Auction proceeds seed a V2 or V3 pool
- Composable: Validation hooks for KYC, geographic restrictions, etc.
Motivation
The Token Launch Problem
Traditional token launches suffer from well-known issues:
These mechanisms create timing games where sophisticated actors extract value from regular participants.
How CCAs Solve This
CCAs distribute tokens over time through continuous clearing:- No sniping advantage: Supply is released every block; last-minute bids get no special treatment
- Early bidder advantage: Bids placed earlier fill across more blocks at (likely) lower average prices
- Uniform block pricing: All bidders in a block pay the same price—no information asymmetry
- Gradual convergence: Market has time to discover fair value
Why CCAs on Cowboy?
Continuous Clearing Auctions require per-block processing—releasing tokens, sorting bids, calculating clearing prices. On Ethereum, this creates a keeper dependency: someone must submit a transaction each block to trigger clearing, paying gas and creating MEV opportunities.The Keeper Problem on Ethereum
Over a 7-day auction (~100,800 blocks), someone must pay for ~100,800 clearing transactions.
Cowboy’s Timer Advantage
Cowboy’s native timers (CIP-1/CIP-5) eliminate the keeper problem entirely:Specific Benefits
- Zero Keeper Infrastructure: No bots, no keeper networks, no gas subsidies. The auction actor schedules a timer once at creation; the protocol handles the rest.
- Guaranteed Execution: Cowboy reserves 20% of block capacity for timers. Even during extreme congestion, clearing executes. No “clearing got delayed because gas was too high.”
- True Per-Block Clearing: On Ethereum, if no one calls the clear function, clearing is deferred and bids see stale prices. Cowboy timers guarantee actual per-block clearing for smoother price discovery.
- Lower Total Cost: Users only pay for their bid transactions. Clearing is “free” (uses reserved timer capacity, not user-paid gas).
- Atomic Graduation: When the auction ends, a single timer callback checks the minimum raise, seeds the LP pool, and enables claims—all atomically, no separate finalization transaction.
- Reduced MEV Surface: Timer execution is deterministic and protocol-ordered. No competition over “who gets to call clear,” no sandwich opportunities around the clearing transaction.
Specification
Overview
Core Data Structures
Auction Configuration
Bid Structure
Auction State
Auction Interface
Clearing Mechanism
The core innovation of CCAs is per-block clearing. Each block:- Release tokens according to schedule
- Sort active bids by max_price (descending)
- Fill bids from highest to lowest until supply exhausted
- Set clearing price to the marginal bid’s max_price
- Pro-rata fill any bids at exactly the clearing price
Clearing Algorithm
Remaining Demand Calculation
Release Schedules
The release schedule controls how tokens are distributed over time. Common patterns:Constant Release
Front-loaded (Faster Start)
Back-loaded (Slower Start)
Graduation and Liquidity Seeding
When the auction ends successfully:Validation Hooks
CCAs support validation hooks for compliance:Example: KYC Hook
Example: Geographic Restriction Hook
Timer Integration
Cowboy’s native timers enable automatic per-block clearing:Factory
Events
Security Considerations
Price Manipulation
- TWAP resistance: Clearing price is demand-weighted, not spot-manipulable
- No flash loans: Bids are non-withdrawable while in range
- Gradual discovery: Manipulation must be sustained across many blocks
Bid Griefing
- Out-of-range withdrawal: Bids below clearing price can always be withdrawn
- No trapped funds: Failed auctions refund all currency
- Gas-efficient claims: Batch claiming supported
Hook Security
- Hooks capped at 50,000 cycles (same as CIP-20/CIP-21)
- can_claim must return true for funds to be claimable (hooks should not trap funds)
- Timelock recommended for hook updates
Integer Precision
- Q96 format for prices (matches Uniswap V3)
- Pro-rata rounding: Rounds down (conservative for users)
- Overflow checks: Max supply capped at 1e30 wei
Rationale
Why Not Dutch Auction?
Dutch auctions suffer from:- Sniping: Everyone waits for the last moment
- Winner’s curse: Early bidders overpay
- All-or-nothing: Single clearing moment
Why Not Batch Auction?
Batch auctions are good but:- Single clearing: No gradual discovery
- Timing games: Coordinate around deadline
- Less information: Market can’t observe demand curve
Why Timer-Based Clearing?
Cowboy’s native timers enable:- No keeper costs: Clearing is automatic
- Deterministic execution: Same result on all nodes
- Gas efficiency: Timer execution uses reserved block capacity
Example: Token Launch
Backwards Compatibility
This is a new standard. No backwards compatibility concerns.Reference Implementation
Seeexamples/cca/ for reference implementation.

