Code RoomCross-currency payment double-entry
HardPrep Room Coding #3511

Cross-currency payment double-entry

System designDistributed systemsSenior–Staff~40 min

Design the double-entry postings for a cross-currency PAYMENT (not a balance conversion): a sender pays 100 EUR and the recipient receives USD, settled through your own FX inventory. Per-currency the books must each balance to zero, the FX spread must land in a P&L account, and the system must handle ~7,000 such payments/sec while staying auditable. The subtlety: a single user-facing transfer touches two currencies, so 'debits == credits' can't be checked across currencies — only within each. How do you structure the entries so each currency balances and the FX gain/loss is captured exactly?

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.

Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.