What is Nostr?
witty / Witty⚡
npub1qs7…f03l
2023-03-23 17:38:57

witty on Nostr: Let's dive into the 21 million cap of #Bitcoin ! This crucial aspect of Bitcoin's ...

Let's dive into the 21 million cap of #Bitcoin   ! This crucial aspect of Bitcoin's scarcity is enforced by the code itself, specifically through the block reward halving mechanism. Let's have a loo on code level.

The block reward started at 50 BTC per block and halves every 210000 blocks. This halving process continues until the reward becomes negligible, ultimately reaching the 21 million cap. This is defined by the following line of code:



To calculate the block reward at a given block height, the code uses this function:



This function calculates the number of halvings by dividing the current block nHeight by the halving interval (210,000). It then initializes the nSubsidy as 50 BTC and reduces it by half for each halving that has occurred. When halvings reach 64, the reward becomes zero.

The sum of this geometric series (50 + 25 + 12.5 + ...) converges to 100, which, when multiplied by the 210,000 block interval, results in the 21 million cap:
(50 + 25 + 12.5 + ...) * 210,000 ≈ 21,000,000 BTC

By enforcing the 21 million cap through code, #Bitcoin    ensures its scarcity, creating a predictable supply that mimics the characteristics of precious metals like gold. This makes it a desirable asset and a hedge against inflation.

#Bitcoin    #21million #DontTrustVerify





Author Public Key
npub1qs7qpgegl6v7736njakqutnx4n5fc9g7jqs3dg3acf89lll89g2q6af03l