How Bitcoin Mining Works
Bitcoin mining is the process by which new blocks are added to the blockchain and transactions are secured. Miners compete to solve a cryptographic puzzle, and the first to find a valid solution earns the right to propose the next block along with a reward in newly minted bitcoin.
More from this site
Keep reading the latest coverage
The Proof-of-Work Puzzle
At its core, mining relies on a hash function called SHA-256. Miners take the contents of a candidate block — including a special number called a nonce — and run them through the hash function. The goal is to produce a hash that is below a target value set by the network. Because hash functions are unpredictable, the only way to find a qualifying hash is by trying trillions of different nonces, which requires enormous computational effort.
From Puzzle to Block
When a miner finds a valid hash, it broadcasts the block to the network. Other nodes verify the solution and the transactions inside. If everything checks out, the block is appended to the chain and the miner claims the reward. This reward, known as the block subsidy, started at 50 bitcoin and is cut roughly every four years in an event called the halving.
Why Mining Matters
Mining serves two purposes: it issues new bitcoin in a decentralized way, and it secures the network by making it prohibitively expensive to rewrite history. To alter a past block, an attacker would need to redo the work for that block and every block after it, which is practically infeasible at today's network scale.
Hardware and Energy
Early mining was done on CPUs, then GPUs, and eventually specialized hardware called ASICs. Because the puzzle difficulty adjusts to the total computing power on the network, individual miners must invest in efficient equipment and cheap electricity to remain competitive.
Mining Pools and Solo Mining
Most miners join pools, combining their computing power and sharing rewards proportionally. Solo mining is possible but unpredictable; without a large share of the network's hash rate, finding a block can take years.
| Component | Role |
|---|---|
| SHA-256 hash function | Creates the cryptographic puzzle miners solve |
| Nonce | Variable miners change to find a valid hash |
| Block subsidy | Newly minted bitcoin awarded per block |
| Difficulty adjustment | Keeps block times around 10 minutes on average |
| Mining pool | Groups miners to smooth out reward variance |