Balances nobody could fully trust.
The system tracked money in a single mutable balances table that was updated in place. Over time the balances drifted from reality, there was no record of how a number got to be what it was, and month-end close had become a four-day spreadsheet reconciliation that the auditors openly disliked.
The ask was foundational: a ledger the finance team could actually trust, where any balance can be explained down to the entry that produced it.
Double-entry, append-only, derived balances.
The fix is a hundred years old: double-entry bookkeeping. Every movement is recorded as balanced debits and credits in an append-only journal that is never edited. Balances aren't stored and mutated — they're derived from the journal, so they can't silently drift. And reconciliation runs every day, not as a month-end fire drill.
We built it alongside the old system and ran them in parallel, verifying the new ledger matched reality before anyone relied on it.
A ledger, derived balances, daily reconciliation.
Built an append-only journal.
Every transaction posts balanced debits and credits as immutable entries — corrections are new reversing entries, never edits.
Derived balances instead of storing them.
Balances come from materialised views over the journal, so they always reconcile to the entries by construction.
Made the posting API idempotent.
Idempotency keys mean a retried posting never double-counts — essential when money is involved.
Automated daily reconciliation.
A job reconciles the ledger against external sources every day and flags any break immediately, instead of at month-end.
Ran it in parallel, then cut over.
Backfilled history, dual-recorded against the old table, and only cut over once the two matched to the penny.
Gave auditors a straight answer.
Any balance can be traced to the exact entries that produced it — the audit trail is the ledger itself.
Close in an afternoon, explainable to the penny.
Mutable balances table
- · balances edited in place
- · silent drift over time
- · no audit trail
- · 4-day month-end close
- · auditors unhappy
Append-only ledger
- · immutable journal entries
- · derived, self-reconciling balances
- · every balance traceable
- · half-day close
- · daily automated reconciliation
Month-end close dropped 87%, from four days to an afternoon, and the ledger has stayed 100% reconciled every day for eighteen months. When an auditor asks why a balance is what it is, the team shows them every entry behind it.