← Back
Home › Systems › Finance and trading

crypto-exchange

crypto exchange with custody

Coinbase

SystemTechniques · 17Primitives · 78 crypto-exchange Deterministic simulation testingdistributed · medium: Run the whole system in one thread under a seeded scheduler with simulated network, disk and clock, so every failure replays from its seed.›Primary-backup replicationdistributed · medium: One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.›Margin liquidationfinance · medium: Mark-to-market margin calls and forced liquidation of under-margined positions, incl. insurance fund and auto-deleveragingMatching enginefinance · medium: Single-threaded, deterministic loop that journals sequenced orders, matches them by price-time priority against a limit order book and emits trades.›Reorg safe chain indexingfinance · medium: Index blockchain events with confirmation depth, reorg rollback and finality trackingTotal order sequencerfinance · medium: Single sequencer stamps every inbound message so replicated deterministic state machines (LMAX style) replay identicallyCoverage-guided fuzzingsecurity · medium: Mutate inputs, run an instrumented target, and keep any input that reaches a new code edge; feedback turns blind guessing into incremental search.›Double-entry ledgerfinance · low: Append-only journal of transactions whose postings sum to zero per currency; balances are derived, so money can only move, never appear or vanish.›Money representationfinance · low: Store money as integer minor units with an explicit currency exponent, compute in wider integers, and round once with a named rounding mode.›Limit order bookfinance · low: Per-symbol store of resting orders as FIFO queues per price level; array-indexed ticks plus intrusive lists give O(1) add, cancel and best-price lookup.›Idempotency keysfinance · low: Client-chosen unique key per logical operation, stored with a request fingerprint and the final response, so retries replay the first result instead of acting twice.›Dual control approvalsecurity · low: Four-eyes / maker-checker approval with quorum policies for sensitive operationsECDSA signaturessecurity · low: The elliptic-curve signature standardised in FIPS 186-5 (P-256) and used by secp256k1 ledgers; 64-byte signatures, but a repeated or biased nonce leaks the private key.›Hdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesEvent sourcingfinance · low: Persist state changes as an append-only stream of immutable events per entity; current state is a fold over them, guarded by expected-version appends.›Hierarchical deterministic keysfinance · low: BIP-32/39/44 seed phrases and child-key derivation paths for walletsPre-trade risk checksfinance · low: Constant-time gate in front of order entry that rejects fat-finger, over-limit and runaway orders using worst-case exposure counted over open orders.›Reconciliationfinance · low: Match internal ledger records against bank and processor statements by reference, then amount and date window; every unmatched or mismatched item becomes an exception.›Process supervisionhardware-os · low: A parent process starts services, reaps their exits and restarts them under a delay and burst-limit policy, then stops them with SIGTERM before SIGKILL.›WebSocketsnetworking · low: Full-duplex message framing over one upgraded HTTP connection; the standard way to push real-time data to browsers.›Mutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Graceful drainingsystems · low: On a termination signal, stop taking new work, finish in-flight work until a deadline, tell clients to reconnect elsewhere, then exit; clients resume from a token.›Token bucketsystems · low: A bucket of up to b tokens refilled at rate r; requests spend tokens, enforcing an average rate while allowing bursts of b.›+ 10 more techniques+ 62 more primitives

Similar systems

Share the most building blocks with this one.