Code RoomWallet balance with authorization holds
HardPrep Room Coding #3238

Wallet balance with authorization holds

System designDistributed systemsSenior–Staff~50 min

Design a digital wallet for a ride-hailing app: 80M users, peak ~12,000 debits/sec, mixing real-time ride charges, top-ups, P2P transfers, and authorization holds (a hold reserves funds at trip start and settles for the final fare at trip end). A user must never be able to spend reserved funds, and concurrent debits on the same wallet must not overdraw. Describe the balance model, how holds are represented, and how you keep available-balance correct under heavy concurrency.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify5:30 left
Estimate5:30 planned
Design16:30 planned
Deep dive13:30 planned
Failure9:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.