What Is Bitcoin Mining?
Mining is what keeps the Bitcoin network secure without any central authority. It replaces trust in a bank with trust in mathematics - making it computationally prohibitive for anyone to alter the transaction history.
How Does Bitcoin Mining Work?
Here is the mining process step by step:
- Users broadcast Bitcoin transactions to the network
- Transactions sit in a waiting area called the mempool
- Miners select transactions from the mempool and bundle them into a block
- Miners repeatedly hash the block header (changing a random number called the nonce each time) until they find a hash that meets the network's current difficulty target
- The winning miner broadcasts their valid block to the network
- Other nodes verify the block and add it to their copy of the blockchain
- The winning miner receives the block reward plus transaction fees
What Is Proof of Work?
Proof of work (PoW) is the consensus mechanism Bitcoin uses to agree on which transactions are valid. It requires miners to demonstrate that they've expended real computational effort - electricity and hardware - to produce a valid block.
This expenditure of real-world resources is what makes the blockchain secure. To rewrite Bitcoin's history, an attacker would need to redo all the computational work for every block they wanted to change, plus outpace the entire honest network going forward. At Bitcoin's scale, this is economically impossible.
What Is the Block Reward?
When a miner successfully adds a block, they receive two types of compensation:
- Block subsidy - Newly created Bitcoin that didn't exist before. This started at 50 BTC in 2009 and halves every 210,000 blocks (the "halving"). As of April 2024, the block subsidy is 3.125 BTC.
- Transaction fees - Small fees paid by users to have their transactions included. As the block subsidy decreases over time, fees are expected to become the primary miner incentive.
What Is Mining Difficulty?
Bitcoin's protocol automatically adjusts how hard it is to mine a block every 2,016 blocks (approximately every two weeks). If blocks are being found too fast, difficulty increases. If too slow, it decreases. This keeps the average block time close to 10 minutes regardless of how much mining power joins or leaves the network.
What Hardware Do Miners Use?
Early Bitcoin miners used regular CPUs, then GPUs. Today, mining is dominated by Application-Specific Integrated Circuits (ASICs) - chips designed to do nothing but compute Bitcoin hashes as efficiently as possible. Large mining operations run thousands of ASICs in warehouses located near cheap electricity sources.
See Bitcoin Mining Explained Visually
Bitcoin From Scratch dedicates an entire section to mining and network security - including 3D animated explanations of proof of work, hash functions, and how the blockchain stays secure. See exactly what miners do, animated.
Start Bitcoin From Scratch - $97