The short answer
Miners decide the order transactions go in, and they buy that right with electricity.
Everything else about mining follows from those two facts. It is not clever, it is not a puzzle in the crossword sense, and no miner ever works anything out. They guess, an enormous number of times per second between them, and one of them gets lucky roughly every ten minutes.
The expense is not a side effect to be engineered away. It is the product. Rewriting the blockchain means redoing that spending, faster than everybody else is doing it live.
What a miner is actually doing
A miner takes valid transactions out of the mempool, the waiting area where unconfirmed transactions sit, and assembles a candidate block. Then it hashes the block's 80-byte header and checks whether the result is below a number called the target.
Almost always it is not. So the miner changes the nonce, a field in the header that exists purely to be changed, and hashes again. And again. There is no shortcut, because the hash function gives no hint about which input produces a smaller output. The only strategy is volume.
When some miner finally lands a hash under the target, it publishes the block. Every node on the network can verify that block with a single hash operation, in microseconds, which is the elegance of the arrangement: enormously expensive to produce, trivially cheap to check.
Why the difficulty moves
Every 2,016 blocks, roughly two weeks, every node independently recalculates the target based on how long the previous 2,016 took. Faster than two weeks and the target tightens. Slower and it loosens. The aim is a ten-minute average regardless of how much hardware is running.
That mechanism is not theoretical, and it has been stress-tested in public. When China banned mining in mid-2021, the network lost about half of its hashrate within weeks. Blocks slowed down, the next adjustment cut difficulty by the largest margin in Bitcoin's history, and block production returned to normal. We wrote that up in Bitcoin lost half its hashrate and kept producing blocks.
Note what difficulty adjustment does and does not do. It keeps block timing stable when hashrate changes. It does nothing at all about who owns that hashrate.
Where the money comes from
A miner who finds a block collects two things.
The subsidy, which is new bitcoin, created in that block and in no other way. It started at 50 per block and halves every 210,000 blocks. Since block 840,000 on 20 April 2024 it has been 3.125 bitcoin. It will halve again around 2028, and keep halving until it rounds to nothing near the year 2140.
The fees attached to the transactions included in the block. Users bid for space, since blocks are capped, and miners take the highest bidders. As the subsidy shrinks toward zero, fees have to carry the security budget on their own. Whether they will is a genuinely open question, and anybody who tells you it is settled is selling something.
Against that, miners pay for machines, power and cooling. Public filings give the only numbers you can check: Riot Platforms reported an all-in cost of $89,074 per bitcoin mined for the third quarter of 2025. That is one company in one quarter, not an industry average, but it is a real figure from a real filing rather than an estimate.
What a majority of hashrate could and could not do
A 51% attack means one party controlling more than half the hashrate. It is worth being precise about what that buys, because the popular version is wrong in both directions.
It could: exclude transactions from blocks, so specific payments never confirm while the attack lasts. And reverse its own recent transactions, by building a longer chain that omits them, which is how a double spend against a merchant would work. Both effects fade the moment the majority does.
It could not: spend coins it has no key for, because signatures are checked by every node and no amount of hashrate forges one. It could not raise the 21 million cap, change the subsidy, or hand itself coins, because nodes reject blocks that break those rules no matter how much work is behind them. And it could not rewrite deep history, because every block of work would have to be redone.
The defence is mostly economic. A party with that hardware earns more using it honestly than destroying the thing that gives their hardware value. That is an incentive argument, not a proof, and it is worth holding it as such.
The centralisation people actually worry about
Individual miners rarely mine alone. They join a pool, which combines everybody's hashrate and shares the payouts, turning a lottery ticket into a wage. That is reasonable for the individual miner and it concentrates something important: historically the pool operator, not the miners, chose which transactions went into the block.
Difficulty adjustment does nothing about this, and posts that claim otherwise are confusing two unrelated mechanisms. The actual work on it is protocol work. Stratum V2 lets an individual miner build and declare its own block template while still pooling the income, and the first block mined that way landed in June 2026: a miner picked the transactions in block 955,318.
The energy question
Mining uses a lot of electricity, and no honest version of this post pretends otherwise. It converts electricity into ordering that nobody can veto, which is either a fair trade or it is not, but the trade is the design.
The number people quote is usually an estimate with wide error bars. The Cambridge Centre for Alternative Finance runs the most cited one, and in 2023 it changed its model and restated 2021 downward by 15 TWh without anything on the network having changed: Cambridge cuts its Bitcoin electricity estimate. Treat any single figure, high or low, with that in mind, and check the current estimate rather than repeating one from an article.
Where to go next
Miners propose. Bitcoin nodes dispose, and the relationship between those two is the part of Bitcoin that most people have backwards.
