You’ve probably heard that Bitcoin uses more electricity than all of Switzerland. You might also have heard that miners are “solving complex equations.”
One of these statements is true. The other is nonsense. Neither explains what mining actually does, and they divert from a more interesting question: whether or not Bitcoin’s consumption is even a flaw to be fixed.
In this guide, I’ll use interactive diagrams to demonstrate what the miners are really doing with all that electricity. We’ll discover how mathematics and game theory guarantee Bitcoin’s security and issuance schedule, and explore how the entire system represents something which was thought to be impossible before 2009.
A trustless ledger
Imagine four friends who regularly transact with one another. To avoid constantly settling debts in person, they agree to maintain a shared ledger: a running list of who paid whom, and how much. At any point, they can tally up the transactions to see everyone’s balance.
📒 Transaction Ledger
Balances
Transactions
This works fine - as long as someone trustworthy maintains the ledger. A bank does exactly this for millions of customers. But what if there’s no bank? What if you want to transact directly with strangers across the world, without any central authority being able to veto transactions or seize your funds?
If everyone keeps their own copy of the ledger, you have a new problem: how do you prevent someone from writing a fraudulent transaction? How do you get thousands of strangers to agree on which transactions are valid and in what order they occurred?
Mining lies at the intersection of all these questions.
Before we dive into an interactive example of mining, we must first take a brief detour to familiarize ourselves with hashing.
Digital fingerprints
Hashing is fundamental to many aspects of Bitcoin. A hash function takes any input - a word, a sentence, an entire novel - and produces a fixed-length output called a hash or digest. Bitcoin uses the SHA-256 algorithm, which always outputs 256 bits (64 hexadecimal characters).
🔐 SHA-256 Hash Demo
SHA-256 Hash:
Try typing something above, then change a single character and watch what happens.
A few properties make hash functions useful:
- Deterministic: The same input always produces the same output. A hash may look random, but it’s not.
- One-way: You can’t reverse-engineer the input from its hash. The only way to find an input that produces a specific hash is to guess.
- Avalanche effect: A tiny change to the input produces a completely different hash.
This is the building block of everything that follows.
The mining lottery
A Bitcoin miner’s job is to find a hash “below a target value”. In practice, this means the hash needs to start with a certain number of zeros. The more leading zeros required, the harder it is to find. A hash starting with 0000... is rarer than one starting with 00..., which is rarer than one starting with 0....
Because hash functions are one-way, there are no shortcuts. You can’t work backwards from a desired hash to find the input. The only way to find a valid one is to guess.
Each miner takes the latest batch of unconfirmed Bitcoin transactions - known as a “candidate block” - and starts guessing. The block has a special field called a nonce: simply a number that miners increment with each attempt to produce a different hash. They keep guessing until they find one that meets the current difficulty requirement, and when this happens, they’re rewarded with freshly minted bitcoins.
🎲 Mining Lottery
Block Data:
Choose a Nonce
Resulting Hash:
Mining is a lottery. Each hash is a ticket, and the vast majority of tickets lose. There’s no skill involved, no clever trick that lets you guess better. The only way to improve your odds is to guess faster - to submit more lottery tickets per second. This is why miners invest in specialized hardware called ASICs that can compute trillions of hashes per second.
The term “proof of work” is apt. The work is the proof. Finding a valid hash demonstrates that you did the computational work to find it. It cannot be faked.
But this raises an interesting question: why can’t a supercomputer simply mine all the Bitcoin at once? Think about it - the power and sheer number of computer chips mining Bitcoin since 2009 has grown astronomically. As Bitcoin’s market cap has ballooned, so too has the economic incentive to obtain more of it as quickly as possible. How has the issuance rate remained so steady?
Chaining blocks
This is where difficulty adjustment comes in - and it’s arguably Bitcoin’s most important innovation. Below, I’ve created a mining simulator to demonstrate how it works: you can mine blocks, adjust the difficulty, and watch the blockchain grow.
⛏️ Mining Simulator
Candidate Block
0000000000000000000000000000000000000000000000000000000000000000 Transactions — Nonce Resulting Hash
Blockchain
Notice how each block includes the previous block’s hash. This is what makes it a chain. If you wanted to change a transaction in an old block, you’d need to:
- Recalculate that block’s hash (finding a new valid nonce)
- Recalculate every subsequent block’s hash (since they all reference the one before)
- Do all this faster than the rest of the network is extending the chain
This is what gives Bitcoin its immutability. The deeper a block is buried under subsequent blocks, the more “confirmations” it has, and the more computational work would be required to alter it. The network always accepts the longest valid chain as the canonical history.
A decentralized clock
Bitcoin targets one new block every 10 minutes, on average, and the difficulty is adjusted automatically to maintain this frequency. Every 2,016 blocks (roughly two weeks), the network measures how long the previous batch took. If blocks came too fast, difficulty increases. Too slow, it decreases. The target is always 10 minutes.
“No matter how hard you dig for this digital gold, at a certain point you won’t be able to get more bitcoin out of it.” - Gigi, 21 Lessons
The orange line below shows Bitcoin’s total supply approaching its hard cap of 21 million coins. The dashed lines mark halvings: every 210,000 blocks, the mining reward is cut in half. Toggle the hash rate series using the chart legend and notice how it has grown exponentially - yet the supply curve doesn’t care. It marches on at the same predetermined pace.
📈 Bitcoin Issuance
Unlike gold, where a higher price incentivizes more mining and thus more supply, Bitcoin’s issuance schedule is fixed. Double the hash power, and you don’t get twice the bitcoin - you just make the puzzle twice as hard. The difficulty adjustment ensures that no amount of computational power can accelerate Bitcoin’s monetary policy.
Prior attempts at digital scarcity lacked this self-correcting mechanism, relying instead on human oversight or trusted third parties. Bitcoin replaced human restraint with mathematics.
There’s another way to think about this. As Gigi writes in 21 Lessons, Bitcoin solves a problem that had never been solved before: telling time in a decentralized system. Without a central authority, how do distributed participants agree on the order of events, or ensure everyone adheres to an issuance schedule?
“Bitcoin isn’t about computation. It is about independently agreeing on the order of things.”
The blockchain is a decentralized clock and a decentralized ledger. Each block of transactions is a tick. Proof of work is the mechanism that makes the ticking trustworthy. The difficulty adjustment is what keeps the clock accurate, no matter how the network’s computational power changes over time.
The cost of trust
Remember the two claims we started with? That miners are “solving complex equations,” and that Bitcoin uses more electricity than Switzerland.
You now know the first is nonsense. Miners aren’t solving anything. They’re guessing trillions of times per second in a lottery that no-one controls and no-one can rig.
The second statement might be true. But after seeing how proof of work actually functions, the interesting question isn’t how much energy Bitcoin consumes but what that energy buys.
It buys the first system of absolute digital scarcity. With that in mind, some believe it’s more relevant to compare the network’s energy consumption with that of the global banking system.
Before Bitcoin, copying digital information was essentially free. Proof of work made it expensive, and the difficulty adjustment made it permanent. Building on ideas from hashcash and the ambitions of DigiCash and bit gold, Bitcoin achieved something none of its predecessors could: money with no issuer, secured by nothing but physics and mathematics.
Each hash is trivial. But collectively, the trillions of hashes computed every second create something that had never existed before 2009: a system where strangers across the world can agree on a shared history - and transfer genuine scarcity - without trusting anyone.
Thanks for reading! If you found this guide valuable, consider supporting my work:
And subscribe to be notified when I publish new articles: