MoonPay logo
0 minsPublished on 1/16/2024

What is Bitcoin mining and how does it work? Mining Bitcoin explained

What you need to know about how Bitcoin mining works, the incentives it provides to miners, its risks, and why it's necessary.

By Mohammad Musharraf

bitcoin mining

Since its inception in 2009, Bitcoin has disrupted money and commerce by introducing a decentralized payment method. Launched in the aftermath of the 2008 financial crisis, Bitcoin laid the foundation for cryptocurrency in an alternative financial system that eliminates the dependence on centralized intermediaries and authorities.

Unlike fiat currencies, which involve centralized ledgers, Bitcoin's issuance and storage happen algorithmically over a community-governed, distributed ledger network, more commonly known as a blockchain. This makes the question of network security more challenging than in traditional finance: in the absence of a central authority, the network needs a way to verify legitimate transactions and eliminate fraudulent ones.

Enter Bitcoin mining: the process of securing the network, preventing double-spending, and regulating BTC circulation. Anyone can participate in mining Bitcoin, which is key to the network's decentralization and security. And despite the challenges discussed later in this article, Bitcoin mining has been a lucrative pursuit, especially for tech-savvy individuals with the means to bankroll expensive mining equipment.

But what exactly is mining? How can something digital be “mined” in the first place? And why is it necessary?

This article answers all your questions around Bitcoin mining and its role in maintaining the Bitcoin network. 

Understanding Bitcoin

Bitcoin, which launched in 2009, is a digital-native crypto asset with by far the highest market capitalization. In less than a decade it established itself as a popular unit of exchange.

Bitcoin was created under the pseudonym Satoshi Nakomoto by a person (or group of people) who described it as an electronic peer-to-peer cash system in its white paper. This gave rise to the crypto industry, ushering in a new era of finance and investing in which people could finally break free from central banks' dominance and regain control of their assets.

An image of the Bitcoin white paper that established the Bitcoin protocol.
The Bitcoin white paper established a peer-to-peer electronic cash system (Image source)

Unlike traditional fiat currencies, Bitcoin is created, stored, and traded on a distributed ledger known as the blockchain. A blockchain, at its core, is a decentralized database distributed across a global network of nodes. The network is immutable, which means that whenever a transaction occurs, new information is combined with the information in the previous block to form a stable chain.

This network is secured by a set of participants called Bitcoin miners who verify and finalize transactions and create new blocks in a process called Bitcoin mining. 

What is Bitcoin mining?

Bitcoin mining is the process by which new Bitcoins enter circulation as a reward for miners using computational power to validate transactions. To accomplish this, Bitcoin mining uses a Proof of Work (PoW) consensus mechanism–the oldest and one of the most secure consensus algorithms.

As mentioned, the blockchain is a decentralized database, meaning it has no centralized gatekeepers to verify the legitimacy of new transactions. This is why Bitcoin mining is employed to secure the network.

In a POW model, miners compete with each other to solve arbitrary mathematical puzzles, using more and more computing power to produce a new block. This process can be quite costly and involves high electricity consumption, due to miners running powerful computers for long hours.

An image of Cynthia Dwork.
The Proof-of-Work consensus mechanism was co-invented by computer scientist Cynthia Dwork in 1993 (Image source)

The miner who wins this race by solving the puzzle first gets to verify and add the new set of transactions to the blockchain. Once the new block is added to the network, new Bitcoins enter circulation and are rewarded to the miner for their participation.

Why does Bitcoin need miners?

Okay! Now we understand what Bitcoin mining is. But why does the network need miners in the first place?

The Bitcoin network has two main objectives:

  1. Transmitting transaction data

  2. Verifying new Bitcoin transactions to prevent double-spending

The former is relatively easy since every node (computer) in the globally distributed network has access to the entire copy of the blockchain ledger. The latter, however, is more complicated.

An image of a server room.
Bitcoin mining is the process of securing the Bitcoin network, preventing double-spending, and regulating BTC circulation (Image source)

