Design a Double-Entry Ledger for Meta Pay Balances and Transfers
Last updated: November 29, 2026
Quick Overview
Design the ledger that records every money movement for Meta Pay, including peer transfers, merchant payments, refunds, and payouts, so balances are always correct and auditable.
Meta
November 29, 20260
0
0 solved
Design the ledger that records every money movement for Meta Pay, including peer transfers, merchant payments, refunds, and payouts, so balances are always correct and auditable.
Payments infra interviews at Meta center on ledgers because correctness beats throughput. The interviewer checks double-entry invariants, immutability, idempotency, and how balances are derived and read quickly.
What the Interviewer Expects
- Model accounts and balanced journal entries
- Keep entries immutable and correct by reversal
- Make posting idempotent
- Derive balances with consistent snapshots
- Support audits and reconciliation
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 prevent overdrawing a user wallet under concurrent transfers?
- How do you correct a wrongly posted entry?
- How would you shard the ledger?
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
Functional: post transactions moving money between accounts (user wallet, merchant, processor clearing, fees, refunds); query balances and history; reverse transactions.
Non-functional: never...
High-Level Design
- Accounts table:
(account_id, type, currency, owner). - Journal: each transaction has
txn_id, idempotency key, timestamp, and two or more entries(account_id, amount, direction). Th...