Part 0 · 2 chapters · ~12 min

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.

1

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 typeexamples in a wallet businessincreases with
assetcash at partner banks, settlement receivables, loans givendebit
liabilitycustomer wallets, payables to merchants, depositscredit
equityfounders' capital, retained earningscredit
revenuetransfer fees, interest incomecredit
expenserail fees paid to NIBSS, SMS costs, bad debtdebit

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.

DOUBLE ENTRY, IN ONE TRANSFER
Ada sends ₦5,000 to Bayo with a ₦25 fee: four postings that sum to zero
Dr 5,025Cr 5,000Cr 25Ada walletliability to AdaBayo walletliability to Bayofee incomerevenuejournal entry JE-817234 postings, Σ = 0
swipe the figure sideways, or tap expand for full screen
1/5
accounts
From the bank's point of view, customer wallets are liabilities (money it owes customers); fee income is revenue; cash at the central bank is an asset. Each account has a normal balance side.
wallets are liabilities of the bankeach account type has a normal side
2

Modelling a business as accounts

code
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.