Satoshi Nakamoto defined Bitcoin’s “hard cap” as a maximum of 21 million coins.
Despite its software nature, Bitcoin’s embedded source code and the halving event prevent Bitcoin’s total supply from exceeding 21 million.
Bitcoin blocks hold transactions and provide rewards to miners, which decrease over time.
The 21 million cap stems from the block reward and its systematic halving event.
Uncovering the Bitcoin Source Code
Bitcoin’s source code is based on complex cryptographic and mathematical structures. It combines algorithms such as the SHA-256 hash function and the Elliptic Curve Digital Signature Algorithm (ECDSA) to secure transactions and maintain the integrity of the blockchain.
A prominent feature is the Proof of Work (PoW) consensus mechanism. The framework ensures network security and transaction verification. Doing PoW requires solving complex problems, creating challenges that are labor-intensive to solve, but are easy to identify.
Bitcoin 21 million hard cap
When Bitcoin’s creator, Satoshi Nakamoto, released the Bitcoin white paper in 2008, Satoshi Nakamoto set a clear limit on the supply of Bitcoins that could be minted, a total of 21 million coins. This supply cap, often called a "hard cap," is embedded in Bitcoin's programming and maintained by network nodes.
Can the supply of Bitcoin increase?
The quick answer is no. Bitcoin, like gold and real estate, has a limited supply. The “halving” event, which occurs every four years, reduces the production of new Bitcoins. By 2140, miners will reach the 21 million Bitcoin cap, after which they will earn revenue solely through transaction fees as block rewards become negligible.
Some believe that because Bitcoin is essentially software, the rules of its network can be changed effortlessly. Bitcoin’s hard cap is guaranteed by its incentive structure and governance framework. Bitcoin's protocol design ensures that those who govern its rules have an incentive to maintain the cap, while those who wish to change the cap lack network control. The game theory surrounding the Bitcoin network is to protect the supply cap rather than changing the code.
What is a Bitcoin block?
A Bitcoin block is a set of data that is added to the Bitcoin blockchain approximately every 10 minutes and contains the transactions that occurred within the network during those 10 minutes. Each block contains a collection of verified transactions that occurred within that time frame. By solving complex mathematical equations, miners or mining pools that successfully mine a block receive a "block reward."
Initially, this reward is 50 BTC. However, after 210,000 blocks are mined (approximately every 4 years), the reward amount will be halved. The reward is currently 6.25 BTC and the halving event will occur in 2024. The halving process will continue to reduce the reward and supply of Bitcoin until the reward is reduced to zero, at which point miners will only profit from transaction fees. This system ensures that the number of Bitcoins is capped at 21 million.
Understand the code behind Bitcoin supply
Bitcoin’s 21 million supply cap is not defined by a line of code, but is a result of the initial block reward and its halving event schedule.
Here's a detailed explanation of how the code works:
block reward
When Bitcoin was launched, the reward for mining a block was set at 50 BTC. This means that the reward given to miners for processing a transaction and adding it to the blockchain is 50 BTC every 10 minutes.
Halving event
The block reward is halved every time 210,000 blocks are added to the blockchain. This event is often referred to as the “halving.”
The math behind the 21 million cap
The series sum generated by the initial reward and its subsequent halvings gives us a hard cap of 21 million Bitcoins. That's it:
Genesis Block: 210,000 Blocks: 210,000 x 50 BTC = 10,500,000 BTC
First halving: 210,000 blocks (halving reward): 210,000 x 25 BTC = 5,250,000 BTC
Second halving: 210,000 blocks (halving again): 210,000 x 12.5 BTC = 2,625,000 BTC
Third halving: 210,000 blocks (halving again): 210,000 x 6.25 BTC = 1,312,500 BTC
Fourth halving: 210,000 blocks (halving again): 210,000 x 3.125 BTC = 656,250 BTC
Fifth halving: 210,000 blocks (halving again): 210,000 x 1.56 BTC = 328,125 BTC
Sixth Halving: 210,000 blocks (halving again): 210,000 x 0.78 BTC = 163,800 BTC
Bitcoin Mined: This means that by the time of the halving on Day 6, more than 99% of all Bitcoins have been mined.
If halvings continue, the total will converge to 21 million Bitcoins by 2140.
Code
The logic of reward halving is embedded in Bitcoin’s source code, and once 21 million is reached, rewards will no longer be provided to miners.
eventually halved
Eventually, the block subsidy became so small that it was rounded to zero after the halving event. At that point, no new Bitcoins are minted, and miners can only earn revenue from transaction fees. This is expected to happen sometime in 2140. The combination of block rewards and halving mechanisms ensures that there will never be more than 21 million Bitcoins in existence.
in conclusion
Bitcoin’s clever design, based on its embedded source code, ensures a limited and predictable supply cap of 21 million Bitcoins, similar to physical assets such as gold and real estate. Although not stated directly in a line of code, the logic behind this supply cap is the sum of the aggregated block rewards during the scheduled halving event.
Despite being software, the structural incentives and governance in Bitcoin's architecture act as strong safeguards, effectively preventing any changes to this cap. The culmination of these halvings will ensure that Bitcoin remains a scarce and valuable digital commodity as we approach the year 2140, when miners will be compensated purely from transaction fees.
Frequently Asked Questions
What is the significance of the 21 million Bitcoin cap?
Bitcoin’s creator, Satoshi Nakamoto, set a fixed supply limit of 21 million Bitcoins. Known as a "hard cap," it is encoded into Bitcoin's architecture and maintained by network nodes.
Can Bitcoin’s supply increase to more than 21 million?
Although Bitcoin operates as software, changing its fundamental rules is not easy. While the collective subsidy is reduced every four years, embedded code prevents supply from increasing beyond the 21 million cap.
What exactly are Bitcoin blocks?
A Bitcoin block is data added to the blockchain every 10 minutes, containing verified transactions for that period. Miners earn block rewards for their efforts, which are initially set at 50 BTC but are halved every 210,000 blocks.
How does the source code guarantee the upper limit of 21 million Bitcoins?
This cap is not explicitly stated in a single line of code. It is generated by the initial block reward and its scheduled halving. By continually halving the initial reward of 50 and multiplying the reward by the number of blocks, the cumulative amount converges to 21 million, ensuring that this cap is never exceeded. #BTC