A digital currency like Bitcoin is essentially a computerized document similar to the audio and video files in any of your devices. This has its merits but is also prone to duplication. Without a robust security mechanism, minting counterfeit coins and using them for payments would be a cakewalk. One could also double-spend Bitcoin easily, fraudulently using a single coin for multiple payments. 

But it isn't that way, thanks to Bitcoin miners.

Bitcoin mining is the process of creating and adding new blocks to the Bitcoin blockchain. Thus, besides validating transactions, Bitcoin miners also perform the critical function of building the blockchain itself.

The Bitcoin mining process

So much for the groundwork. Now, let's discuss the actual process of how Bitcoin mining works.

As mentioned before, Bitcoin miners use their computing power to solve cryptographic puzzles. The solution, when correct, validates the legitimacy of a Bitcoin transaction. 

A major part of the Proof of Work consensus is a hash function called “double SHA-256”. The mining process begins by bundling new transactions into a block and encrypting it with a 256-bit target hash. This hash is, of course, a secret number unknown to miners. Thus, miners must compete to generate a 64-digit hexadecimal number less than or equal to the target hash to solve the equation.

A screenshot showing the structure of a Bitcoin block.
From the Bitcoin whitepaper: A basic diagram of transactions and digital signatures (Image source)

Getting a 64-digit hexadecimal from a cryptographic hash isn't easy. Miners have to try different inputs, permutations, and combinations. They make billions of random guesses, called “nonces” (number used only once), within a few minutes. It's a race in which the first miner to find the correct answer gets to verify the transaction and receive the block reward.

Once a block is successfully mined, it is recorded on the blockchain with the hash as its unique identifier. As of August 2023, Bitcoin miners successfully create one block roughly every ten minutes. This is commonly referred to as the network's “block time”, which is a component of the speed of Bitcoin transactions.

Why mine bitcoin?

So far we've covered how Bitcoin mining works and why it is significant for the network. But what's in it for the miners? And what makes Bitcoin mining profitable?

As mentioned above, mining regulates Bitcoin's supply, bringing newly minted Bitcoin tokens into circulation. Miners receive these coins through block rewards, which is the incentive to mine Bitcoin. As of August 2023, around 19 million Bitcoins are in circulation out of the total supply of 21 million. The remaining two million coins are yet to be mined, which presents a significant economic opportunity for Bitcoin miners.

To enhance Bitcoin's scarcity, and thus its value, the Bitcoin algorithm reduces mining rewards by half after every 210,000 blocks–roughly every four years. Bitcoin's total supply will therefore come into circulation by the year 2140. That won't remove the mining incentives, though, since Bitcoin miners will still receive their block reward in the form of transaction fees. Besides economic incentives, miners also get to vote on Bitcoin's future by participating in its distributed governance

Bitcoin mining rewards

From 2009 to 2012, before the first halving, Bitcoin miners received 50 BTC per block as mining rewards. From 2012 to 2016, they received 25 BTC per block, and from 2016 to 2020 they received 12.5 BTC.

In 2023, the Bitcoin reward is 6.25 BTC, and it will be 3.125 BTC following the next halving which will occur in April 2024.

Now, if you consider the above progression in isolation, it appears as if the earnings of Bitcoin miners are consistently reduced. It's noteworthy, however, that the average price of Bitcoin has increased significantly over time, from $0 at its start in 2009 to upwards of $68,000 at its peak in November 2021, and back down to around $20,000 during the 2022 bear market. In US dollars, miners currently earn roughly $125,000 as a mining reward for every block they mine.

Despite these impressive figures, though, Bitcoin mining is not necessarily profitable. For one, it's highly competitive. As a Bitcoin miner, you will not get the rewards even after spending massive computing power, unless you find the hash first. Since the SHA-256 hashing algorithm produces random and unpredictable hashes, you can invest for a long time without finding a new block to mine.

