Original practice scenario: A fictional banking exercise moves a transfer through several institutions, currencies and business calendars. Design its customer-visible status model.
Read model answer +
A transfer is a multi-stage workflow with independent acknowledgements and reversals. Customer-visible states should reflect confirmed evidence instead of promising finality from an intermediate message.
Work through it
Create a stable transfer identity and append stage events with source, effective time, currency and amount; define legal transitions and unresolved states.
Separate quote acceptance, debit, intermediary progress and beneficiary confirmation, using idempotent outbound requests and reconciled inbound events.
Test duplicate callbacks, delayed confirmations, partial fees, calendar boundaries and corrections, with an exception queue for mismatched amounts or references.
Tradeoffs to discuss
A detailed state model improves transparency but must translate technical stages into understandable customer messages.
Common pitfalls
Do not label an intermediary acknowledgement as final settlement.
Keep synthetic conversion rates and calendars explicit rather than implying current banking rules.
Original practice scenario: A simulated bank ledger records original currency amounts and translated reporting amounts. Explain a query that checks daily reconciliation without mixing units.
Read model answer +
Reconcile each ledger in its own currency before comparing translated reporting totals. An amount without currency, rate version and effective date is not a safely aggregatable measure.
Work through it
Check debit-credit balance at journal and currency grain, using exact decimal or integer minor units; group account movements separately by currency and reporting date.
Join translation rates through unique versioned keys and retain their valuation dates; quarantine missing or duplicate rate mappings.
Reconcile each account's opening balance plus net movements to its closing balance, investigate journal residuals, and test reversals, rounding and late-posted entries.
Tradeoffs to discuss
Stored translated values preserve historical reports; recalculation can support corrected valuations only when its purpose and version are explicit.
Common pitfalls
Do not sum unrelated currencies into one numeric total.
A rounded reporting difference should not silently alter the underlying ledger entries.