Input
Event input
03Systems / Market Microstructure
Deterministic Rust limit-order-book and matching engine with replay, portfolio accounting, risk controls, property tests, and reproducible local benchmarks.
System architecture+3 more
A Rust event-driven simulation stack centered on price-time-priority market microstructure, deterministic replay, explicit pre-trade risk boundaries, and measured local performance.
Trading-system projects often jump to strategies or headline throughput before establishing deterministic matching, accounting, cancellation, risk controls, and testable replay.
Designed and implemented the order book, matching, replay, portfolio/risk, strategy, testing, and benchmark layers, with a Python comparison baseline.
Input
Event input
Router
Multi-symbol router
Book
Limit order book
Fills
Match / fill events
P&L
Portfolio / P&L
Risk
Risk controls
Strategy
Strategy boundary
Proof
Test / benchmark
125 ns
p50, 10K synthetic core workload (≈4.61M events/s)
Committed local Criterion benchmark. Apple M4 Pro, 24 GiB, macOS 26.5.2, rustc 1.96.0.
Local, machine-specific measurement — not a latency guarantee, an exchange measurement, or production throughput.
83 ns
p50, cancel resting order (≈3.10M events/s)
Committed local Criterion benchmark on the same machine and toolchain.
Local benchmark, same caveats.
≈1.16M events/s
Naive Python 10K baseline, same workload
Comparison baseline run on the same machine to make the Rust figure interpretable.
247
CI tests passing
Latest successful main-branch CI run 31980194986 (2026-08-16), rechecked 2026-08-18.
Point-in-time count, not a live counter.
A matching engine whose behaviour is reproducible before it is fast: the same JSONL replay produces the same fills, accounting, and risk decisions every run, and the benchmark numbers are published with the machine that produced them.