Double-Entry Accounting for Engineers
Why double entry has survived five hundred years, assets, liabilities, equity, revenue and expenses, debits and credits without the confusion, the zero-sum invariant, the accounting equation, and modelling a wallet business as accounts.
Debits, credits and the zero-sum invariant
Double-entry bookkeeping records every movement of value twice: once where it comes from and once where it goes. For engineers, the useful form is simpler than the textbook: store signed amounts, and require every journal entry to sum to zero. Debits are positive, credits negative (or the reverse, consistently); the account type decides what a positive balance means.
| account type | examples in a wallet business | increases with |
|---|---|---|
| asset | cash at partner banks, settlement receivables, loans given | debit |
| liability | customer wallets, payables to merchants, deposits | credit |
| equity | founders' capital, retained earnings | credit |
| revenue | transfer fees, interest income | credit |
| expense | rail fees paid to NIBSS, SMS costs, bad debt | debit |
The accounting equation (assets = liabilities + equity, with revenue and expenses flowing into equity) holds automatically if every entry balances. When a customer deposits ₦10,000 by bank transfer: debit cash at bank (asset up), credit customer wallet (liability up). The bank has more money and owes more money; nothing was created.
Modelling a business as accounts
chart of accounts for a small wallet + lending business (illustrative) 1000 assets 1010 cash: partner bank A 1020 cash: partner bank B 1100 settlement receivable: card processor 1200 loans receivable 1210 interest receivable 2000 liabilities 2010 customer wallets (one sub-account per customer) 2020 merchant payables 2030 pending outbound transfers (in flight on rails) 3000 equity 4000 revenue: 4010 transfer fees, 4020 interest income 5000 expenses: 5010 rail fees, 5020 SMS, 5030 loan loss provision
Engineers who model money as a single "balance" column end up rebuilding these concepts badly: in-flight transfers, fee revenue, provisions. Name the accounts first, with the finance team, then design tables.