Design a Multi-Currency Double-Entry Ledger for Business Accounts

Last updated: November 29, 2026

Quick Overview

Design the ledger that records every balance change for businesses holding many currencies, covering deposits, FX conversions, card spend and payouts, with strict correctness, auditability and high write throughput.

Airwallex
System Design
Software Engineer
Airwallex
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design the ledger that records every balance change for businesses holding many currencies, covering deposits, FX conversions, card spend and payouts, with strict correctness, auditability and high write throughput.

The ledger is the core of a product like Airwallex Global Accounts, so senior backend loops often probe it directly. The interviewer wants double-entry invariants, how an FX conversion is represented, how holds work for card authorizations, and how you scale writes without losing consistency.

What the Interviewer Expects
  • Uses double-entry journals where every transaction's postings net to zero per currency
  • Models an FX conversion as postings in two currencies through an FX clearing account
  • Separates available and ledger balances with holds for authorizations
  • Makes writes idempotent and append-only, with corrections as new entries
  • Explains balance computation and contention on hot accounts
  • Covers reconciliation with external bank statements
Key Topics to Cover
Double-entry accounting
Consistency
Idempotency
Sharding
Reconciliation
FX
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
  • How do you handle a hot platform account receiving thousands of postings per second?
  • A card authorization is captured for a different amount days later. Walk through the entries.
  • How do you rebuild a balance as of a past timestamp for an auditor?
  • How would you shard, and what happens to a transfer between two shards?
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

Functional: post transactions (deposit, conversion, transfer, card auth/capture/release, payout, fee), read balances per account and currency, list history, point-in-time balances. Non-functional: no ...

High-Level Design

Services call a Ledger API with an idempotency key and a transaction: a list of postings (ledger_account, currency, amount_minor, direction). The Ledger service validates that debits equal credits p...


Submit Your Answer
Markdown supported

Related Questions