Crypto Exchange — Notes
Functional
- Spot trading (and optionally margin/futures).
- Deposits / withdrawals via on-chain.
- Order book + matching.
- Market data feeds.
- KYC/AML, sanctions, travel rule.
- Staking, savings products.
Non-functional
- Strict ledger correctness.
- 99.99% trading availability.
- Custody integrity above all.
Capacity
- Big exchanges: 1M+ users active daily; 10k+ matches/s peak per popular pair.
- Many chains × many assets → many node fleets.
Schema
users(id, kyc_level, country)
accounts(user_id, asset, balance)
orders(...) like trading
deposit_addresses(user_id, chain, addr)
withdrawals(id, user_id, chain, to_addr, amount, status, tx_hash)
Trade-offs
- Internal ledger fast; on-chain slow — accounting decoupled from blockchain confirmations.
- Cold wallet majority = security at cost of operations friction.
- Heavily regulated in many jurisdictions — KYC tiering.
Refs
- Coinbase, Binance, Kraken engineering posts.
- "Crypto custody best practices" (Fireblocks, BitGo).
- Chainalysis docs on travel rule.
- ByteByteGo "Design crypto exchange".