Design Price Threshold Alerts for Millions of Crypto Holders
Last updated: November 29, 2026
Quick Overview
Design a system where users set alerts such as 'tell me when ETH drops below 2,800 USD' or 'BTC moves 5% in a day', evaluated against live prices and delivered by push, email and in-app within seconds.
Coinbase
November 29, 20260
0
0 solved
Design a system where users set alerts such as 'tell me when ETH drops below 2,800 USD' or 'BTC moves 5% in a day', evaluated against live prices and delivered by push, email and in-app within seconds.
Price alerts drive engagement in the Coinbase app, and crypto prices move sharply, so a single move can trigger millions of alerts at once. The interviewer is checking how you index alert thresholds so each price tick only touches alerts that fire, and how you absorb bursts in delivery.
What the Interviewer Expects
- Index alerts by asset and threshold so evaluation is a range query, not a scan
- Separate evaluation from delivery with a queue
- Handle percentage-change alerts with a reference price
- Avoid duplicate and flapping notifications
- Plan for burst fan-out during market crashes
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you handle a price that crosses the threshold and back within a second?
- How would you support alerts on portfolio value instead of one asset?
- How do you prioritize delivery when the push provider throttles you?
- How do you test that a crash does not page every user three times?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Create, edit and delete alerts per user (cap around 50). Types: price above or below X, percent change over 24 hours. Evaluate on every price update (several per second per asset). Deliver within abou...
High-Level Design
An alert service stores alerts in a database (user, asset, type, threshold, state). An evaluator consumes the internal price stream. For each asset it holds two in-memory sorted structures: 'below' th...