Since its inception, a computational error has existed in Bitcoin’s mining algorithm, allowing blocks to be mined at an exceptionally high speed. This was revealed by researcher Loïc Morel.
Satoshi s’est trompé.
Il y a un bug dans le minage de Bitcoin depuis le tout premier jour. C’est une simple erreur de calcul de Satoshi qui pourrait être exploitée pour miner des blocs à une vitesse délirante. C’est un des bugs que le BIP-0054 (en discussion) résout. Je vous… pic.twitter.com/GurNv3qKrZ
— Loïc Morel (@Loic_Pandul) April 11, 2026
According to the publication, the flaw is related to the difficulty adjustment mechanism.
Every 2016 blocks (approximately every two weeks), nodes recalculate the target to ensure a block is mined every 10 minutes, regardless of miners’ computational power. For this adjustment, nodes measure the duration of the last period, compare it to the target value (2016 x 600 = 1,209,600 seconds), and adjust the difficulty accordingly.
“The error lies in these calculations. To measure the timing of blocks in the past period, a node compares the timestamp of the first block of the period with the timestamp of the last. Instinctively, this seems logical, but it is actually a mistake because there are only 2015 intervals between the first and last blocks of the period, not 2016,” Morel explained.
If t0 is the timestamp of the first block and t2015 is the timestamp of the last, the node calculates the elapsed time as T = t2015 — t0. This results in 2015 intervals (from t0 to t1 > from t1 to t2 > … > from t2014 to t2015).
To achieve 2016 intervals, a different formula is needed: T = t2015 — t-1, where t-1 is the timestamp of the last block of the previous period.
This is known as an “off-by-one” error. This bug introduces an error of approximately 0.05% towards slightly increased difficulty.
However, the real issue lies elsewhere. The flaw results in non-overlapping adjustment periods—the timestamp of the last block of one period is not considered in the calculation of the next.
Time Manipulation
This gap enables a “time warp” attack. Its principle is as follows:
- A miner controlling a significant portion of computational power begins setting the minimum allowable timestamps for all blocks in the period (except the last).
- In the last block of the period, they artificially assign the maximum allowable timestamp.
- After the period ends, the difficulty is adjusted. Due to the attacker’s manipulation of timestamps, the measured period appears longer than it actually was, resulting in reduced difficulty.
- The attacker repeats a similar manipulation in the next period. Since periods do not overlap, the first block of the second attack period can have a timestamp from the distant past, while the previous block has a future timestamp. This gap increases from period to period.
By repeating the process several times, an attacker could theoretically reduce mining difficulty to a level where up to six blocks are created per second (instead of one every 10 minutes).
“The consequences would be dire: time locks become useless, the network is overloaded, the number of reorganizations increases, and transaction confirmations lose value. This would allow the attacker to collect block rewards at a frantic pace,” the researcher added.
The attack would be impossible if the first and last blocks of two consecutive periods coincided.
How to Fix This Error?
Morel noted that the issue can be addressed through a soft fork under BIP-0054.
The initiative proposes that the first block of a new difficulty period has a timestamp no more than two hours beyond the timestamp of the last block of the previous period.
This restriction restores “some form of continuity” between periods, prevents manipulation of time intervals, and renders the “time warp” attack unfeasible.
Back in February, Castle Island Ventures partner Nic Carter predicted a “corporate takeover” of Bitcoin due to the quantum threat.
