Bitcoin mining difficulty is currently at an all-time high.
This means that it has already recovered from the last halving in May. Should miners be concerned about such swings in their ability to mine, and should miners and investors in Bitcoin be worried about what these changes mean for the future?
As Head of Operations for Genesis Mining, one of the largest Bitcoin mining operations in the world, I know this is simply a part of the ecosystem of mining. Here's why.
Mining for Bitcoin
To understand Bitcoin difficulty and why it changes, we need to first understand how mining works.
Miners use incredibly powerful hardware to solve complex mathematical problems in order to add blocks onto the blockchain. A miner starts with waiting transactions, and using those inputs, along with random data of their own, tries to find a hash that matches a certain value.
There are many miners competing at the same time to complete the puzzle. The one who finds the hash first gets to lock in that particular block on the blockchain — and is rewarded with Bitcoin for their work. This whole process takes about ten minutes per block, and then miners use input from the previous block to solve the next one.
Difficulty, then, is simply how hard or easy it is to find the hash and get your Bitcoin reward.
In order to be a more secure currency, with no threat of inflation or destabilization, Bitcoin was created to be like gold, meaning that there's only a fixed amount of Bitcoin available to mine: 21 million.
When people first began to mine Bitcoin, they could do so with a laptop in their house. But because of that fixed rate, Bitcoin protocol calls for adjustments in difficulty, and periodic halving, which is a kind of built-in inflation control. Because of increasing hashrate, or the amount of power required to find a hash, miners needed more electricity and better hardware to do what had taken just a laptop to do before.
Changes in difficulty are actually programmed into the protocol, and adjust after every 2,016 blocks created, or every two weeks. This maintains the rate of one block being created every ten minutes, and regulates the entire mining system.
In order words, if you have more miners working at higher hashrates, they're going to solve blocks in a faster time — so the protocol increases how difficult it is to solve a hash in order to slow everyone down to maintain the ten minute rate.
If there are less miners working at lower hashrates, they're going to solve blocks slower — so the protocol lowers the difficulty, making it easier and faster to hash, also maintaining that ten minute rate.
You can see how adjusting difficulty maintains an equilibrium to the whole system, and keeps the production of Bitcoin predictable and stable.
There are a few different things that can affect a change in hashrate, thereby resulting in a difficulty adjustment.
Any price fluctuation in Bitcoin is going to affect if miners want to mine. If the price of Bitcoin falls, miners may turn off their machines, thinking it won't be worth the investment. Because of that, the hashrate will fall, needing a difficulty adjustment. Or, if the price of Bitcoin starts rising, you may see an influx of miners turning on and bumping the hashrate.
Similarly, a halving is going to affect who's mining and the hashrate in the system, which is what we saw this past May. A Bitcoin halving happens around every four years, and it’s the date at which the amount of Bitcoin received as an award for hashing is cut in half. In May, the reward went from 12.5 bitcoins per block to 6.25. Now, you'll only receive half the reward for the work you put in, or you'll need to do double the work to receive the same reward as in the past.
After a halving, miners may decide that mining Bitcoin is going to take too much of an investment for any return, and may leave the system, dropping the hashrate. That's what we saw happen in May after the halving: Difficulty went down because of the drop in hashrate.
So then why did the difficulty rise again, and just hit a record high? The halving didn't affect Bitcoin prices, which have still been skyrocketing, so many of those miners who left may be back — along with upgraded equipment that will hash faster. Because of the lower difficulty after the halving, new miners may have jumped into the network, bumping the hashrate as well.
But rising difficulty is going to mean that miners need to seriously consider the state of their equipment. Older hardware isn't going to be profitable anymore, so miners will have to invest in upgrades to keep their mining efforts sustainable. Higher difficulty may force individual miners to turn off for good — or may prompt them to start looking at outsourcing their mining to farms who can easily handle the hashpower.
So, to return to the original question: Have the swings in difficulty in the past few months in Bitcoin mining been good for the system, or bad for the system…?
Actually, they've been expected, that’s all, and won’t take long to stabilize. The last halving produced a similar swing, and because the protocol is written so that difficulty adjusts as necessary, we can continue to rely on a steady production of Bitcoin, and a stable network.