The Bitcoin supply is fixed at 21 million units, according to its source code and as the Bitcoin whitepaper describes. Currently, the circulating supply approaches 19 million bitcoins, as miners claim rewards by finding new blocks. The mining of new blocks occurs approximately every 10 minutes. The fixed supply of bitcoin units indicates the scarceness of the digital asset as well as a mechanism to control inflation. The network will reach the hard cap of 21 million units around year 2140. At this moment, miners earn 6.25 bitcoins for every new block, while halving of the reward occurs every 4 years. The next halving will occur in 2024.
But, have you ever thought why the specific number of 21 million units is set by the code as the maximum supply?
Fixed Bitcoin Supply
The number 21,000,000 is not a parameter on a per block basis. It is a number that emerges from the way that the code issues block rewards to miners.
Every node keeps track of the block reward in every block. The consensus rules require nodes to look at the number of blocks since the genesis block and then divide that number by 210,000. Therefore, the algorithm calculates the block reward based on the number of halvings, since halvings occur every 210,000 blocks.
The first block reward was 50 bitcoins. After 210,000 blocks, block rewards reduced to 25. This sequence continues algorithmically. Nodes check that block rewards of a new block cannot exceed the current block reward, which is based on how many blocks were mined to date. Today, nodes expect to see a block reward of 6.25 bitcoins plus fees in a coinbase transaction. No one can create a block with more rewards than this value, because the network will reject the block.
Can the Code Change?
A node operator can change the code in a node. Then this node will assess information and accept blocks with bigger rewards than the rest. This would mean that this single node would go out of consensus as the network would ban it.
If many developers write a new code that allows more block rewards and follow it with their nodes, the network would fork them out. The miners who download the new code, will operate in a new Bitcoin network. This would cause a hard fork that would not follow the 21 million bitcoins rule. The majority of nodes would probably not follow this upgrade as it would violate the initial monetary principles.
To recap: every node that runs on the network, either a mining node or not, validates all the rules by running software. The software follows specific rules. If a node individually forks the code, the network will ban it. If a significant number of nodes fork it with other miners, they will create a new bitcoin fork. There are currently more than 100 forks.
Why 21 Million Bitcoins?
Some believe that the number 21 million should be 42 million. It really does not make much difference to the monetary principles.
According to email archives between Satoshi Nakamoto and Bitcoin Core contributor Mike Hearn, Satoshi claimed that if 21 million coins were used by a portion of the economy, 1 mBTC could worth €1. The statement obviously proves to be correct as 1 mBTC is now worth around €35.
In addition, there is another claim that sounds mathematically legitimate. 21 million means that the mining of blocks can occur every 10 minutes. Furthermore, block rewards can diminish over time on this rate, towards the hard cap supply limit. These parameters may have led to the decision of 21 million units.
More simply; if you add up the block rewards for all cycles (50 + 25 + 6.25 +3.125 + 1.5625…), the sum eventually equals 100. 100 multiplied by 210,000 blocks that pass for each halving, equals 21 million.
We will probably never get the definite answer of why 21 million bitcoins will ever exist. We can only thank Satoshi for its amazing invention, as Bitcoin keeps thriving through time!