 The question is, can you show us code snippets of where the happening takes place? All right, this is a great question. And in order to show you this code snippets, I'm going to briefly blank my video while I show you this code snippets. And here's one I prepared earlier. Now, this code snippet comes from the Bitcoin Core client and the Bitcoin Core client software is just one of several different implementations of the Bitcoin system, but it is a dominant one. So a very large percentage, I think probably more than 80% maybe even higher of all of the nodes that are running and participating in the Bitcoin system are running Bitcoin Core, some version of Bitcoin Core. And it is the direct evolution of the software written by Satoshi Nakamoto, of course, has been very heavily modified and improved in many, many ways since then. And but it's not the only one. And this is not the only way to implement this. Other bits of code, other projects that implement the Bitcoin system, such as the Bitcoin or Bitcoin or many others, BTCD, for example, all have their own little snippet of code that does something entirely equivalent to this, and it has to be entirely equivalent. Otherwise, it would break consensus. And that node would effectively be off the network. So every time a block is evaluated, every single block that is evaluated or every time a block is mined for the first time and a candidate block is being constructed by miners, the miner must decide what block subsidy to put in the block in the Coinbase transaction. And everybody validating that block after it is broadcast on the network must compare the block subsidy that they find in the Coinbase with the expected block subsidy. And the happening happens in this particular function called get block subsidy that is found in line 1238 of validation dot CPP, C++ code in the Bitcoin Core source code. Get block subsidy returns a amount, which is an amount in Satoshi that tells other parts of the code that ask what the block subsidy should be for a specific height and a specific set of consensus parameters. In the case of Bitcoin, the one from the known Genesis block that we are comparing here, the consensus parameters tell us what the interval for halving is. And the reason that's a parameter is because you might build a test net or other chain using the same code base, which may have a different set of parameters. So all of those are tunable. In the first line, what you see is that the number of halvings, which is an integer, is defined as the current block height divided by the subsidy halving interval, which in the case of Bitcoin is 210,000. So you basically take the current block height and you divide it by 210,000. Of course, at 629,999 blocks, that will be three halvings. And at or no, sorry, two halvings. And at 630,000 block, that will be three halvings. There is then a piece of code that actually fixes a bug in the early implementation by Satoshi Nakamoto because the code continued to try to do halvings through a process of right shifting after 64 halvings happen. 64 halvings is the total number of halvings at which point the block subsidy should go to zero. So if the number of halvings required is greater than or equal to 64, then the block subsidy is zero. And that's the end of block subsidy for Bitcoin. In the next line, 1245, you see that the subsidy is defined as 50 times coin. And coin is a constant that converts Bitcoin into Satoshi. So coin is 100 million. It's just a constant in the program because everything in Bitcoin is measured in Satoshi. So 50 times coin ends up being five billion Satoshis, which is the initial subsidy of the very first block. And then the real magic happens in line 1247. In line 1247, the amount of subsidy is right shifted. This is a bitwise operation, meaning that the binary bits of the number contained in subsidy, which starts off as five billion coins, is shifted to the right by the number of halvings. So if it's shifted to the right three times, that divides it by two three times. If you shift a binary number to the right, that is the same as dividing it by two. So it's an integer division by two. It's a very fast operation because it's a binary operation and a very precise operation. You don't need to deal with floating point arithmetic or anything like that. It's simply an integer being divided by two cleanly by shifting it to the right. And then once it shifted three times the right, the number is returned and that number will be 650 million Satoshi or some number like that. I'm not going to try and do arithmetic in my head, but it's going to 625. See, I already did it wrong 625 million Satoshi, which will be the new subsidy of the block. So I hope you enjoyed that. That was analysis of some code, something we don't usually do on the Q&A, but I thought it was a great question to get us started so you can see how this actually happens under the covers. If you enjoyed this video, please subscribe, like and share. All my work is shared for free. So if you want to support it, join me on Patreon.