Trading
Offchain Orderbook
Sub-100ms central limit order book for fast-moving sports markets.
A central limit order book (CLOB) maintained offchain for sub-100ms performance. Sports events move fast — a single NFL play can shift probability 15% in under 3 seconds.
Order types
Limit — Specify price + size. Rests on book until filled.
Market — Execute immediately at best price. Walks the book.
Reduce-Only — Can only reduce a position. Used for stop-losses.
Matching flow
- 1User signs order intent with embedded wallet
- 2API Gateway validates signature + margin
- 3Matching Engine checks risk via Risk Engine
- 4Match found → trade executed, positions updated
- 5Trade added to settlement batch queue
- 6Every ~10s, batch submitted on-chain to Clearinghouse
Why offchain? On-chain orderbooks on Base would add ~2s latency, gas per order, and MEV/frontrunning risk. Mitigation: all trades published to append-only log + periodic Merkle root commitments on-chain.
Related
- System Architecture — where the matching engine lives
- Margin & Leverage — what the risk engine checks
- Fees — maker rebates and taker fees