Cryptocurrency Exchange
Exchange: matching engine + throughput. CEX: order book. DEX: AMM or order book.
Matching Engine
In-memory order book (Redis), async settlement via Kafka, single-threaded for 500k–1M matches/sec.
Concentrated Liquidity
Uniswap v3: tick-based, capital efficient. Storage layout critical for gas.
DEX Issues
Sandwich attacks, MEV. Use TWAP oracle, max tick crossing limits.
Liquidity Bootstrapping
LBP: auto-decreasing weight. Uniswap v3 tight range. TWAMM.
Timelines
AMM: 3–5 months. Concentrated: 6–10 months. CEX: 8–14 months.