Moreover, the required hash rate of Bitcoin mining hardware—that is, their mining power—also increases proportionally as new miners join the network. Thus, Bitcoin mining difficulty increases as it becomes more competitive to mine Bitcoin.

Lastly, Bitcoin's Proof of Work mechanism imposes massive energy costs on Bitcoin miners. All these factors combined make Bitcoin mining profitable but not for everyone. Individual miners find it particularly difficult to earn substantially by mining Bitcoin these days. 

This isn't where the road ends, however, since miners can join what are called “mining pools”.

What are Bitcoin mining pools?

A Bitcoin mining pool is basically a distributed group of Bitcoin miners who pool their computational resources to significantly increase the chance of finding a block. All participants in the mining pool share the rewards, receiving payments in proportion to their contribution. The contribution, in turn, is measurable in terms of the miner's hash rate.

Whenever a participant in a mining pool finds a new block, the mining reward goes to the pool coordinator. They take a small fee for their services, distributing the rest among the pool's participants. Thus, for individual miners for whom Bitcoin mining otherwise seems impossible, mining pools provide the opportunity for a steady and profitable income stream. 

Schematic diagram of how a mining pool works.
Mining pool block rewards are shared in proportion to the contribution made. (Image source)

The Slush Pool and F2 Pool are the earliest examples of Bitcoin mining pools. They are also among the biggest, particularly F2 which contributes 15% of the Bitcoin network's total hashing power.

As with any financial process, it's imperative that you conduct thorough research before joining a mining pool. Some key factors to consider in this regard are transparency, reliability, the efficiency of the toolkit, and the support system. 

What do you need to mine Bitcoin?

You need tremendous computing power to mine Bitcoins, which ordinary computers do not provide. To be a successful Bitcoin miner, you will have to invest in a combination of mining hardware and software.

Mining hardware

The first requirement is specialized, heavy-duty computers or “mining rigs”. These are designed specifically for blockchain mining, with hardware like Application-Specific Integrated Circuit (ASIC) or Graphics Processing Unit (GPU).

ASIC mining rigs, as their name suggests, are usable only for mining Bitcoin, while GPUs can serve a more general purpose. Nevertheless, considering the hashing power required for successful and profitable Bitcoin mining, an ASIC-based mining rig outperforms GPUs by a significant margin. Naturally, this is what miners mostly prefer, although the cost is also much higher than GPUs.

Since mining rigs use a lot of electricity, you'll need a high-capacity and energy-efficient power supply to run this equipment. A stable and fast internet connection is also mandatory, as well as a robust cooling system to prevent overheating.

Mining software

Besides all this expensive hardware, Bitcoin mining requires specialized software as well. Thanks to the Bitcoin community, however, most of this software is free, open-source, and operable across platforms and operating systems, including Windows, Mac, and Linux. Popular mining software includes CGMiner and BFGMiner.

Bitcoin mining is expensive. Unless you have the resources to mine Bitcoin on your own, you'll need to join a mining pool. As discussed above, this is usually the more economical, as well as profitable, way to engage in the mining process.

Bitcoin mining risks

The mining process can be rewarding and profitable if it's done right, but just like any investment with profit potential, there are certain risks involved. Here are some of the primary risks associated with Bitcoin mining:

1. High entry cost

You need to invest thousands of dollars to start mining Bitcoin, even when you do it through a mining pool.

This is mainly due to the high price of Bitcoin mining rigs and hardware, as well as expensive electricity costs that miners will need to pay. These factors can price out many potential crypto miners right off the bat, since many people are unable to possess the initial capital required.

An image showing Bitcoin mining equipment.
Expensive Bitcoin mining equipment is one reason why mining can be financially risky (Image source)

Although mining software is free, you may have to pay for supporting software. And above all, the initial investment, no matter how big, doesn't provide 100% certainty of profitable income. This is particularly risky since Bitcoin's mining difficulty increases over time. 

2. BTC volatility

The high volatility of Bitcoin prices adds to the uncertainty that miners face. For example, the price of Bitcoin was as low as $4,107 in 2020 and reached an all-time high of $68,790 in November 2021. But then, as the bear market kicked in, the BTC price dropped to below $20,000.

