Why the Bitcoin supply will never reach 21 Million
By: Joanes Espanol
Tags: API, Cryptocurrency, Bugs, Price, Bitcoin

Disclaimer: We are not talking here about lost or locked coins due to their owners forgetting they own them, losing their private keys or even sending them to the wrong wallet address (countless articles have been written about these types of mistakes, see here and here for example).

We are exploring another means by which coins are not mined properly, and what the potential impact on the total number of bitcoins this will have. But first, a quick recap on how the supply of Bitcoin is calculated.

Bitcoin supply

Bitcoin is one of the first (if not the first) scarce digital currency. The scarcity is embedded in its design, as there cannot be more than 21 million of coins created over time.

Bitcoins are earned by miners when they find the next cryptographic hash as part of the PoW protocol. The reward started with 50 bitcoins, and is halved every 210,000 blocks, which is what makes Bitcoin a scarce digital asset and will help maintain its value as a store of value and cryptocurrency for a very long time.

Bitcoins are divisible into satoshis (1 bitcoin = 100,000,000 satoshis), which means the smallest amount that a bitcoin can be divided into is 1 satoshi = 0.00000001 bitcoin. Using these facts, we can estimate when bitcoins will stop being rewarded, which is in theory when halving reaches a non divisible number of satoshis:

Bitcoin Supply (source: amberdata.io)

One thing to note here is that, because the Bitcoin developers decided to use a bit-shift operator to half the rewards each year (which makes sense since bitcoins are not infinitely divisible into satoshis), the reward is not exactly cut in half each year, but instead it is rounded down to the smallest integer each time. For example:

at block 2,100,000 the reward would have been 4,882,812.5 satoshis, but it will be instead only 4,882,812 satoshis (rounded down)

at block 2,310,000 the reward would have been 2,441,406.25 satoshis, but it will be instead only 2,441,406 satoshis (rounded down)

and so on for each halving afterwards

Based on this data, the last reward (1 satoshi) will be granted at block 6,929,999 on February 23rd of 2140, and the total supply at that time will be 20,999,999.9769 Bitcoins.

Bitcoin Supply (source: amberdata.io)

Now that we have established that the maximum Bitcoin supply is just shy of 21 million (by 0.0231 bitcoins), let’s go back to our main story.

Where did my coins go?

At Amberdata, we are all about blockchain and market data. When we added support for Bitcoin and started aggregating blocks and their transactions, we noticed some small discrepancies in the theoretical issuances. The first of these happens at block 124,724:

the issuance should have been 5,000,000,000 satoshis (50 bitcoins)

our calculation shows that it actually was 4,998,999,999 satoshis

where did the missing satoshis disappear to?

To understand what is going on, we need to take a small detour into how fees and issuances (or rewards) are awarded:

all blocks have a special transaction for the rewards and fees called the coinbase transaction

Bitcoin follows the UTXO model, meaning transactions between different wallet addresses are kept in the digital ledger in the form of inputs and outputs

the total supply of bitcoins is an invariant and should only be increased by the block reward, which means sum(inputs)+reward=sum(outputs)

miners get paid a fee for verifying and including each transaction in the next block, as well as the mining reward

From all these requirements, we end up with a few rules:

(1) fees(block) = sum(fees(transactions)) : the fees of a block is the sum of the fees for each transaction in the block

the fees of a block is the sum of the fees for each transaction in the block (2) sum(outputs(coinbase transaction)) = reward + fees (the coinbase transaction contains the reward and fees actually paid to the miner)

(the coinbase transaction contains the reward and fees actually paid to the miner) (3) reward = sum(outputs) - sum(inputs)

Let’s go back to block 124,724 (values are in satoshis):

(1) fees(124,724)=1,000,000

(2) reward=sum(outputs(coinbase transaction))-fees =4,999,999,999–1,000,000=4,998,999,999

(3) reward=sum(outputs)-sum(inputs) =21,540,999,999-16,542,000,000=4,998,999,999

The issuance on that block was short of 1,000,001 satoshis (since it should have been 5,000,000,000 satoshis) - which means the maximum supply of Bitcoin was reduced by ~1 million satoshis at this block because miners did not pay themselves the full amount they were entitled to (and these missing coins can never been reclaimed, because the new balances have been set in stone in the outputs of the transactions, and been confirmed by the many blocks added to the ledger afterwards).

How did that happen? Most likely because of bug(s) in the mining software used at the time the block was confirmed (different issues have occurred over time, because of different bugs in different mining clients).

There are several of these instances throughout the history of Bitcoin, in fact there are 1,123 such blocks at the time of writing. A few are worth looking at:

Block 501,726, which does not contain any rewards or fees → 1.25 billion satoshis (12.5 bitcoins) were not generated when they should have been.

Block 526,591 in which only 625 million satoshis (6.25 bitcoins) were generated when it should have been 1.25 billion.

So far, it is 2,895,502,904 satoshis or about 29 Bitcoins which have been lost due to bugs, which puts the maximum supply at 20,999,971.02187096 bitcoins.

Here is a view of the losses so far:

Lost satoshis (source : amberdata.io)

Conclusion

We have shown here how the supply of Bitcoin can never reached 21 million, for two reasons:

the finite number of satoshis a bitcoin can be divided into and the implementation decisions made by the Bitcoin developers

the coins which were lost throughout time due to bugs

So the actual supply of Bitcoin will never reach 21 million and cannot be more than 20,999,971.02187096 bitcoins.

In the grand scheme of things, these losses are very negligible and will not have much of an impact on anything (based on the price of Bitcoin at this time, this translates to roughly $250K). The amount of bitcoins lost due to human errors or purposefully locked at invalid addresses is far greater (estimated to be close to 4 millions).

One could argue that these 4 millions coins are not truly lost as they could one day be recovered: lost hard drive found or repaired, advances in computing power (like quantum computing), etc, while the ones we talked about in this blog post are truly lost because they were never generated in the first place.

Either way, they both, in their own way, contribute to the scarcity of Bitcoin, which may drive prices up over time.

References: