Mining is one of the most complex components of bitcoin, but it is arguably the most important. There are three main functions that bitcoin mining serves:
Adding new blocks to the blockchain
Creating new bitcoins
Securing the network
We review each aspect in turn below.
Who are the bitcoin miners?
Before reviewing what bitcoin miners do, it can help to know who they are.
Bitcoin miners are usually companies. Many of them public, with their shares trading on exchanges such as the Toronto Stock Exchange and the Nasdaq. Famous miners include HIVE Blockchain, Riot Blockchain, Hut 8 and Marathon Digital Holdings.
Successful mining requires thousands of high-performance computers. Meaning that bitcoin miners run server farms, quite like data or tech companies. Once these computers are connected to the internet and to the bitcoin network, miners can collect and confirm transactions.
A mining farm of Genesis Mining, located in Iceland. Source: Wikipedia
Miners are based all over the world. But they prefer to be in whichever country provides the cheapest electricity, as running server farms uses a lot of it. Since China banned bitcoin mining in 2021, the US and Kazakhstan have become the biggest bitcoin mining centres.
So, what do bitcoin miners do?
Function 1: Adding new blocks
The main activity of bitcoin miners is adding new chunks of transactions – called “blocks” – to the blockchain. Under the rules of bitcoin, a new block can only be added to the blockchain every 10 minutes (other cryptos are faster, with blocks being added more often). The way new blocks get added is through a lottery. The winning miner gets the right to add a new block.
The slot machine in this lottery is a famous little programme called SHA-256, which was developed by the National Security Agency (NSA) in 2001. In the lottery, miners punch letters and numbers into SHA-256 until they get an output – called a hash – that begins with 30-odd zeroes. Below is a screenshot of SHA-256.
The NSA did everything they could to ensure SHA-256 generates highly unpredictable outputs (but not random). Statistically, miners have a one in a billion chance of finding a winning number with every guess.
As with any lottery, maximising your chances of winning requires buying as many tickets as possible. For this reason, the most successful miners tend to have the most computers. As with any lottery, it costs money to play. Running these computers incurs high electricity bills.
Function 2: Creating new bitcoins
Whichever miner finds a lottery number first wins and can add a new block to the blockchain.
The prize for winning is newly created bitcoins. The current prize money as of December 2021 is six bitcoins. However, the prize slowly declines over time (halving every four years) until roughly 2140, at which point it hits zero. This is because bitcoin will hit its supply limit of 21 million bitcoins.
Other (competitor) miners will check that the number found by the lottery winner is correct. If most miners confirm it, the lottery starts afresh with the next block. However, if most other miners reject the new block, the block will not be added.
Future Bitcoin Supply
Source: Bitcoin Visuals. Data as of 29 November 2021.
Function 3: Securing the network
Why does bitcoin require miners to play this lottery? To keep out cheats and hackers. Taking part in this lottery is expensive, meaning that cheating or hacking is never free. Meanwhile rewarding miners with bitcoins keeps them invested in the system and gives them an incentive to maintain it.
Miners can be thought of like banks in the real economy. Like banks, miners maintain the payments system. Like banks, they make sure everyone gets paid their dues and everyone’s accounts (digital wallets) are accurate.
The key difference is that there is no central bank backed by the government. In the real economy, the major banks – like CBA, NAB, ANZ – themselves all have accounts within the Reserve Bank of Australia. Meaning that the Australian government ultimately backstops the whole payments system.
However, with bitcoin there is no central bank. There are only miners, whose incentive to preserve the system and keep it honest derives from their own stakes in it. The lack of a central bank for bitcoin can be both a strength and weakness. A strength is there is no chance of hyperinflation, as the supply of bitcoin is limited to 21 million and no central party can print it. A weakness is that mining has problems of its own, particularly high energy consumption.