Intent Netting & Batch Auction#
Phase 2 - fully designed, not yet in production.
- Netting Offsetting flows cancel out - zero solver capital needed
- UCCP Uniform pricing - every order in a batch pays the same bps
- Efficiency Up to 95% gas savings on netted settlements
Batch Pipeline#
8-Stage Batch Pipeline
POST /v1/quotes→ validates, assigns auction ID- Order Book accumulates → 2-5s batch window per corridor
- Netting Pre-Processor → detects CoW, groups batches, finds rings
- Solver Broadcast → batched bundle via WebSocket
- CIP-67 Evaluator → reference outcome → fairness filter → surplus max
- Execution →
batchClaim()for netted orders
CIP-67 Fair Winner Selection#
| Step | Name | Rule |
|---|---|---|
| 1 | Reference | Best standalone bid per order - the baseline |
| 2 | Fairness | Reject any batch bid where ANY corridor gets less surplus than reference |
| 3 | Maximize | From surviving bids, select combination maximizing total surplus |
Surplus (per order, in bps of notional): (output_received − input_paid) / limit_price × 10000
Batch score (per corridor): Σ (surplus + fee) - aggregated across orders
UCCP (uniform clearing price, bps): (input − output) / input × 10000 - identical for all orders in the batch
All three values are expressed in bps of notional - positive surplus means price improvement vs. the taker's limit. A batch is only selected if every order's surplus ≥ its reference (standalone) surplus (Fairness rule).
Netting Modes#
Netting Mode Comparison
| Feature | Simple Net | Batch Net | Intermediate Net | Ring Net |
|---|---|---|---|---|
Mechanics2 features | ||||
How | Two opposing intents matched P2P (CoW) | Same-direction aggregated at uniform price | Multi-hop sharing intermediate token | 3+ intents forming directed cycle |
Settlement | TEE atomic swap | Single batchClaim() | Solver fills, intermediate cancels | TEE-linked revelation |
Properties4 features | ||||
Solver capital | ||||
Oracle needed | ||||
Gas savings | ~95% | ~80% | ~60% | ~95% |
Complexity | Low | Low | Medium | High |
Examples per Mode#
The comparison above summarizes capital, oracle, and gas tradeoffs. The tabs below walk through one concrete example for each mode:
- Two mirror intents, same corridor, opposite directions
- P2P via TEE co-allocator - zero solver capital, no oracle
- Example: Alice: Base USDC→OP USDT, Bob: OP USDT→Base USDC
Delivery Roadmap#
| Phase | Milestone | Scope |
|---|---|---|
| 2a | Simple & Batch Netting | CoW detection, UCCP, batchClaim() |
| 2b | Intermediate & Ring | Multi-hop, cycle graphs, TEE revelation |
| 3 | Persistent Order Book | Cross-chain CLOB, full combinatorial matching |
See Also#
- Quote Pipeline - RFQ flow and selection strategies
- Settlement Flows - how netted orders settle on-chain
- Protocol Economics - how netting affects fees