It feels like as good a time as ever to get back to our roots here at The Bent. This newsletter was launched in June of 2017 in reaction to an increase in the amount of texts, emails, calls, and DMs I was receiving from my family and friends who wanted to learn more about Bitcoin. I alluded to this in Friday's issue, I am currently experiencing a similar flood of texts, calls, emails and DMs. Particularly about the upcoming halving and how it affects the Bitcoin network. So today, we're going to focus on the basics of mining and how it fits into the Bitcoin network.
Miners play a pivotal role in Bitcoin and are imperative for its continued survival and success. Without miners, new blocks would not be added to the distributed ledger, which would render the ledger defunct.
Adding blocks to the ledger is made possible through a Proof of Work algorithm based on hashcash-SHA-256 that miners run. In short, miners are engaged in a race to generate a hash that is below the difficulty target set by the network at any given point in time. This process makes it so blocks are costly to produce - it takes time and energy - but easy to verify - hashes, once produced, are easily verified with simple math that confirms they were produced using the specific hash function leveraged by the Bitcoin network.
How is the difficulty target determined, you ask?
The difficulty target is set every 2,016 blocks depending on how much faster or slower blocks are being produced in relation to the 10-minute block production target. As you can see from the 2-year charts below, Bitcoin difficulty has experienced increases and decreases that track the expansion and contraction of hash rate dedicated to the network.
As more hash rate joins the network, the pace at which hashes below the difficulty target are found increases, quickening the pace of block production. The network self-calibrates by increasing the difficulty by pushing the difficulty target to a lower threshold. (Confusing, I know.) When blocks are coming in too slow, the network self-calibrates by lowering the difficulty by pushing the difficulty target to a higher level, making it easier to discover a hash below the target.
Okay, cool. What happens when a miner does find a hash below the difficulty target?
Once a hash is found below the difficulty target, a miner, having proved it did some work to produce the hash, can now announce the block of transactions it has organized while finding the hash to the network. As the announcement, in the form of a message, propagates across the network, other miners and full nodes are checking to make sure the block of transactions is following the rules set forth by the protocol. Once it is confirmed that the block of transactions is following the rules, the block is accepted by the network, the rest of the miners start building on top of that block, and the miner who added the block is awarded the block reward, which consist of the block subsidy embedded into the protocol and the fees attached to the transactions included in the block. The block reward is realized via the coinbase transaction of the block, which a miner can spend after 100 blocks have been added on top of the block they mined.
There are some important tidbits to take away from the above paragraph. Most importantly, to your Uncle Marty, is that it is important to distinguish between the "block reward" and the "block subsidy" as many people have become comfortable with using them interchangeably. Again, the block reward is the combination of the block subsidy and the fees attached to the transactions within the block. The fees are variable depending on the demand for transacting at any given point in time. The subsidy is hardcoded into the protocol. This is where "the halving" comes into play.
Every 210,000 blocks the block subsidy gets cut in half. Hence the term "halving". The total number of bitcoins within the network isn't getting cut in half. The price at the time of the halving isn't getting cut in half. The amount of bitcoins distributed via the subsidy portion of the block reward is cut in half. Simply decreasing the rate at which newly mined bitcoins are distributed to the network.
To date, we have witnessed two halvings. One at block 210,000 that cut the subsidy from 50BTC/block to 25BTC/block and one at block 420,000 that cut the subsidy from 25BTC/block to 12.5BTC/block. At some point in the next couple of weeks, the network is expected to reach block 630,000. Once reached, the subsidy will be cut from 12.5BTC/block to 6.25BTC/block. This is why you may be hearing increased discussion about "the halving". Halvings will continue every 210,000 blocks into the future until it reaches the point where the subsidy brushes up against the 21,000,000 bitcoin cap set forth by the protocol.
I hope this is helpful. I'll be adding a "Basics" page to TFTC.io so you freaks can send your family and friends our way to answer these types of questions.
A lot of slugs on my back porch this morning. Slugs are funny things.