Design a Market Surveillance Platform
Design a Market Surveillance Platform
Design a customer-facing market surveillance platform for financial exchanges.
Financial exchanges submit trading orders to the platform. An example order is: trader T4 places an order to buy 1 BTC at 30,000 USD.
The platform must identify potential market manipulation activity. Detection is performed by pre-built algorithms that consume incoming orders and asynchronously generate suspected manipulation events with related metadata, such as orders, traders, exchanges, timestamps, and reason codes.
There are two detection algorithms:
- Trader-keyed algorithm: every order for a given trader must be processed by the same algorithm instance.
- Exchange-keyed algorithm: every order from a given exchange must be routed to a single algorithm instance responsible for that exchange.
Additional Constraints
- Trader identifiers are globally unique across all exchanges.
- Each algorithm can be independently replicated and deployed.
- Each algorithm instance may process multiple traders or exchanges, depending on throughput capacity.
- You do not need to design the internal detection algorithms.
- The system must handle high QPS.
- The design should consider availability, reliability, durability, and scalability.
Deliverables
Design the end-to-end system, including APIs, ingestion, routing, storage, asynchronous processing, failure handling, and how suspected manipulation events are exposed to customers.
AI interview prep
Core dilemma
Balancing high-throughput, real-time order ingestion with stateful, consistently-keyed processing for manipulation detection, while ensuring fault tolerance, scalability, and reliable event delivery to customers.
3 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Design a Market Surveillance Platform
Design a Market Surveillance Platform
Design a customer-facing market surveillance platform for financial exchanges.
Financial exchanges submit trading orders to the platform. An example order is: trader T4 places an order to buy 1 BTC at 30,000 USD.
The platform must identify potential market manipulation activity. Detection is performed by pre-built algorithms that consume incoming orders and asynchronously generate suspected manipulation events with related metadata, such as orders, traders, exchanges, timestamps, and reason codes.
There are two detection algorithms:
- Trader-keyed algorithm: every order for a given trader must be processed by the same algorithm instance.
- Exchange-keyed algorithm: every order from a given exchange must be routed to a single algorithm instance responsible for that exchange.
Additional Constraints
- Trader identifiers are globally unique across all exchanges.
- Each algorithm can be independently replicated and deployed.
- Each algorithm instance may process multiple traders or exchanges, depending on throughput capacity.
- You do not need to design the internal detection algorithms.
- The system must handle high QPS.
- The design should consider availability, reliability, durability, and scalability.
Deliverables
Design the end-to-end system, including APIs, ingestion, routing, storage, asynchronous processing, failure handling, and how suspected manipulation events are exposed to customers.