The Zero Sum Fallacy

By: Justin Dragos

This post makes several references to double-entry ledgering. If you aren't familiar with traditional ledgering methods you may want to skim the Wikipedia article before reading.

Choosing double-entry

There are several compelling reasons to build a system on top of double-entry accounting. The most commonly cited are:

  1. Transactions sum to zero
  2. Account balances sum to zero
  3. Balances are a single, write-lockable number
  4. It works well with relational databases
  5. Accounts are extremely flexible

In this article, we will focus on the first two reasons. We'll discuss what they mean and why they might not offer as much protection as expected.

Fundamentals

At its core double-entry accounting is based on the idea that every time money moves, there is a single transaction that has two entries (hence the name double-entry): a credit and a debit entry. The credit increases the balance of one account, while the debit decreases the balance of a different account. In practice, a transaction looks something like this:

We subtract (debit) $100 from Account 1, and add (credit) $100 to Account 2. Importantly the credit and debit amounts need to be exact opposites so the total amount of the transaction sums to 0. This ensures that no money is ever lost. The same amount that leaves Account 1 is sure to arrive in a different account, or the transaction won't balance.

Balances

This balancing doesn't just apply to transactions, however, it also applies to account balances. If every transaction sums to zero, then the total balance of all accounts will also sum to initial balance, creating an incredibly simple way to check the integrity of the system. Let's look at an example:

Here we start with $0 balances for both accounts, then make several transactions between them. At the end when we sum up the final balance for all the accounts it still sums to $0 showing that every transaction was also balanced.

Now we have two very useful tools that require just simple addition. If all transactions sum to zero the transactions are good. If all the balances sum to the initial balance then the balances and transactions are good.

Is it enough?

Most people stop here, and I don't blame them. The zero sum guarantees are very easy to understand and appear to give you solid financial integrity checks for your system. While these checks do represent a minimum level of protection that every financial system needs to have, it only ensures that money is being recorded, but it does not guarantee the overall health of the system.

Let's look at an example:

In this example the Seller Payouts account represents money owed to one of our sellers. The Cash Out account is money that we've paid out to a seller. T1 and T2 represent correct payouts that were intended, but T3 is an accidental duplicate of T2. This means we paid out $400 more than we should have and the seller now owes us $400 back.

In this example a serious mistake happened. T3 never should have been allowed. Let's review our double entry guarantees.

Huh. Well our finances are definitely not ok, but our zero sum checks all work what's up with that?

These checks weren't designed to ensure that a business can function, or that are financially disciplined, they only care about recording money. In this case, it only cares that we know the seller now owes us $400, but isn't concerned about them getting $400 they should never have received to begin with.

The Zero Sum Fallacy

A financial system can have extreme errors and still pass all of the zero sum checks.

The zero sum fallacy is that a system passing the zero sum checks is financially sound. Not only does our system allow for unintended, free $400 loans to our sellers, but it then also reported that everything was perfectly fine.

In most companies, accountants and data scientists spend a lot of time and money trying to identify these situations where everything appears fine, but the business is actually losing money.

Most businesses require stronger verification that the system is financially sound, not just that money is being recorded. They need to ensure that the company is taking in all the money it should, and not paying out any money it shouldn't. They require what is commonly referred to as financial integrity.

Financial integrity: Checks which prove a financial system is working as intended, and make errors obvious.

Unfortunately building a system that can ensure financial integrity is very hard. In the next article Financial Integrity we will cover the core guarantees needed to ensure financial integrity and how String Theory provides those protections.

< Previous
Stick Context
Next >
Financial Integrity