Intermediate Lesson 5 4 min read

Difficulty: the adjustment every 2,016 blocks

Doubling the mining power does not create more bitcoin. It raises the difficulty, and the clock keeps ticking at ten minutes.

If tomorrow twice as many machines in the world were turned on to mine, Bitcoin would still produce one block every ten minutes and exactly the same amount of coins per day. More effort does not generate more money. It only generates more difficulty — and understanding this detail is understanding why issuance is a rule and not a promise.

The mechanism is a thermostat. Every 2,016 blocks, which should take exactly two weeks, each node in the network independently performs the same calculation: how long did these 2,016 blocks actually take? If they took less time, the target tightens proportionally, and the hashes need to be smaller. If they took more time, the target loosens. The adjustment is limited to a factor of four on each side, so that no major shock throws the network to an extreme.

The faster it spins, the more the regulator closes the valve. No one decides: the mechanism decides.

Notice who makes this adjustment: no one. There is no server that recalculates the difficulty and informs the miners. Each node, with the headers it already has, arrives at the same number at the same block because the calculation is deterministic and the data is public. A node that calculated differently would simply reject the blocks from others and remain alone in its own version of reality.

The most beautiful proof that this works came in 2021. Between May and July of that year, China banned mining in the country, and something close to half of the network's computing power was turned off or loaded onto trucks in a few weeks. The immediate effect was predictable: with fewer machines searching, blocks started taking around twenty minutes.

In 2021, half of the world's machines left one country, inside trucks.

On July 3, 2021, without a meeting, without a statement, and without a vote, the difficulty dropped by 27.94% — the largest drop in the network's history. Blocks returned to ten minutes. The machines were reinstalled in Texas, Kazakhstan, and Paraguay over the following months, the computing power rose again, and the difficulty increased along with it, adjustment after adjustment, without anything needing to be decided.

It's worth clearing up a common vocabulary confusion. The network's computing power, the hashrate, is not measured by anyone — there's no way to count machines scattered around the world that do not identify themselves. It is estimated inversely: knowing the difficulty and observing how long blocks are taking, one deduces how much force must be searching. Every hashrate graph you've ever seen is an inference, not a count.

No matter how tense the spring is, the escapement releases one tooth at a time.

There is also a charming detail for those who like code. The adjustment calculation, as Satoshi wrote it, uses the interval of 2,015 blocks instead of 2,016 — a counting error of one. The effect is tiny, blocks are on average a few seconds faster than they should be, and it has never been corrected: fixing it would change the consensus rule, and the network prefers a known and harmless flaw to an unnecessary change.

A practical consequence applies to those who mine: a miner's revenue does not depend on how much power they have, but on the fraction of the total power they represent. Buying twice as many machines in a market where everyone bought twice as many changes nothing — and it's this race that pushes mining to where energy is cheaper, as the beginner trail described.

Finally, difficulty is the price of an attack. Rewriting past blocks requires redoing the work of all of them faster than the entire network does the new work. Each upward adjustment increases this cost, and that's why Bitcoin's security is not just a property of cryptography: it is an economic property, updated every two weeks.

You already know what a transaction carries, how a coin is locked, how space is contested, how a block is assembled, and how the clock is maintained. What remains is the piece that verifies all this on your side, on a common computer, without asking anyone anything. In the next lesson, running a node.