Design a Double-Entry Ledger for Driver Earnings and Adjustments

Last updated: November 29, 2026

Quick Overview

Design the system of record for what Uber owes each driver: fares, tips, incentives, fees, refunds, and later adjustments, such that balances are always explainable and reconcile to money actually paid out.

Uber
System Design
Software Engineer
Uber
November 29, 2026
Software Engineer
Onsite
System Design
Hard

0

0

0 solved


Design the system of record for what Uber owes each driver: fares, tips, incentives, fees, refunds, and later adjustments, such that balances are always explainable and reconcile to money actually paid out.

Money movement is a recurring Uber onsite theme because a trip touches rider charges, driver earnings, taxes, and promotions across many countries. Strong candidates treat the ledger as an immutable, double-entry log and explain correctness under retries and corrections, not just a balance column.

What the Interviewer Expects
  • Use immutable double-entry journal entries where every transaction sums to zero
  • Make posting idempotent against duplicate trip events
  • Handle corrections as new reversing entries, never edits
  • Derive balances from entries with a materialized balance for fast reads
  • Describe reconciliation against payouts and the payment processor
  • Address multi-currency amounts in minor units
Key Topics to Cover
Double-entry accounting
Idempotency
Immutable logs
Reconciliation
Hot account sharding
Multi-currency
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • A fare is adjusted three days after the payout already happened. Walk through the entries.
  • How do you shard the ledger when one account (the platform clearing account) is in every transaction?
  • How would finance get a correct end-of-day balance snapshot while posting continues?
  • How do you detect that a bug posted unbalanced entries?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Record every earning event per driver with a reason; show the driver an itemized weekly statement; support adjustments after the fact; feed payouts (weekly and instant). Correctness beats latency: no ...

High-Level Design
  • Producers (trip, tips, incentives, support refunds) emit events with a stable source_event_id.
  • Posting service turns each event into a journal transaction: a set of lines `(account_id,...

Submit Your Answer
Markdown supported