The rewards for mining Bitcoin are therefore inconsistent. When the market is in a bull run, a reward of 6 BTC could be substantial. In a bear run, however, 6 BTC might not be enough to generate a viable income, especially given the pricey mining hardware and the fact that pools split Bitcoin rewards among multiple parties.

3. High energy consumption

The process of mining Bitcoin consumes huge amounts of energy and leaves a large carbon footprint. Each year, Bitcoin mining consumes 143.5 terawatt-hours of electricity–more than the annual electricity usage of countries like Ukraine and Norway.

Sure, the industry is making efforts to move to a more energy-efficient way of mining. But as of now, Bitcoin's carbon footprint simply cannot be ignored.

4. Governmental bans

Another major risk associated with Bitcoin mining is the possibility of governmental bans and regulations. China, for example, was a superpower in Bitcoin mining and contributed significantly to the network's overall hash rate. But then the Chinese government imposed a ban on all crypto mining, considering the activity to be harmful to the nation's economy.

A picture of the National People’s Congress, China’s national legislature.
The Chinese government banned all cryptocurrency mining (Image source)

So, depending on where you live in the world, Bitcoin and crypto mining could be banned or heavily regulated at any moment.

5. Taxes

Capital gains from mining rewards are taxable. This isn't a risk per se but miners can benefit from knowing the tax laws in their respective countries before getting into mining. In India, for instance, a 30% tax is imposed on all cryptocurrency earnings. 

Miners should consult a licensed tax professional to understand specific tax laws and Bitcoin mining economics in their respective countries and to file taxes promptly.

Frequently Asked Questions (FAQ)

Yes. In most countries across the globe, Bitcoin mining operations are considered legal. However, there are a few countries, such as China, Egypt, and Iraq, where Bitcoin mining is outlawed. Russia, Sweden, and the European Commission have also contemplated banning Bitcoin mining due to its environmental impact.

A few US states are also putting a stop to Bitcoin mining. It's therefore important to research local laws before committing your time and money.

2. Can I mine Bitcoin using a smartphone?

Theoretically, yes you could use a smartphone to mine Bitcoin. But practically, no you cannot. The energy requirements for mining operations cannot be fulfilled by a smartphone or even a regular computer for that matter. It is only through specialized mining rigs that one can successfully mine BTC today. 

3. Why does mining use so much energy?

The process of mining Bitcoin involves solving complex puzzles and achieving Proof of Work consensus by making billions of random guesses. This requires immense computing power, so mining rigs need to make use of large amounts of electricity.

4. How does mining confirm transactions?

In the process of Proof of Work crypto mining, miners gather up as many cryptocurrency transactions that can fit into a block and compete with each other to solve complex mathematical puzzles.

A diagram showing how the Proof of Work consensus mechanism works.
Bitcoin uses a Proof of Work consensus mechanism to verify Bitcoin transactions on the blockchain

The miner who wins this race gets the chance of finalizing and validating transactions to add them to the Bitcoin Network. As explained above, this is called Proof of Work and is a largely fool-proof method of confirming and verifying transactions on a blockchain. 

How to buy Bitcoin

If expensive Bitcoin and crypto mining rigs are out of your price range, don't worry. There are other ways to gain exposure to Bitcoin.

You can buy Bitcoin (BTC) via MoonPay or through any of our partner wallet applications with a credit card, bank transfer, Apple Pay, Google Pay, and many other payment methods.

Just enter the amount of BTC you wish to purchase and follow the steps to complete your order.

How to sell Bitcoin

MoonPay makes it easy to sell Bitcoin when you decide it's time to cash out, whether you're a miner looking to capitalize on your hard-earned mining reward, or a simple investor looking to trade crypto for fiat.

Simply enter the amount of BTC you'd like to sell and enter the details where you want to receive your funds.

Mohammad Musharraf
Written byMohammad Musharraf

You might also like