Design a crypto trading platform
Company: Coinbase
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design a cryptocurrency trading platform that integrates with third‑party exchanges via synchronous HTTP APIs. Address:
- Overall architecture (services, databases, messaging, third‑party connectors).
- Order lifecycle: define the state machine and transitions and how to persist and recover state.
- Why the flow is effectively asynchronous despite a 'sync' API; how you decouple submission from fills/cancellations.
- Handling third‑party timeouts and failures: retries, idempotency, deduplication, circuit breakers, dead‑letter queues, and reconciliation.
- Traffic spikes: rate limiting, backpressure, autoscaling, queueing, batching, and hot‑shard mitigation.
- Data consistency guarantees for orders, trades, and balances.
- Client‑facing APIs, SLAs, monitoring/alerting.
Quick Answer: This question evaluates a candidate's competence in system design, distributed systems, reliability engineering, and operational concerns such as idempotency, retries, reconciliation, and SLA‑aware API design when integrating with synchronous third‑party HTTP exchange APIs.