Bitcoin is the most amazing Mathematical Wonder or
Mathematical Miracle like Steve Wozniak said it once.
If you look at the below image you might see halving's block#, block reward and halving year. But the most interesting column in this is Binary (sats).
Let me explain why...
Many people still think that bitcoin's 21 million limit is somehow hard-coded in its source code as a "number". Yes it is set in the code but it's not set as a number or like traditionally you might assume something like
CONST INT BITCOIN_MAX_SUPPLY = 21,000,000, not it's not like that.
It's pure math and algorithm, you might be amazed if you did not know this before that 21 million limit is not set in the code anywhere. But it's the reward that "Binary (sats)" column shown below is the logic that is enforcing the 21 million bitcoin limit.
If you notice after each halving that the binary column is shirking, in C++ terms it's called shifting. Shift or right shift in binary is technically like dividing any number by 2. So after each halving reward is divided by two and that binary is making sure it's done in a style. If you don't know this already that bitcoin does not deal in floating points or decimal numbers but only integers, so for example on at 29'th halving if you see reward is reduced from 9 sats to 4 sats (instead of 4.5) it is rounded off thanks to binary for keeping it simple from 1001 to 100.
Anyway, I saw this tweet and thought of sharing it
https://twitter.com/Peer__2__Peer/status/1629844105277722625Very nice illustration.
When expressed in binary,
every halving removes a binary digit from the reward. This is equivalent to dividing by two (hence the word "halving").
The limiting value of 21,000,000 coins results from the 4-year period between halvings and the 10 minutes/block mining period.
4 years = 4 x 365.24 x 24 x 6 = 210,378.24 10-minute time slots. We round this off to
210,000 blocks.
The Bitcoin reward sequence sum 50 + 25 + 12.5 + 6.25 + ... converges to the value of
100.
The total amount of coins that can ever be created can now be computed: 210,000 x 100 =
21,000,000 coins.
This is neatly expressed in the following formula:
Satoshi Nakamoto was a genius. One cannot help but be awed by the simplicity and elegance of his creation.
Exactly, I remember I did this calculation myself using this formula. It's not that I did not trust Satoshi but I wanted to see for myself how its works.
I loved it and I was so happy to see that it's such simple math yet so powerful.
Fun Fact...
Last Full Bitcoin to be added to the network will take approx 34 years (Approx. Block 5,168,390 -> Last Reward Block)
I didn't understand what you mean by "Last Full Bitcoin to be added to the network"? and this Approx. Block 5,168,390 -> Last Reward Block?
I think last reward will be 1 satoshi and it will happen on Block #6,929,999 and after that will be zero from block# 6,930,000.
Max Coin Generated is 20,999,999.97690000 (rounding)
There's no rounding actually that's exactly what it will be 2,099,999,997,690,000 satoshis and in BTC it will be a little shy of 21 million