Very nice, but now I want to know how the miner's reward works.
In a nutshell: A miner finds a valid hash, broadcasts the candidate block + hash to the network, nodes verify the candidate block, its contents and the hash, validate the block, add it to their local copy of the blockchain, and broadcast it along to its peers.
The miner managed to add a new batch of transactions through the process finding a valid hash, which is a computational and energy-intensive task. For his efforts (and incurred costs) he is awarded the newly created bitcoin from the block he broadcasted, called "block-subsidy", as well as the fees from the transactions contained within the block, which together make up the "block reward".
reply
newly created bitcoin from the block he broadcasted
Thank you. Now I want to know:
  • how those bitcoins are created and
  • how are the number of bitcoins limited to the reward amount
reply
Every 210.000 blocks, the block-subsidy gets cut in half, where the subsidy currently sits at 6.25 BTC per block, it'll be 3.125 BTC after the coming halving, and half that after the next halving, up until the block reward is so small that the protocol doesn't register it anymore, which will cause the supply to be close to 21M coins.
It's all written down in the protocols consensus rules.
reply
now explain block templates ;-)
reply