Skip to content

v0.6.0 — market-integrity release

Choose a tag to compare

@intrepidkarthi intrepidkarthi released this 23 Jul 10:46
· 221 commits to main since this release

The market-integrity release: a research-grounded threat model and the defenses it prioritized, plus durable persistence. Try it live: https://intrepidkarthi.github.io/orderbook/

Highlights

  • Durable WAL (pkg/wal) — write-ahead command log + snapshots + torn-tail-safe recovery.
  • Threat model (docs/THREAT-MODEL.md) — 27 real order-book attacks → detection → defense → core-vs-layer, each tied to a named enforcement case.
  • In-core pre-trade risk controls — fat-finger/dust caps, per-account order cap, minimum resting time, client-order-id idempotency, mark-price step + depth bounds, chunked liquidation, timed band-breach pause, randomized iceberg peaks, notional-overflow guard, HALTED/RESUMED events.
  • Surveillance (pkg/surveillance) — order-to-trade ratio, marking-the-close, ramping, pinging, and cross-book detectors.
  • Call-auction session (pkg/auction) — open/close/recovery with a replay-safe randomized close.
  • Enforcing gateway (pkg/gateway) — token-bucket rate gate + taker speed bump.

Breaking

  • Engine.SetMarkPrice now returns error (rejects a mark update violating MaxMarkStep / MinMarkDepth).

Full notes: CHANGELOG.md