How Mining Actually Works
Lesson by Uvin Vindula
Mining Is Not What You Think
When most people hear "Bitcoin mining," they picture someone with a pickaxe chipping away at digital rocks. The reality is far more fascinating. Bitcoin mining is the process by which new transactions are verified, bundled into blocks, and permanently added to the blockchain. Miners are not digging for coins — they are competing to solve a computational puzzle, and the winner earns the right to add the next block and collect a reward.
Mining is the backbone of Bitcoin's security model. Without miners, there would be no one to validate transactions, and the network would collapse. It is the mechanism that makes Bitcoin trustless — you do not need to trust any single entity because thousands of miners independently verify every transaction.
The Proof-of-Work Mechanism
Bitcoin uses a consensus mechanism called Proof-of-Work (PoW). Here is how it works, step by step:
- Transaction collection: When you send Bitcoin to someone, that transaction is broadcast to the network. Miners collect these pending transactions from a waiting area called the mempool (memory pool).
- Block construction: Each miner assembles a candidate block containing transactions they have selected — typically prioritizing those with higher fees. Each block can hold roughly 1 MB of transaction data, which translates to about 2,000–3,000 transactions.
- The puzzle: Miners must find a number called a nonce (number used once) that, when combined with the block's data and run through a cryptographic hash function (SHA-256), produces a hash that starts with a certain number of zeros. This target is set by the difficulty parameter.
- Trial and error: There is no shortcut to finding the correct nonce. Miners must try billions and billions of different nonces until they find one that works. This is pure computational brute force.
- Block propagation: When a miner finds a valid nonce, they broadcast the completed block to the network. Other nodes verify the block is valid (correct hash, valid transactions, proper structure) and add it to their copy of the blockchain.
- Reward: The winning miner receives the block reward (currently 3.125 BTC after the April 2024 halving) plus all the transaction fees from the transactions included in the block.
Understanding the Hash Function
The SHA-256 hash function is central to mining. It takes any input and produces a fixed 64-character hexadecimal output. Key properties include:
- Deterministic: The same input always produces the same output
- One-way: You cannot reverse-engineer the input from the output
- Avalanche effect: Changing even one character in the input completely changes the output
- Fixed length: Whether you input one word or an entire book, the output is always 64 characters
For example, the SHA-256 hash of "Bitcoin" produces a completely different result from "bitcoin" (with a lowercase b). This unpredictability is what makes mining a guessing game — you cannot predict what nonce will give you a valid hash.
Difficulty Adjustment — Bitcoin's Thermostat
Every 2,016 blocks (approximately every two weeks), Bitcoin automatically adjusts the mining difficulty. The goal is to maintain an average block time of 10 minutes. If blocks are being found too quickly (more miners have joined), the difficulty increases. If blocks are being found too slowly (miners have left), the difficulty decreases.
This self-regulating mechanism is one of Bitcoin's most elegant features. It ensures that no matter how much computing power is thrown at the network, blocks are produced at a steady, predictable rate. As of early 2026, the difficulty has reached all-time highs, reflecting the enormous amount of hash power securing the network.
The Block Reward and Halving
When Bitcoin launched in 2009, the block reward was 50 BTC. Every 210,000 blocks (approximately four years), this reward is cut in half — an event known as the halving. The halving schedule so far:
| Year | Block Reward | Total BTC Mined by End |
|---|---|---|
| 2009 | 50 BTC | ~10.5 million |
| 2012 | 25 BTC | ~15.75 million |
| 2016 | 12.5 BTC | ~18.375 million |
| 2020 | 6.25 BTC | ~19.6875 million |
| 2024 | 3.125 BTC | ~20.34 million |
The next halving is expected around 2028, when the reward will drop to 1.5625 BTC. Eventually, around the year 2140, the last Bitcoin will be mined, bringing the total supply to exactly 21 million. After that, miners will be compensated entirely through transaction fees.
Why Does Mining Matter?
Mining is not just about creating new coins. It serves three critical functions:
- Security: The enormous computational power required to mine makes it practically impossible to attack the network. To alter a past transaction, an attacker would need more than 50% of the total hash power — an astronomically expensive proposition.
- Decentralization: Anyone with the right hardware can mine, preventing any single entity from controlling the network.
- Fair issuance: New coins are distributed to those who invest real resources (electricity and hardware), creating a fair and transparent issuance schedule.
Key Takeaways
- •Bitcoin mining is the process of verifying transactions and adding new blocks to the blockchain through computational work
- •Proof-of-Work requires miners to find a nonce that produces a hash meeting the difficulty target — pure trial and error
- •The SHA-256 hash function is deterministic, one-way, and unpredictable — making mining a brute-force guessing game
- •Difficulty adjusts every 2,016 blocks (~2 weeks) to maintain a 10-minute average block time regardless of total hash power
- •Block rewards halve every ~4 years — currently 3.125 BTC after the April 2024 halving, with the next halving expected around 2028
- •Mining secures the network, decentralizes control, and provides a fair coin issuance mechanism
Quick Quiz
Question 1 of 3
0 correct so far
What is the primary purpose of Bitcoin mining?