Inside the CEGOAT matching engine
2026-03-22 · Engineering
Our matching engine is a single-writer, lock-free Rust core. Orders arrive over a SPSC ringbuffer; the matching loop runs at ~12 million ops/sec on a single core.
Every order book mutation produces a deterministic event log replayable from any snapshot. We snapshot every 60 seconds and replay diffs to bring fresh replicas to the head in under 5 seconds.
We deliberately do not run the engine on a hot path with non-determinism: no allocations in the matching loop, no syscalls, no time-of-day reads. All inputs are sequenced; all outputs are signed.