Bitcoin Mining Explained

Bitcoin Mining can be extremely confusing. What is the purpose behind it and why is it essential? These are the questions we answer on three different difficulty levels. From beginner to advanced to the Bitcoin veteran.

Till MusshoffTill Musshoff
Time to Read Article 4 minute read
Article Published Date August 22, 2021
Down Arrow
This is a continuation of a 3 part series describing Bitcoin mining in three different difficulty levels. You are now on Advanced

Finding the correct number allows you decide which bitcoin transactions you want included into the new block.

The miner that correctly guessed the number usually takes the bitcoin transactions that have the highest fees in them to add into the block. This is because in addition to the block reward, the miner collects the fees associated with all the bitcoin transactions as well.

Alternatively, the miner could also deliberately not include a transaction as a way to censor it. This transaction would remain in the memory pool until another miner includes it after winning the lottery.

Bitcoin transactions in mempool

What makes the somewhat constant 10 minute block rule possible is the dynamic difficulty adjustment of the algorithm. This is the most underappreciated aspect of Bitcoin.

The difficulty adjustment

No matter how much computing power the entire Bitcoin Network has, the block confirmation time stays at around 10 minutes.

To ensure this, every 2016 blocks (~2 weeks) there is a check if the average clearance has been higher or lower than 10 minutes during this time period. The difficulty of the guessing problem is depending on the target set by the protocol.

New Target = Old Target * (Actual Time of Last 2016 Blocks / 20160 minutes)

So if the network finds blocks faster than every 10 minutes, the difficulty increases (target decreases), if it finds blocks slower than every 10 minutes, the difficulty decreases (target increases).

Bitcoin difficulty drop in 2021
Bitcoin experienced a massive 50% drop in hashrate (computing power) in 2021 due to the China mining ban. Less power in the network means the difficulty was adjusted to make it easier to mine.

This "10 minute rule" is implemented for two reasons:

Circumvent chain splittings. With super fast block clearances the blockchain could fork all over the place and it becomes harder to follow the right chain. Nodes always follow the longest.

PoW follows longest chain

Keeps the supply predictable. You can calculate how many Bitcoin will exist 10, 20, 30 years from now because of supply schedule is independent from how much computing power the network has.

The supply of bitcoin against the rate of new supply of coins which diminishes over time

Adding a new block to the chain every 10 minutes is Bitcoin's heartbeat, the definite order of events. A sense of time, a metronome for the network.

  • Fun Fact: We know exactly when the last bitcoin will be mined. It will be around the year 2140. It doesn't matter how much computing power (energy output) the network will use, it will not make this process any quicker or slower. This is the brilliance of Bitcoin's difficulty adjustment.
  • In this sense, by utilizing proof-of-work, the Bitcoin network provides a mechanism for establishing an indisputable history of events witnessed.

    Proof-of-Work is necessary to have a clear order of events that is causal, unpredictable, and coordinated. This concept of time is so important, that the initial invention of blockchain was actually called timechain.

    The issuance of new coins is also geometrically decreasing every 210,000 blocks, so roughly every 4 years which leads to a supply cap of just under 21 million Bitcoin. This scarcity is one of Bitcoin's key value propositions.

    Bitcoin issuance
    The supply of bitcoin against the rate of new supply of coins which diminishes over time

    As the block rewards for solving blocks gets lower and lower, fees become necessary to finance the miners to check transactions and add them to the blockchain.

    As explained in the Bitcoin whitepaper, "Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free."

    Bitcoin's mining economy

    New technologies to mine bitcoin more efficiently has progressed a few times over the years. From CPU to GPU to FPGA to ASICs which is what is still being used to this today.

    Bitcoin mining hardware
    History of the different hardware used to mine Bitcoin throughout the years

    It's important to note again, no matter how powerful the mining machines become, the next difficulty adjustment will ensure that new blocks get created every 10 minutes.

    You can theoretically still mine with a CPU, but you just won't make money. The electricity costs will be higher than your returns.

    Joining "Mining Pools" allows you to compete against huge Bitcoin Mining Farms.

    Joining a pool is great to get some rewards with just a bit of mining power. You get a reward proportional to how much mining power you add to the pool.

    Bitcoin mining pools
    Current Bitcoin Mining Pool distribution:

    Bitcoin mining, in general, is only is profitable if you have access to cheap energy. Otherwise you just get driven out by other miners that have cheaper energy.

    The hashrate which is a measure of the computing power of the network always follows the price. If Bitcoin's price rises, so does the profitability of mining.

    The result is that more miners enter the network, increasing the hashrate, which ultimately reduces the margin for everyone.

    Bitcoin hashrate in 2021

    Now let's get into more of the intricate details of mining. Let's move onto the next level of understanding.

    Till is a 25-year old German creator, making educational YouTube content for the Bitcoin community. Since November 2020 he's been consistently creating insightful, information dense, videos on Bitcoin and other related subjects.