A pleasant good day for everyone! I am a new user here at https://read.cash. Hope i can get a warm welcome from everyone.
I am Ray, 18 years of age from the country Philippines. Because of the pandemic, my both parents lose their jobs. So i'm trying my luck on the ineternet to find ways to help them on our expenses. My friend suggested read.cash, he told me that he is earning here by writing articles. So maybe i should also give it a try. Okay, so much for my introduction. Hope you like my article. 😆
What is Bitcoin Halving?
Bitcoin halving
An event which reduces the supply of newly bitcoins by half
It occurs every four (4) years or to be precised every 210000 blocks
Part of the validation logic in the bitcoin source code
Bitcoin halving is important to discuss as it affects miners profitability and often has impact in the bitcoin price. It is also the main reason why bitcoin is perceived as sound money. With the inflation rate steadily trending to 0 and becoming deflationary in the long run in opposite to all current fiat currencies.
For better understanding, lets discuss about how miners are rewarded for validating transactions in the bitcoin network.
Transactions in the bitcoin networks are validated and confirmed by miners using a consensus mechanism called proof of work
In proof of work, miners are constantly validating transactions and grouping them in blocks. To prove that they did the necessary work for the proof of work algorithm they try to solve a simple but laborious mathematical problem.
The first miner who solved the problem submits a new created block in the bitcoin network and is rewarded for their hard work with a block rewards that consist of two elements, transaction fees and block subsidies.
Block subsidy is the number of bitcoin that is the exact subject to bitcoin halving
Previous halving
In january 2009, when the bitcoin network started the first block called genesis block was mined. According to the algorithm, the block subsidy for the first block started form 50 bitcoins which is an arbitrary number by the creator of the network Satoshi Nakamoto.
In November 2012, bitcoin went on its first halving and the block height of 210000 where the blockn reward is cut in half from 50 to 25 bitcoin. At that time there is 10.5million bitcoins in existence.
The second halving happened on july 2016. The block height 420000. Bitcoin reward halves into 12.5bitcoin from 25. There are 15.75million bitcoins circulating in the market.
In may this year, the 3rd bitcoin halving occured. The mining rewards now is 6.5 from 12.5bitcoins. The block height is 630000. The overall bitcoin circulating is is approximately 18million.
The next halving may occurred every 4 years based on its trend until 2140 wherein the bitcoin blockchain reaches 32 halving and stops rewarsing miner with block subsidy. Thus they will rely solely on transaction fees.
Bitcoin halving matters
Sound money theory - bitcoin halving creates controlled issuance with predictable inflation and eventual deflation when all bitcoins are mined. The inflation rate before the third halving is around 2.6% and decrease to 1.8% after the third halving. It will decrease until 2140 where there will be no more new supplies of bitcoins. After that bitcoin becomes deflationary as some of the original bitcoins are lost
Price impact cause by supply shock - if demand of bitcoin is the same and the supply is cut in half. The price of bitcoin will go up. But bitcoin market is unpredictable. There is no assurance that because it happens before, it will happen again.
Rewarding early adopters - to incetivise early adopters and help bootstrapping the network, the inflation rate was the highest at the time of starting a new network. This means that every miners are able to receive the highest rewards and accumulate more bitcoins.
Code behind bitcoin halving
This code snippet is tekn from bitcoin core-github prepository from the validation of CCP that is responsible for validation.
Bitcoin halving instead of being defined as a time constant is actually defined by the number of blocks.
You can see in the snippet that the number of halving is calculated by current block height and subsidy halving interval which is constant and equal to 210000 blocks after which the halving should occured.
Assuming that the average block every 10 minutes is 210000. We can calculate roughly 4 years to mine 210000 block.
We also have if check that returns to 0 if halving greater or equal to 64 which is mostly use to protect the right shift operator that comes later. This doesn't mean that we will have 64 halving because the actual subsidy will be 0 after 32 halvings.
The next step is to get the subsidy in satoshis. Coin constant represents bitcoin in satoshis.
The final calculation is performed by right shift operator instead of division for performance reasons.
Ex: if we start with 5 billion and begin right shifting it, we can see that the maximum times that you can halve it is 32. At the 32nd attempt the reward will be 1 satoshi. And if you shift one more time, it will be give you a rsult of 0.
Based on the example, we can calculate that if one halving occurs every 4 years on average, it means mining reward will end in year 2140.
We can get to that number by using genesis block date which is january 3, 2009 and add 32 halvings multiplied by 4years and add last 4 halving . The result will be january 3, 2141 which if rounded to 2140 as the final year of bitcoin subsidy rewards.
Conclusion
Bitcoin halving is an important mechanism when it comes to bitcoin networks and monetary system.
It allows predictable decreasing inflation rate and incentivies amearly adopter fir bootstrap and securing the network.
Hope you learn something from my article. Any suggestion and questions? Please leave a comment and i will try as hard as i can to answer it.
back to back also subcribe me