Design Portfolio Value History Charts for Every User
Last updated: November 29, 2026
Quick Overview
Design the service behind the Coinbase portfolio chart, showing each user's total balance in USD over 1 day, 1 week, 1 year and all time, across all their assets, quickly on app open.
Coinbase
November 29, 20260
0
0 solved
Design the service behind the Coinbase portfolio chart, showing each user's total balance in USD over 1 day, 1 week, 1 year and all time, across all their assets, quickly on app open.
The portfolio chart is the first thing most Coinbase users see, and it combines per-user holdings history with per-asset price history. The interviewer looks for a sensible split between precomputation and on-the-fly computation, caching, and correctness when balances change.
What the Interviewer Expects
- Separate holdings history per user from price history per asset
- Choose resolution per time range (minute, hour, day)
- Precompute daily points and compute recent points on read
- Cache results with invalidation on balance change
- Handle backfills when historical trades or prices are corrected
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 would you show profit and loss rather than just value?
- How do you handle a user with 300 small token positions?
- What happens when the price of a newly listed asset has no history?
- How would you serve this to 10 million users opening the app at market open?
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
For a user, return value points for ranges: 1D at 5-minute resolution, 1W hourly, 1M and 1Y daily, all-time weekly. p99 under 300 ms, freshness within a minute for recent points. Tens of millions of u...
High-Level Design
Price service: per-asset candles at minute, hour and day resolution in a time-series store, shared by every user. Holdings service: for each user, a compact change log of balance per asset (derived fr...