The problem
Settlement ran as one nightly batch. Every currency pair was reconciled by walking a month of transactions in memory, so the job grew with the calendar and failed in the hours nobody was watching. A failed run meant a day of books that could not be closed.
What it is
An append-only double-entry ledger with a projection layer. Transfers write balanced entries to a journal, and projections fold those entries into the balances and statements the finance team reads.
Constraints
- An entry is never edited or deleted. A correction is a new compensating entry.
- Every write is idempotent, keyed by the transfer's external reference.
- The read model must be rebuildable from the journal without the source systems.
- Reconciliation has to finish before the finance team starts its day.
Outcome
Month-end reconciliation fell from six hours to eleven minutes, and a failed projection is replayed rather than investigated at 2am.