Ledger Series, Part I: The double entry Model

Most financial systems start the same way. You re building a wallet, a user has $100, they send $30 to a friend, so you write balance = balance - 30 on one row and balance = balance + 30 on the other.