Protocol
SB Core

Order Book

On-chain CLOB structure, matching, and transparency

Structure

SB Chain maintains one order book per asset pair. Any two assets can form a market without permission. Orders are stored as on-chain objects (1.7.x), each recording seller, amount_to_sell, min_to_receive, expiration, fill_or_kill, and optional on_fill actions. Price is derived as amount_to_sell / min_to_receive. Minimum price and quantity increments are determined by asset precision.

Matching

Orders execute on price-time priority: best price fills first (highest bid against lowest ask); at equal prices, the earliest order (lowest object ID) fills first. Orders matched within the same block are considered simultaneous — no intra-block front-running advantage.

Block-Level Transaction Ordering

Within each block, operations are processed in inclusion order. Witnesses determine transaction ordering in the block they produce. All operations in a transaction execute atomically. Fills emit virtual fill_order_operation records in the same block. Cancelled or expired orders are cleaned up at maintenance intervals or on explicit cancel.

On-Chain Transparency

The complete order book for any market is publicly queryable via database_api at any time. Fill history is permanently recorded via virtual fill_order_operation entries in account history. No hidden orders, no dark pools, no preferential routing.