Futures
Access hundreds of perpetual contracts
TradFi
Gold
One platform for global traditional assets
Options
Hot
Trade European-style vanilla options
Unified Account
Maximize your capital efficiency
Demo Trading
Introduction to Futures Trading
Learn the basics of futures trading
Futures Events
Join events to earn rewards
Demo Trading
Use virtual funds to practice risk-free trading
Launch
CandyDrop
Collect candies to earn airdrops
Launchpool
Quick staking, earn potential new tokens
HODLer Airdrop
Hold GT and get massive airdrops for free
Pre-IPOs
Unlock full access to global stock IPOs
Alpha Points
Trade on-chain assets and earn airdrops
Futures Points
Earn futures points and claim airdrop rewards
A zero-day bug has been discovered in the Bitcoin mining mechanism - ForkLog: cryptocurrencies, AI, singularity, the future
Since launch, a computational error was present in the Bitcoin mining algorithm, allowing blocks to be mined at an extremely high speed. This was revealed by researcher Loïc Morel.
According to the publication, the flaw is related to the difficulty adjustment mechanism
Every 2016 blocks (roughly every two weeks), nodes recalculate the target value so that one block appears 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 then adjust the difficulty accordingly.
If we denote t0 as the timestamp of the first block, and t2015 as 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 obtain 2016 intervals, a different formula must be used: T = t2015 — t-1, where t-1 is the timestamp of the last block of the previous period.
This is called the “off-by-one” error. This bug introduces an error of approximately 0.05% toward slightly increased difficulty.
However, the real problem lies elsewhere. The flaw causes the adjustment periods not to overlap — the timestamp of the last block of one period is not considered when calculating the next.
Time manipulation
This gap makes a “time distortion” attack possible. Its principle is as follows:
By repeating this process multiple times, an attacker could theoretically reduce the mining difficulty to a level where up to six blocks are created per second (instead of one every 10 minutes).
The attack would be impossible if the first and last blocks of two consecutive periods matched.
How to fix this bug?
Morel noted that the issue can be fixed with a soft fork within BIP-0054.
The initiative involves ensuring that the first block of a new difficulty period has a timestamp that does not exceed the timestamp of the last block of the previous period by more than two hours.
This restriction restores “some form of continuity” between periods, prevents manipulation of time intervals, and makes the “time distortion” attack impossible.
Recall that in February, Castle Island Ventures partner Nick Carter predicted a “corporate takeover” of Bitcoin due to the quantum threat.