The field guide · rule 06 of 16
Store money in whole numbers, and make the books balance
Never store money in a way that rounds. Use whole cents, and write down the rule that must always hold.
What it means
Computers store some decimal numbers with tiny rounding errors, and these add up. Store money as whole numbers of the smallest unit, such as cents or satoshis, or use exact decimals. Then write down the rule that must always be true, such as "money in equals money out plus what is still owed", and have the system check it automatically.
What goes wrong without it
Small rounding errors pile up until the totals no longer match the bank, and nobody can say where the difference went.
How I build it
- My finance back-office stores amounts in cents, checks that every entry balances, and refuses negative amounts. Closed months are locked, so no script can quietly change figures that were already filed.
- In my mining pool, the payouts in each block must add up exactly to the block reward, and a test proves that not a single satoshi is created or lost.
- My chain-intelligence service uses exact decimals for every money sum.
Ask your team
- Is money stored in whole units or exact decimals, never in a way that rounds?
- Is there a written rule that the totals must always meet?
- Does anything check that rule automatically?
How a review checks this
The payments check reconciles a sample of records against their source and tests the balance rule itself.
Request a reviewThe offer: Payments and ledger integrity checkCheck your system in one minute