What does “mining for bitcoins” really mean?

Robin Gandhi
4 min readOct 27, 2019

With all the recent news around crypto currencies, I thought I would go back to my post from 2014 and make some updates. It’s helped me to put this together and read it every time I need to explain the high level concept to someone, so hope you can use it to do the same. The whole idea around “mining” is related to the concept of “Proof of Work — PoW”, so while I focus on bitcoin here, you could apply this to other crypto coins.

So where do bitcoins come from? If you’ve been paying attention, you have probably heard that people can “mine” for bitcoins… almost as if you were deep in a mine covered in dirt searching for gold. Most people just stop there, but if you dug a bit deeper, someone may have said that “mining” is about solving a math problem. And then you would stop, because doing complex math sounds painful, and do you really want to subject yourself to this level of brain trauma?

Let me see if I can break this down to something a little more tangible.

First, the truth is that there is no physical labor involved in mining for bitcoins, and it really is about getting the answer to a math problem using computing power (which is where the labor sits).

The way that bitcoin transactions work at a high level is the following.

  1. You have bitcoins (BTC) to spend.
  2. You send your bitcoins to someone (there’s a bunch of technical stuff I’m skipping here to focus on the mining part)
  3. All of the transactions that occur (including yours) within a period of about ten minutes are grouped together (this is called a “block”).
  4. All of the blocks of transactions that happened before your block of transactions are called a “blockchain”. This new block of transactions will add to that blockchain.
  5. The only way that this blockchain can be extended is by making sure that all of the new transactions are valid and then by solving this crazy math problem through a bunch of guesses. When someone guesses the right answer, they get some bitcoins for doing this “work” (right now the reward is 6.25 BTC).
  6. Until all of these steps happen, you haven’t completed a transaction, and the point of all of this is to verify transactions in a decentralized way.

Let me stop there, and talk about this crazy math problem for a second.

Bitcoin uses something called a hash function to turn a bunch of text into a fixed length gobbledygook string of numbers and letters using complex algorithms. If you want to see what the hell I’m talking about, you can throw some text into a hash generator and see what comes out of the other side. Don’t worry about what comes out, just know that it’s a unique number and it’s always the same length.

  1. The Bitcoin network sets a target result (T) that people should try to arrive at using the hash of the previous block (A) + the transactions in the current block (B) + a random number — also called a nonce (N).
  2. The goal is for the stuff that comes after you hash all of A + B + N together to be T or lower than T, so the formula would read as follows: Hash of (A + B + N) <= T.
  3. Since you know most of the stuff already (A, B, and T), the math problem is just about figuring out what N can be. It’s freakin’ hard to say the least, and it’s about banging your head on the wall until you randomly hit the right number.
  4. For finding the right number, you get a reward of 6.25 bitcoins. Yeah!

By the way, this reward for figuring out the right answer is cut in half every 210,000 blocks, so it started at 50 BTC and as of May 11, 2020, it currently is at 6.25 BTC. There are only 21 million BTC that can ever be created. With less than 3 million BTC left to mine with the next halving likely to happen sometime in 2024, it’s time to get cracking.

But before you run to dust off your spare laptop to start making some cash, you should know that bitcoin mining is no longer something that a single person with a laptop can do. The Bitcoin network is trying to maintain about a 10 minutes buffer between the confirmation of blocks, and to do this, they make the target harder and harder to get. It’s now to the point that it takes really powerful sets of computers to mine for bitcoin.

Hope that helps, and if you have happen to know of a way to simplify this explanation even more, I would love to hear about it.

Originally Published June 2014 and updated in May 2021

--

--