open clearing engine
an open-source, nsccl-grade clearing & settlement engine in rust.
what it is
a clearing house sits between two sides of a trade and guarantees it settles. this engine takes executed trades and turns them into regulator-grade settlement obligations, through the same pipeline a real clearing corporation uses — novation → position keeping → multilateral netting → settlement — with a span portfolio-risk engine sitting on top.
it's not a toy. it's built for determinism, reproducibility, and scale. the embedded implementations run with zero infrastructure today; the production stack (kafka/redpanda, rocksdb, clickhouse, k3s) plugs in behind the existing ports with no domain rewrite. the codebase is a cargo workspace laid out hexagonally — ports and adapters — so the financial logic never depends on the plumbing.
the clearing cycle
why event sourcing
every state change is an event. that means the whole settlement run can be replayed from the log and produce a byte-identical result — which is exactly the property a regulator or an auditor wants. it also makes the determinism tests possible: pin a golden obligation file, then prove the engine never drifts from it.
iteration 1 is complete: foundation, ports, market data, the vertical slice, span, api/cli, dashboard, and a dev deployment — all green. the deferred scaling work is enumerated with its seam in the docs. this is research and learning infrastructure, not a live clearing corporation.
built by dharun ashokkumar