Design a Digital Wallet
Advanced · 24 min read · Low-Level Design, Case Studies: Business Systems
Double-entry ledger, idempotent transfers, ordered locking, limits and refunds.
This is an Advanced lesson, part of Premium. What it covers:
- What the interviewer expects
- 1. Requirements
- 2. The core idea: double-entry ledger
- 3. Class design
- 4. Transfers: lock two accounts without deadlocking
- 5. Idempotency: a retried tap must not pay twice
- 6. Limits, freezing and refunds
- 7. Reconciliation
- 8. Patterns and principles used
- 9. Extensions
- Interview questions
- Further reading
Previous: Design a Hotel Booking System · Next: Choosing & Comparing Patterns