What Is Bitcoin Mining?
Bitcoin mining is the process of creating new bitcoin by solving puzzles. It consists of computing systems equipped with specialized chips competing to solve mathematical puzzles. The first bitcoin miner (as these systems are called) to solve the puzzle is rewarded with bitcoin. The mining process also confirms transactions on the cryptocurrency's network and makes them trustworthy.
For a short time after Bitcoin was launched, it was mined on desktop computers with regular central processing units (CPUs). But the process was extremely slow. Now the cryptocurrency is generated using large mining pools spread across many geographies. Bitcoin miners aggregate mining systems that consume massive amounts of electricity to mine the cryptocurrency.
In regions where electricity is generated using fossil fuels, bitcoin mining is considered detrimental to the environment. As a result, many bitcoin miners have moved operations to places with renewable sources of energy to reduce Bitcoin's impact on climate change.
- Bitcoin mining is the process of creating new bitcoin by solving a computational puzzle.
- Bitcoin mining is necessary to maintain the ledger of transactions upon which Bitcoin is based.
- Miners have become very sophisticated over the past several years, using complex machinery to speed up mining operations.
- Bitcoin mining has generated controversy because it is not considered environmentally friendly.
Click Play to Learn How Bitcoin Mining Works
Just as gold is mined from the earth using large implements and machines, bitcoin mining also uses big systems akin to data centers. These systems solve mathematical puzzles generated by Bitcoin's algorithm to produce new coins.
By solving computational math problems, bitcoin miners also make the cryptocurrency's network trustworthy by verifying its transaction information. They verify 1 megabyte (MB) worth of transactions—the size of a single block. These transactions can theoretically be as small as one transaction but are more often several thousand depending on how much data each transaction stores. The idea behind verifying Bitcoin transaction information is to prevent double-spending. With printed currencies, counterfeiting is always an issue. But generally, when you spend $20 at the store, that bill is in the clerk's hands. With digital currency, however, it's a different story.
Digital information can be reproduced relatively easily, so with Bitcoin and other digital currencies, there is a risk that a spender can make a copy of their bitcoin and send it to another party while still holding onto the original.
Bitcoin transactions are aggregated into blocks that are added to a database called blockchain. Full nodes in Bitcoin's network maintain a record of the blockchain and verify transactions occurring on it. Bitcoin miners download the entire history of blockchain and assemble valid transactions into a block. If the block of assembled transactions is accepted and verified by other miners, then the miner receives a block reward.
Bitcoin successfully halved its mining reward—from 12.5 to 6.25—for the third time on May 11, 2020.
The block reward is halved every 210,000 blocks (or roughly every four years). In 2009, it was 50. In 2013, the reward amount declined to 25, and in 2016, it became 12.5. In Bitcoin's most recent halving event, the reward was changed to 6.25.
Another incentive for bitcoin miners to participate in the process is transaction fees. In addition to rewards, miners also receive fees from any transactions contained in that block of transactions. As Bitcoin reaches its planned limit of 21 million (expected around 2140), miners will be rewarded with fees for processing transactions that network users will pay. These fees ensure that miners still have the incentive to mine and keep the network going. The idea is that competition for these fees will cause them to remain low after halving events are finished.
What is the bitcoin mining math puzzle?
At the heart of bitcoin mining is a math puzzle that miners are supposed to solve in order to earn bitcoin rewards. The puzzle is called proof of work (PoW), a reference to the computational work expended by miners to mine bitcoin. Though it is often referred to as complex, the mining puzzle is actually fairly simple and can be described as guesswork.
The miners in Bitcoin's network try to come up with a 64-digit hexadecimal number, called a hash, that is less than or equal to a target hash in SHA256, Bitcoin's PoW algorithm. A miner's systems use considerable brute force in the form of multiple processing units stacked together and spit out hashes at different rates—megahashes per second (MH/s), gigahashes per second (GH/s), or terahashes per second (TH/s)—depending on the unit, guessing all possible 64-digit combinations until they arrive at a solution. The systems that guess a number less than or equal to the hash are rewarded with bitcoin.
Here's an example to explain the process. Say I ask friends to guess a number between 1 and 100 that I have thought of and written down on a piece of paper. My friends don’t have to guess the exact number; they just have to be the first person to guess a number less than or equal to my number.
If I am thinking of the number 19 and a friend comes up with 21, they lose because 21 is greater than 19. But if someone guesses 16 and another friend guesses 18, then the latter wins because 18 is closer to 19 than 16. In very simple terms, the bitcoin mining math puzzle is the same situation described above except with 64-digit hexadecimal numbers and thousands of computing systems.
What is mining difficulty?
One of the terms you will often come across in bitcoin mining literature is mining difficulty. Mining difficulty refers to the difficulty of solving the math puzzle and generating bitcoin. Mining difficulty influences the rate at which bitcoins are generated.
Mining difficulty changes every 2,016 blocks or approximately every two weeks. The succeeding difficulty level depends on how efficient miners were in the preceding cycle. It is also affected by the number of new miners that have joined Bitcoin's network because it increases the hash rate or the amount of computing power deployed to mine the cryptocurrency. In 2013 and 2014, as the price of bitcoin rose, more miners joined its network, and the average time to discover a block of transactions fell to nine minutes from 10 minutes.
But the opposite can also be true. That is, the more miners there are competing for a solution, the more difficult the problem will become. If computational power is taken off the network, the difficulty adjusts downward to make mining easier.
The difficulty level for mining in August 2020 was more than 16 trillion. That is, the chances of a computer producing a hash below the target is 1 in 16 trillion. To put that in perspective, you are about 44,500 times more likely to win the Powerball jackpot with a single lottery ticket than you are to pick the correct hash on a single try.
What Are the Economics of Mining Bitcoin?
At the end of the day, bitcoin mining is a business venture. Profits generated from its output—bitcoin—depend on the investment made into its inputs.
There are three main costs of bitcoin mining:
- Electricity: This is the power that runs your mining systems 24/7. It can run up to a substantial bill. According to some estimates, electricity is responsible for as much as 90% of bitcoin mining costs. When you consider that the process consumes as much electricity as certain countries do, the costs can work out to be pretty big.
- Mining systems: Contrary to the popular narrative, desktop computers and regular gaming systems are not fit or efficient for bitcoin mining. The process can heat up such systems and cause bandwidth issues in a home network. Application-specific integrated chip (ASIC) systems, which are customized machines for bitcoin mining, are the main infrastructure investment for bitcoin miners. The price range for such machines can range anywhere from $4,000 to $12,000. Even with such high costs, a single ASIC-equipped system generates less than a single bitcoin. Bitcoin miners organize thousands of ASIC systems into mining pools that run 24/7 to generate the 64-digit hexadecimal number required to solve a hash puzzle.
- Network infrastructure: Network speeds do not make a marked difference to the bitcoin mining process. However, it is important to have an Internet connection that is available 24/7 without any interruptions. The connection should also have latency from nearby mining pools. Dedicated networks reduce external dependency and ensure that latency is minimized. Going offline does not necessarily stop the process of syncing transactions. But it can make the process time-consuming and, possibly, prone to errors after a connection has resumed.
The total costs for these three inputs should be less than the output—in this case, the bitcoin price—for miners to generate profits from their venture. Considering the skyrocketing price of bitcoin, the idea of minting your own cryptocurrency might sound like an attractive proposition.
El Salvador made Bitcoin legal tender on June 9, 2021. It is the first country to do so. The cryptocurrency can be used for any transaction where the business can accept it. The U.S. dollar continues to be El Salvador's primary currency.
However, despite what Bitcoin proponents tell you, mining the cryptocurrency is not a hobby of any sort. It is an expensive venture with a high probability of failure. As illustrated in the section on mining difficulty, there is no guarantee that you will earn bitcoin rewards even after spending considerable expenses and effort. Aggregating mining systems to run a small business that mines bitcoin might offer a way out. However, even such businesses are at the mercy of the cryptocurrency's volatile prices. If the cryptocurrency's price crashes as it did in 2018, then it becomes uneconomic to run bitcoin mining systems, and small miners will be forced to go out of business. The decline in the number of bitcoins awarded to miners every four years makes the activity even more unappealing.
Given the considerable difficulty inherent in the economics of mining bitcoin, the activity is now dominated by large mining companies that have operations spanning multiple continents. AntPool, the world's biggest bitcoin mining company, runs mining pools in many countries. Many bitcoin mining companies have also gone public, although their valuations are relatively modest.
How much electricity does the bitcoin mining process use?
For most of Bitcoin's short history, its mining process has remained an energy-intensive process. In the decade after it was launched, bitcoin mining was concentrated in China, a country that relies on fossil fuels like coal to produce a majority of its electricity. Not surprisingly, bitcoin mining's astronomical energy costs have drawn the attention of climate change activists who blame the activity for rising emissions. According to some estimates, the cryptocurrency's mining process consumes as much electricity as entire countries. But bitcoin proponents have released studies that claim that the cryptocurrency is powered largely by renewable energy sources. You can read more about the debate here.
One thing to remember about these studies is that they are based on conjectures and self-reported data from mining pools. For example, a Coinshares report from 2019 makes several assumptions regarding the power sources for miners included in their assessment of the bitcoin mining ecosystem.
History of Bitcoin Mining
Two developments have contributed to the evolution and composition of bitcoin mining as it is today. The first one is the manufacture of custom mining machines for bitcoin. Because bitcoin mining is essentially guesswork, arriving at the right answer before another miner has almost everything to do with how fast your computer can produce hashes. In the early days of Bitcoin, desktop computers with ordinary CPUs dominated bitcoin mining. But they began taking a long time to discover transactions on the cryptocurrency's network as the algorithm's difficulty level increased with time. According to some estimates, it would have taken "several thousand years on average" using CPUs to find a valid block at the early 2015 difficulty level.
Over time, miners realized that graphics cards, also known as graphics processing units (GPUs), were more effective and faster at mining. But they consumed a lot of power for individual hardware systems that weren't really required for mining the cryptocurrency. Field-programmable gate arrays (FPGAs), a type of GPU, were an improvement, but they suffered from the same drawbacks GPUs did.
Nowadays, miners use custom mining machines, called ASIC miners, that are equipped with specialized chips for faster and more efficient bitcoin mining. They cost anywhere from several hundred to tens of thousands of dollars. Today, bitcoin mining is so competitive that it can only be done profitably with the most up-to-date ASICs. When using desktop computers, GPUs, or older models of ASICs, the cost of energy consumption actually exceeds the revenue generated. Even with the newest unit at your disposal, one computer is rarely enough to compete with mining pools—groups of miners who combine their computing power and split the mined bitcoin between them.
Bitcoin forks have also influenced the makeup of the bitcoin miner network. Between 1 in 16 trillion odds, scaling difficulty levels, and the massive network of users verifying transactions, one block of transactions is verified roughly every 10 minutes. But it's important to remember that 10 minutes is a goal, not a rule.
The Bitcoin network can currently process just under four transactions per second, with transactions logged in the blockchain every 10 minutes. By comparison, Visa can process somewhere around 65,000 transactions per second. As the network of Bitcoin users continues to grow, however, the number of transactions made in 10 minutes will eventually exceed the number of transactions that can be processed in 10 minutes. At that point, waiting times for transactions will begin and continue to get longer, unless a change is made to the Bitcoin protocol.
This issue at the heart of the Bitcoin protocol is known as scaling. Though bitcoin miners generally agree that something must be done to address scaling, there is less consensus about how to do it. There have been two major solutions proposed to address the scaling problem. Developers have suggested either creating a secondary "off-chain" layer of Bitcoin that would allow for faster transactions that can be verified by the blockchain later or increasing the number of transactions that each block can store. With less data to verify per block, the first solution would make transactions faster and cheaper for miners. The second would deal with scaling by allowing for more information to be processed every 10 minutes by increasing block size.
In July 2017, bitcoin miners and mining companies representing roughly 80% to 90% of the network’s computing power voted to incorporate a program that would decrease the amount of data needed to verify each block.
The program that miners voted to add to the Bitcoin protocol is called a segregated witness, or SegWit. This term is an amalgamation of segregated, meaning separate, and witness, which refers to signatures on a Bitcoin transaction. Segregated witness, then, means to separate transaction signatures from a block and attach them as an extended block. Though adding a single program to the Bitcoin protocol may not seem like much in the way of a solution, signature data has been estimated to account for up to 65% of the data processed in each block of transactions.
Less than a month later, in August 2017, a group of miners and developers initiated a hard fork, leaving the Bitcoin network to create a new currency using the same codebase as Bitcoin. Although this group agreed with the need for a solution to scaling, they worried that adopting SegWit technology would not fully address the scaling problem.
Instead, they went with the second solution of increasing the number of transactions that each block can store. The resulting currency, called Bitcoin Cash, increased the block size to 8MB in order to accelerate the verification process to allow a performance of around 2 million transactions per day.
The Bottom Line
Bitcoin mining is an energy-intensive process with customized mining systems that compete to solve mathematical puzzles. The miner who solves the puzzle first is rewarded with bitcoin. The bitcoin mining process also confirms transactions on the cryptocurrency's network and makes them trustworthy.
Though individual miners using desktop systems played a role during the cryptocurrency's early days, the bitcoin mining ecosystem is dominated by large mining companies that run mining pools spread across many geographies. Bitcoin mining is also controversial because it uses astronomical amounts of energy. With increasing awareness of climate change, several miners have moved operations to regions that use renewable energy sources to produce electricity.
What is bitcoin mining?
Bitcoin mining is the process that generates bitcoin. It consists of mining systems competing with each other to solve a mathematical puzzle and win bitcoin as a reward.
What purpose does bitcoin mining serve?
Bitcoin mining serves two purposes:
- It generates bitcoin.
- It confirms transactions on the cryptocurrency’s network and makes them trustworthy.
What are the main costs associated with bitcoin mining?
The three biggest costs for bitcoin mining are:
- Network infrastructure
- Mining infrastructure
Should you mine bitcoin?
Contrary to popular narrative, bitcoin mining is a costly hobby without guaranteed results. You will need to invest in expensive machines, run them 24/7, and pay high electricity bills. Even then, there is no guarantee that you will earn bitcoin.
Is bitcoin mining green?
Bitcoin mining's energy usage has been criticized by climate change activists as proof that the cryptocurrency is not environmentally friendly. The bitcoin mining process is estimated to consume as much electricity as entire countries. As the world pivots toward renewable sources of energy, bitcoin mining is expected to become greener.