It’s been hard to avoid hearing about cryptocurrencies lately, especially Bitcoin. Opinions run the gamut from it being “worthless, artificial gold” to the wave of the future and next universal currency we’ll all be using someday. Regardless of what you think about its future, the underlying technology is fascinating to people like me.
Recent reports once again question the (unverified) excessive amount of electricity being used to power Bitcoin mining operations.
The question is, of course, how does mining something that exists only as bits and bytes in a computer use so much electricity? Heck, just what is “mining” in this context, anyway?
To understand that a little better while sidestepping some of the complexity, we’ll play a game.
Become a Patron of Ask Leo! and go ad-free!
Pick a number, any number
The game works like this:
- I’ll think of a number between 1 and 1,000,000,000 (one billion).
- You try and guess that number.
- If you guess correctly, I’ll give you a dollar.
That’s it. That’s Bitcoin mining. It’s incredibly over-simplified, but fundamentally, that’s all mining is: if you guess my number correctly, you’ll “mine” one dollar.
There are a couple of additional characteristics to our game:
- You can guess as many times as you like. (Really!)
- You’re not the only person guessing.
- The first person to guess correctly gets the dollar.
Now it’s become a competition: the more quickly you can throw out guesses, the more likely you are to win.
Finally, as soon as someone wins and guesses correctly, I hand out the dollar, pick a new number, and everyone starts guessing again.
Throttling for speed
Now, I don’t want to give my dollars away too quickly — I have a limited supply — so I throttle the competition.
If I find that people are guessing too quickly, I change the rules. Instead of one billion, I’ll choose a number between one and ten billion (10,000,000,000). Theoretically, that’ll take all the guessers, on average, ten times longer to guess the right number, because there are ten times as many possibilities.
If they still guess too quickly, I’ll change it to one in one hundred billion (100,000,000,000), one in a trillion (1,000,000,000,000), and so on.
If my goal is to award one dollar per day, I’ll choose my range so it takes about that long for someone to guess the right number.
That explains how mining operates at a conceptual level: a bunch of people are trying to guess a number, and the winner gets a reward when they’re correct.
In order to understand why that takes so much electricity, we need to map it more closely to what actually happens when mining for Bitcoin.
The reward, as you might guess, is Bitcoin. The winner currently gets 12.5 BTC (Bitcoin), valued at around $87,000.00 USD.1 There’s definitely incentive to play the game.
Each “guess” isn’t just a guess, but a calculation that is a fundamental part of Bitcoin’s “blockchain” technology. Blockchain is a topic for another day, but the calculation has several characteristics:
- It’s computationally slow. It’s actually a cryptographic hash2 (hence the “crypto” in “cryptocurrency”) of Bitcoin transaction data that takes a lot of computational work.
- It’s farmed out to anyone who wants to participate in the Bitcoin transaction protocol — i.e., anyone who wants to play the game.
- The result must meet certain criteria. The system is designed such that the calculation must be performed over and over with slight variation until the criteria is met. Throttling is accomplished in this step. The criteria can be strengthened so that it takes, on average, more iterations before being met. Bitcoin aims for each “game” to last ten minutes.
- The first person to perform a calculation that meets the criteria “wins” and is given the reward.
Bitcoin mining: a CPU-intensive calculation required in a competition where the winner gets thousands of dollars. Sounds like an opportunity!
Throw hardware at it
The faster you “mine” — the faster you can perform those calculations — the more likely you are to win.
Step one is to use the fastest computer you can. High-end hardware is the order of the day. While you do stand a (teeny-tiny) chance running a Bitcoin miner on your desktop PC, this has become the realm of computers dedicated and specifically designed to perform these calculations.
Step two is to use as many computers as you can. If you have ten computers all calculating and making guesses simultaneously, you have ten times the chance of coming up with the correct answer.3
Step three is to do both: use lots of high-end computers to participate in the Bitcoin calculation game.
Of course, lots and lots of computers use lots and lots of electricity.
Throw power at it
Electricity isn’t free, but its costs vary quite a bit depending on where you are. As a result, Bitcoin (and other similar cryptocurrency) mining operations are often established in locations where electricity is cheaper.
Sometimes that’s not an issue, but occasionally it can cause a backlash as local resources and power grids are stressed to provide the required electricity.
Raising the price of electricity sounds like a solution, but the likely effect is that cryptocurrency value would increase as well, continuing to make large-scale mining operations lucrative.
Other blockchain and cryptocurrency technologies are experimenting with less resource-intensive solutions to the problem that the calculations solve, but so far, there’s no clear winner.
It would appear this game will be with us for a while.