Built with RSX

How Showtime divides the work across seven canisters

Showtime is a prototype exchange for OMG/USD with play balances. Six home collectors own user accounts and private orders. One matcher owns the shared order book and decides execution order.

Home collectors
  • Collector 0
  • Collector 1
  • Collector 2
  • Collector 3
  • Collector 4
  • Collector 5
OrdersResults
MatcherShared order book
Collectors keep balances, reserves, and private order records at the user’s home canister. The matcher orders work from all six collectors by price and time.

From a signed batch to an acknowledged result

A batcher queries the home collector to verify signed packs, then submits a verified block as an update. The collector checks the account’s funds and nonce, records the action against the private order and reservation, and sends the addition or cancellation to the matcher through Reactor.

The matcher applies orders to the shared book and sends result batches back to the collectors. A collector applies the results to its users in bounded chunks and acknowledges a batch once it has applied every result. The matcher records that acknowledgment through Rechain and retires the processed results in the same commit.

Where the SDK fits

Showtime uses RSX’s Rust CDK and Nyxus for persistent state, Reactor for intercanister batches, and Rechain for collector and matcher commits. Takt handles the startup task that obtains randomness. The same Wasm serves both canister roles, selected at install time.

Faster lookups with the same order priority

Showtime uses Packed128 to look up price levels. At the same price, orders retain first-in, first-out priority across all six collectors. In a separate experiment, the team packed per-order messages and replaced B-tree order-ID lookups with checked slot IDs. The experiment preserved every order’s identity and exact price and quantity effects.

Grouped orders with partial fills, instructions
13.807M → 9.257M
Cancels inside the FIFO queue, instructions
19.515M → 14.679M

Each sample processed 100 commands against a 50,000-order book. The numbers are medians of two replicated update body samples per fixture, including page charges. The experiment ran in a single PocketIC canister with its own Wasm build and measured representation work within that canister.

Backend and order-book evidence

The backend record follows the batch checkpoints across the collector and matcher. Read the backend record

The order-book experiment compares three layouts for the same fixtures and gives the Wasm pin. Read the order-book experiment

Read the Showtime benchmark Compare benchmark results