Blockchain Mining Simulator: Hash Rate, Difficulty & Block Rewards

simulator intermediate ~10 min
Loading simulation...
T ≈ 2.6s per block — mining at 100 kH/s, difficulty 8

At 100 kH/s with difficulty 8 (target requires 256 leading zero combinations), expect to mine one block every 2.6 seconds — far faster than Bitcoin's 10-minute average.

Formula

E[hashes] = 2^difficulty
Block time ≈ 2^D / hash_rate
Revenue = reward × blocks_per_hour + fees

The Mining Race

Blockchain mining is a competitive lottery where miners burn computational energy for the chance to add the next block and earn rewards. Each miner repeatedly hashes a candidate block with different nonces, searching for a hash value below the network's difficulty target. The first miner to find a valid hash broadcasts it, and all other miners verify and accept it — resetting the race for the next block.

Difficulty Adjustment

The genius of Bitcoin's design is its self-adjusting difficulty. If more miners join (increasing total hash rate), blocks would be found too quickly without adjustment. Every 2016 blocks, the protocol compares actual elapsed time against the expected 20160 minutes and scales the difficulty target proportionally. This ensures blocks arrive approximately every 10 minutes regardless of how much or how little computing power is on the network.

Block Structure

Each block contains a header (previous block hash, Merkle root of transactions, timestamp, nonce, and difficulty target) and a body (the ordered list of transactions). The header is just 80 bytes — it is what gets hashed. The Merkle root summarizes all transactions in a compact 32-byte hash, allowing efficient verification that any specific transaction is included in the block.

Economics of Mining

Mining profitability depends on hardware efficiency (hashes per joule), electricity cost, block reward, and transaction fees. As block rewards halve every four years, miners increasingly depend on fees. The hash rate naturally adjusts: unprofitable miners shut down, reducing difficulty until mining is again viable. This economic feedback loop has maintained Bitcoin's security through multiple reward halvings.

FAQ

How does blockchain mining work?

Miners collect pending transactions into a block, append a random nonce, and hash the block header. If the hash is below the difficulty target (has enough leading zeros), the block is valid and added to the chain. The miner earns the block reward plus transaction fees. This process repeats trillions of times per second across the network.

What determines mining difficulty?

The network adjusts difficulty every 2016 blocks (approximately 2 weeks in Bitcoin) to maintain a 10-minute average block time. If blocks are mined too quickly, difficulty increases; if too slowly, it decreases. This self-regulating mechanism ensures consistent block production regardless of total hash rate.

Why does mining use so much energy?

Mining is intentionally computationally expensive — that is the security mechanism. The energy cost of reversing a transaction (mining a longer alternative chain) must exceed the value of the transaction to prevent double-spending. Bitcoin's annual energy consumption rivals that of some countries.

What happens when all bitcoins are mined?

The block reward halves every 210,000 blocks (approximately 4 years). The last bitcoin will be mined around 2140. After that, miners are incentivized solely by transaction fees. The transition is gradual, and fee markets are already developing.

Sources

Embed

<iframe src="https://homo-deus.com/lab/cryptocurrency/blockchain-mining/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub