Post
Topic
Board Development & Technical Discussion
Merits 9 from 3 users
Re: What is maximum possible number for MAX_MONEY variable?
by
Heisenberg_Hunter
on 20/03/2018, 05:16:38 UTC
⭐ Merited by achow101 (5) ,ETFbitcoin (3) ,malevolent (1)
No, I think you might be wrong in understanding the Max_Money variable. Max_Money is rather a sanity check and not the total money supply which when said in bitcoin is less than 21,000,000. This Max_Money constant is used to prevent people from doing a transaction not more than 21,000,000. For example if there happens to be a overflow bug within the network that happens to create a coin out of simple modification leads to a fork.

The total supply of btc will always be less than 21,000,000.

Code:
Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years
    nSubsidy >>= (nHeight / 210000);

Which means when the first 210000 blocks are created, the mining rewards were 50btc, and the next 210,000 blocks the reward is cut in half to 25 btc and the next 210000 blocks the reward is cut in half to 12.5 btc. This process continues till the total coins are mined out which will be equal to 20999999.9769btc which is approximately equal to 21 million.

We can even change the original value, to a higher value but it would disturb the integrity of community and the limit set by satoshi

I am not good in explaining programming techniques. Correct me if I am wrong Tongue