CLOB — Coming Soon

A fully on-chain central limit order book for prediction markets, deployed on an app-specific Arbitrum Orbit chain (L3), with the matching engine written in Rust and compiled to WASM via Arbitrum Stylus.

Building in the open. The CLOB is in active development. This page tracks the public architecture and roadmap — follow progress here and on the official Rain channels.

The vision

Order placement, cancellation, and matching are all on-chain state transitions. No off-chain matching server. That is the core trust claim — and it is literally true.

In one sentence: self-custodial, verifiable on-chain matching with Ethereum-inherited security, performance close to a CEX, and a public sequencer-decentralization roadmap.

100%
On-chain matching — verifiable from logs alone
<$0.01
Target cost per order operation
100–250ms
Target confirmation latency
10–50×
Cheaper matching via Rust/Stylus vs. equivalent Solidity

Why it matters

🔐 Self-custody, always

User funds live in audited vault contracts. Forced inclusion and forced exit via the parent chain (Arbitrum One) work from day one — even a malicious sequencer cannot trap funds.

🔍 Verifiable matching

Every match is an on-chain state transition emitting structured events. The full book can be reconstructed from logs alone — no trust in an operator's matching server.

⚡ CEX-like performance

An app-specific L3 with fast blocks plus a Stylus-native Rust engine targets sub-cent order operations and 100–250 ms confirmations — performance market makers can actually quote on.

📐 Deterministic rules

Strict price-time priority and exact, documented matching semantics. Market makers can model queue position precisely — ambiguity in matching is treated as a bug.

Architecture — four layers

From user-facing infrastructure at the top down to Ethereum-anchored settlement:

Layer 4 — MM & User Infrastructure

Market-maker & user infrastructure

Low-latency RPC/WS tier with a dedicated order gateway and streaming book feed (depth deltas + trades) · MM SDK in Rust + TypeScript (book reconstruction from events, order management, batch ops) · indexer + public API (snapshots, candles, trades, positions) · paymaster-pattern gas policy for high-frequency operations like cancels.

Layer 3 — Core Contracts

Core contracts

Matching engine (Rust/Stylus) — one order book per market, price-time priority, FIFO queues per price level, all matching emitting events sufficient to rebuild the book · Vault & outcome tokens — collateral deposits, fully collateralized YES/NO pairs (1 unit of collateral mints 1 YES + 1 NO; no leverage in v1) · Market factory & registry · Optimistic resolution module (assert → challenge window → escalation) · Fee module with maker rebates.

Layer 2 — The Orbit Chain (L3)

App-specific Arbitrum Orbit chain

Deployed on the Arbitrum Nitro stack. Fast block times tuned for order flow, with a single sequencer at launch backed by working forced inclusion and a published sequencer-decentralization roadmap.

Layer 1 — Settlement (Arbitrum One)

Settlement on Arbitrum One

The Orbit chain posts state roots here. Fraud proofs and the forced-inclusion mechanism anchor to Arbitrum One — inheriting Ethereum's security.

Matching rules — highlights

PropertyBehavior
PriorityStrict price-time priority. Better price first; within a price level, first-in-first-out. Queue position is exactly modelable.
Order typeslimit · market · post-only flag · reduce-only flag
Time-in-forceIOC (immediate-or-cancel) · FOK (fill-or-kill)
Batch opsAtomic place / cancel / replace in a single operation — built for market-maker quote updates.
DeterminismDeterministic integer arithmetic throughout. Replaying the event log reproduces the book byte-for-byte.
TransparencyEvery operation emits structured events sufficient to reconstruct the entire book off-chain from logs alone.

Roadmap

Six phases, built strictly in order — each phase gates the next.

Phase 1

Matching Engine Core

The CLOB as a standalone, deterministic Rust library — zero blockchain dependencies. Property-based testing of every matching invariant and a deterministic replay harness.

Phase 2

Stylus Port

Port the engine into an Arbitrum Stylus contract. Real gas profiling per operation against a local Nitro node, with storage layout aggressively optimized.

Phase 3

Vaults & Resolution

Collateral vaults, fully collateralized YES/NO outcome tokens, optimistic resolution with bonded challenges, and the fee module — integrated end to end.

Phase 4

Orbit Testnet

A running Orbit testnet settling to Arbitrum Sepolia. Forced inclusion wired and explicitly tested — a user can always exit, even against a censoring sequencer.

Phase 5

MM Infrastructure

Streaming book feed, order gateway, the Rust + TypeScript MM SDK, cancel-friendly gas subsidies, and market-maker economics validation on testnet.

Phase 6

Hardening & Audit

Fuzzing of the contract surface, economic attack review, mitigations for griefing vectors, external audit preparation, and bug bounty design.

Early access

Want early access as a market maker or builder? Get in touch — we're onboarding design partners for the MM SDK, the streaming book feed, and testnet liquidity programs. Reach out via the official channels at rain.one.

Until then: the existing on-chain order book in rain-sdk-v2 is live on Arbitrum One today — limit orders, cancellations, and book reads, with the same Yes/No prediction-market semantics the CLOB will scale up.