entekhab.netentekhab.nettrilingual encyclopedia

Difficulty Adjustment

ENGLISHDifficulty Adjustmentreference
فارسیتنظیم سختیEstablished equivalent
کوردیڕێکخستنی قورسیProposed equivalent — not standard
Category
Blockchain
Level
Professional

Simple definition

The network's self-correction: if blocks are arriving too fast it makes mining harder, and if too slow it makes mining easier.

Professional definition

A rule that recalculates the mining target so the average block interval returns to its goal. Bitcoin retargets every 2,016 blocks against a ten-minute average, scaling difficulty by the ratio of expected to actual elapsed time, clamped to a factor of four in either direction.

Technical definition

Retargeting is feedback on realised block times, not on hashrate: the protocol cannot observe hashrate, only the timestamps in its window. The clamp exists because manipulated timestamps or a sudden collapse in participation could otherwise swing difficulty by an extreme factor in one step. It corrects the mean over the window, so between retargets a chain simply runs fast or slow. Slot-based proof of stake has no equivalent, because block timing is scheduled rather than searched.

Academic definition

A negative-feedback control rule that rescales the proof-of-work target in proportion to the deviation of realised block-production time from the protocol's objective over a fixed window.

Mechanism

The loop closes on time, not on power. More participation makes blocks arrive early, which raises difficulty at the next retarget until the mean returns to target; withdrawal does the reverse. That is why issuance keeps to a schedule no matter how much hardware joins, and why a chain losing most of its hashrate can crawl until the window finally closes.

In practice

Who uses it
Miners and pool operators planning capacity, hardware buyers modelling revenue, chain analysts, and anyone forecasting issuance or block times.
Why it matters
It keeps the issuance schedule and the average block interval stable across enormous swings in participation, which is what makes supply predictable.
Limitations
It corrects the average over a window, so it cannot protect against intra-window swings, timestamp manipulation at the margins, or a collapse that stalls the chain before the next retarget.

Common mistakes

  • Reading difficulty as a price signal rather than a time-correction signal.
  • Projecting hashrate changes onto difficulty with no retarget lag.
  • Assuming all chains retarget on Bitcoin's schedule.

Examples

numeric

A window of 2,016 blocks closes in 12 days instead of 14. Expected time was 20,160 minutes, actual 17,280, so difficulty rises by the ratio 20,160 over 17,280 — about 16.7 percent — pushing the average interval back toward ten minutes.

Given
  • window = 2,016 blocks
  • expected = 2,016 x 10 = 20,160 minutes
  • actual = 17,280 minutes
Steps
  1. ratio = 20,160 / 17,280 = 1.1667
  2. D_new = D_old x 1.1667
difficulty up about 16.7 percent

Bitcoin clamps the ratio to the range one quarter to four, so a single retarget can never move difficulty beyond a factor of four.

crypto

When a large share of mining capacity goes offline mid-window, blocks slow immediately but difficulty does not move until the window ends. Users feel the delay for days before the correction lands.

Mathematical foundation

D_{new} = D_{old} \times \frac{T_{expected}}{T_{actual}}, \qquad T_{expected} = 2016 \times 10 \ \text{min}

Variables

D_{old}, D_{new}Difficulty before and after the retargetdimensionless
T_{expected}Time the window should have taken at the target intervalminutes
T_{actual}Time the window actually took, from block timestampsminutes

Procedure

At the end of a 2,016-block window, take the timestamp span of the window and compare it with the expected 20,160 minutes. Multiply current difficulty by expected over actual, then clamp the result so one step cannot change difficulty by more than a factor of four.

Worked example

Given
  • T_expected = 20,160 minutes
  • T_actual = 17,280 minutes
Steps
  1. ratio = 20,160 / 17,280 = 1.1667
  2. within the one-quarter-to-four clamp
  3. D_new = 1.1667 x D_old
difficulty increases by about 16.7 percent

Interpretation

A ratio above one means the window ran fast and mining must become harder; below one, the reverse. The output is a correction to the mean interval, never a forecast of the next block.

Assumptions

  • Bitcoin's parameters: a 2,016-block window, a ten-minute target and a clamp at a factor of four. Other chains retarget on different windows and some do so every block.
  • Bitcoin's implementation measures the span across 2,015 intervals rather than 2,016, a known off-by-one that leaves the realised average marginally under ten minutes.
  • Timestamps are producer-supplied within protocol tolerances, so the measured window is not a perfect clock.
Limits of the formula
  • It regulates the mean only; the spread of individual intervals is unaffected and stays wide.
  • Correction is retrospective. A sharp mid-window change in participation is felt in full until the window closes.

Related terminology

related
Proof of Work Hash Rate Block Time Nonce Bitcoin Halving Emission Rewards Cryptographic Hash
Commonly confused with

Hash Rate

Hashrate is how much search power the network applies. Difficulty is the protocol's response to it, observed through block timestamps and updated only at a retarget.

Sources

Bitcoin: A Peer-to-Peer Electronic Cash System
bitcoin.org · 2008-10-31 · section 4: a moving average targeting an average number of blocks per hour
https://bitcoin.org/bitcoin.pdf URL verified
Mastering Bitcoin, 2nd ed.
O'Reilly · 2017 · mining chapter: retargeting the proof-of-work difficulty, the 2,016-block window and the factor-of-four clamp
Print source
Proof-of-stake vs proof-of-work
Ethereum Foundation Developer Docs · absence of a difficulty search under slot-based proof of stake
https://ethereum.org/developers/docs/consensus-mechanisms/pos/pos-vs-pow/ URL verified

Editorial status

Needs expert reviewconsensusv1.02026-11-05

Flagged by the editor as uncertain on a linguistic, mathematical or regulatory point.

Kurdish headword ڕێکخستنی قورسی is this project's proposal and needs native-expert review. Window length, target interval and clamp are Bitcoin's parameters and are stated as such; the 2,015-interval off-by-one in the reference implementation is recorded in math.assumptions rather than smoothed over.