Loading…
Loading…
Design the core money ledger behind a payments platform. Every customer, merchant, fee pool, and FX reserve is an account; money moves between them as transfers. The catch is that this is money — you can never lose a cent, never create one, never double-post a retried request, and you must be able to prove years later exactly how any balance came to be. The naive "UPDATE accounts SET balance = balance - amount" is the trap; the real design is an immutable double-entry journal where balances are derived, postings are atomic and idempotent, and the books always reconcile to zero.
Best after a few full reps. Expect follow-up questions, edge cases, and deeper trade-off discussion.
5 stages
40 min
Grade anytime
Workspace-first, hints visible, stage retry available. The cheap, repeatable loop — build the answer shape before you take it under pressure.
Solve once, compare against the checklist, then come back to the weak stage instead of starting over.
Strict timer, hints hidden, debrief deferred to the end. Use this once you can already structure a clean answer and want to pressure-test pacing and pushback.
Best after one structured rep · timed · focused on pacing and communication.
This is the framing pass. A strong answer quickly defines what the system must do, what quality bar it has to hit, and the numbers that will justify the rest of the design.
What must exist
What good looks like
Numbers to anchor the design
Each stage has a distinct job. Treat them like separate deliverables instead of one giant answer, and the round becomes much easier to navigate.
Define the contract clearly: the endpoints, auth boundary, error semantics, and the one or two decisions that matter most.
What you should produce
Now define the API. What endpoints does the ledger expose? Think about the post-transfer contract, how a retry is made safe, how a balance is read,...
Strong answers cover
Lay out the main components and trace the write path, read path, and any async path cleanly.
What you should walk through
Walk me through the architecture.
Strong answers cover
Let's get concrete about the schema. What does a journal entry look like, how do you guarantee a transaction is balanced, how is a balance derived, and how is money stored?
Prompt you should be ready for
Let's get concrete about the schema.
Strong answers cover
Name the first bottleneck, failure modes, and the trade-offs that keep the system fast and reliable under pressure.
What you should pressure-test
Let's stress the design. Where does it bottleneck at peak, how do you keep balance reads fast, how do you prove the books are correct, and how do y...
Strong answers cover
Translate the prompt into concrete requirements, scale, and trade-offs before drawing architecture.
Give APIs in the API stage, data models in the storage stage, and failure modes in scaling. Don't blur them together.
Grade early, compare to the reference reasoning criteria, fix the biggest misses, and re-submit the weak stage instead of starting over.
Related topics