News anchor: 21 millionJamie Dimon: Yeah really? How do you know it's gonna stop at 21 millionWhy don’t we take a look at the math?Bitcoin's Supply FormulaLet me start by explaining this in an easier wayWe are gonna multiply the number of blocks (210000) by the number of coins each new block should print (50) which itself, will be divided by 2 which will be to the power of n, n being the halving we are at. So if we know that 2⁰=1, 2¹=2, 2²=4, and so on, we could conclude that 50/2⁰ = 50/1 = 50, 50/2¹ = 50/2 = 25, and so on, which all on itself means that at no halving we have 210000 blocks adding 50 Bitcoin to the supply and at the first halving we have 210K new blocks adding 25 and so on.So, let's do this manuallyWe are gonna start at 0 halvings210000 \ (50 / 2⁰) = 10500000*Supply so far= 10500000As you can see, we already have the first half of the whole supply, may we reach 21M soon?Lets see, why don't we add the first halving to the supply?210000 \ (50 / 2¹) = 5250000*Supply so far= 15750000 [which is the result of: 10500000 + 5250000]Wait, this is not the same, this is half of what we initially got, what if we add another halving to the supply? We might get closer210000 * (50 / 2²) = 2625000Supply so far= 18375000 [15750000+2625000]Ok, so we are getting closer, but at the same time we can't reach the goal, we have in Bitcoin's supply an example of the Zeno's Paradox where whenever you get to the half of a goal you can only move the half of the remaining distance.After halving 32 we will arrive at a supply of 20,999,999.9769 Bitcoin, not 21M as we were promised but pretty close, we could continue doing this until the 32nd halving (the last one), but then this post would be too long, so here's a simple Bitcoin Supply Calculator for you to use.Now that we have the math all figured out, let's check the codeI won't enter too much into details here because I've never been that good with code, but I'll do my best to explain this as humanly as I can.Block of code enforcing 50/2โฑCAmount nSubsidy = 50 * COIN; What this line does is multiplying the number of the parameter COIN by 50, COIN being a binary representation of 100000000 which is number of Sats, the smallest unit the Bitcoin Network recognizes and the smallest divisible unit of a Bitcoin, being this number in binary: 100101010000001011111001000000000.nSubsidy >>= halvings; This line is a “bitwise right shift” all it does is an arithmetic shift to the right by one bit, or simply put, divides by two in binary.What this does is taking the number 100101010000001011111001000000000 and remove the last number of bits, being the numbers of bits, the same number of the halving we are at the moment, for this example imagine you have a dot at the end of the number and everything that moves after said dot is removed.If nSubsidy is 0 our binary number stays the same100101010000001011111001000000000 = 5,000,000,000 units of COINIf nSubsidy is 1, we move one bit to the right, we remove the last bit by moving the whole number one space to the right, the last 0 being now after the dot and the rest of the number before it.10010101000000101111100100000000 (you can count the 0 if you want)= 2,500,000,000 units of COINIf nSubsidy is 3, which is the halving we are at at the time of writing then we move 3 bits100101010000001011111001000000 = 625,000,000 units of COINThis all the way to 32 where we end up we only 1 bit, and after that comes nothing before the hypothetical dot.if (halvings >=64) return 0; Is a bug fix, the wont be 64 halvings, it just ensures that if for any reason we ever go above 64 halvings the block subsidy forces itself to 0.Block of code enforcing an interval of 210K blocks for every reduction of the subsidyconsensus.nSubsidyHalvingInterval = 210000; This line simply ensures the halving happens every 210000 blocks.If you want a more detailed explanation you could check Unchained Capital's post about it.But they can update the code to remove the limitThere's a whole book on how a group of people tried to double the size of the blocks every two years and they couldn't, all they did was fork the network and now it's being delisted by one of the biggest exchanges for the lack of users. Nobody with at least two fingers of forehead will move to a version of Bitcoin where inflation is re-introduced when we all know the consequences of inflation.Original post on Substack ⚡ via /r/Bitcoin https://bit.ly/3XIiOVR
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment