Bitcoin mining is the process by which blocks of transactions are added to the public blockchain and verified. It’s also the process by which new Bitcoin is created—a mechanism that both secures the integrity of the blockchain and incentivizes participation in the network.

Miners compete to add new blocks to the blockchain. Mining Bitcoin demands a substantial commitment on the part of miners; it’s a costly, time-consuming task, and one that’s necessary for the cryptocurrency to work and for people to have faith in its legitimacy.

Over a decade since Bitcoin was created by Satoshi Nakamoto, most people have heard of mining. But what does it really mean—and how do you go about mining Bitcoin?

What is Bitcoin mining?

Mining Bitcoin isn’t like digging for gold or coal deep underground. It refers to verifying the transactions made using Bitcoin. Miners are those individuals or companies that sustain and audit the blockchain network that supports the cryptocurrency.

They do so by completing "blocks" of verified transactions, which are added to the blockchain; when a miner completes a block, they are rewarded with Bitcoin.

Did you know?

Approximately every four years, the reward for mining Bitcoin is halved, an event known (unsurprisingly) as the “halving”. In May 2020, the block reward dropped from 12.5 BTC per block to 6.25 BTC.

Mining for Bitcoin isn’t as cheap as it once was, but this still doesn’t prevent investors from carrying out this activity. The block reward of Bitcoin is the incentive that powers cryptocurrency transactions through legitimizing and monitoring the network. Because this responsibility is carried out by many users throughout the world, Bitcoin is a decentralized cryptocurrency, meaning that it relies on no central authority such as a government or bank for its trustworthiness.

Why does Bitcoin need miners?

Mining is, in effect, a process of auditing and verifying Bitcoin transactions to prevent the problem of “double spending”. Double spending is where someone with cryptocurrency tries to spend the same coin twice. With physical currency, you can’t buy a drink in a pub with a £20 note and then pop to the shops to buy some groceries with the same £20 note.

With cryptocurrency, there is a risk that someone with Bitcoin could make a copy of that Bitcoin and send that to a merchant instead of the real thing. In the real world, the cashier looks at a £20 note to ensure it is not fake—and this is what Bitcoin miners are trying to do with cryptocurrency; they are checking to ensure that a transaction has not been made twice.

What is the process of Bitcoin mining and what can you do with it?

Bitcoin uses a consensus mechanism called proof of work.

The process of mining Bitcoin works as follows:

  • 🖥️ A miner’s computer, called a node, collects and packages individual Bitcoin transactions from the last ten minutes into a block.
  • 🖧 This node competes with other nodes in the network to solve a complicated cryptographic problem to be the first to validate the new block for the blockchain.
  • 📡 The first miner to solve the problem broadcasts their success to the entire network.
  • 🧮 Other nodes then check if their solution is correct. If correct, the new block is added to the blockchain and the whole process starts again.
  • 💰 As the miner was first to solve the problem, it gets rewarded with Bitcoin.

Bitcoin mining hardware runs a cryptographic hashing function on a block header.

What that means is that each miner creates a “candidate block” with unconfirmed transactions from the node’s memory pool, or mempool. This block includes a block header that summarizes the data inside the block, along with a reference to an existing block in the blockchain and a nonce (“number only used once”). In Bitcoin, the nonce is a whole number somewhere between 0 and 4,294,967,296.

This block header is then put through the SHA256 hash function; if the resulting number is higher than the current target hash, the miner adjusts the nonce and tries again. Miners do this many thousands of times per second. The difficulty target is a 256-bit number; it is adjusted every 2016 blocks (roughly every two weeks), to ensure that a block is mined on average once every 10 minutes.

When a lucky miner’s hash function spits out a result that’s lower than the current target hash, the block is broadcast to the network. Each node checks that the block header hashes to meet the target, and if confirmed the newly mined block is added to the blockchain. The miner receives a reward of Bitcoin; this transaction, which creates new Bitcoin out of thin air, is known as the “coinbase transaction” and is included in the candidate block.

These rewards serve to incentivize participation and keep things running smoothly.

The rate at which coins are issued is set by the mining code, ensuring that the time it takes for a miner to win a block is always approximately 10 minutes. This is to protect the system and prevent miners from creating their own Bitcoin.

Every time Bitcoin is mined, the cryptographic problem becomes harder to solve, meaning that miners will require a higher hash rate to succeed in earning block rewards. This means that more computing power is needed to earn the same amount of cryptocurrency.

The first Bitcoin miners used their computers’ CPUs to complete the cryptographic problems. Soon, miners discovered that graphics processing units (GPUs) were more effective than CPUs, sparking an arms race in mining hardware. Now, Bitcoin miners use dedicated hardware known as ASIC (application-specific integrated circuit) miners.

Solving cryptographic problems is necessary to protect the Bitcoin network from attacks. To reverse transactions in the blockchain would require 51% of the whole network’s computing power. This ensures that any attack is difficult and pointless as an attacker would have to own more mining hardware than anyone else.

Cheat Sheet

  • Bitcoin mining is the process of adding and verifying blocks of transactions to Bitcoin’s public blockchain.
  • Bitcoin uses the “proof of work” consensus mechanism, which demands commitment from miners in the form of expensive mining hardware and electricity.
  • Miners compete to solve a complex cryptographic puzzle, and are rewarded with newly-minted Bitcoin.

Up Next

How does the Bitcoin protocol keep the issuance of new Bitcoin at a controllable pace? The answer: Halving.

Daily Debrief Newsletter

Start every day with the top news stories right now, plus original features, a podcast, videos and more.