Zawy’s Alternating Timestamp Attack

Let’s assume an attacker has already alternated one period of 4x difficulty increases with two periods of cumulative 1/16x difficulty decreases multiple times to bring difficulty down to a level at which they can produce six blocks per second (the maximum rate that can be sustained without increasing MTP faster than wall time).

To keep difficulty the same, the attacker must set the last block in a period to two weeks later than the first block in the period. The cleanup/BIP94 anti-time-warp rule says the first block in the subsequent period must be about the same time (or later). That means, to keep difficulty the same in that subsequent period, the attacker must set the last block in that subsequent period to two weeks later than its first block (four weeks later than the first block of the first period). Eventually, a succession of these time increases will push the time used at retarget boundaries into the wall-time future (assuming the actual rate of block production exceeds 2,016 blocks/two weeks).

If an attacker instead uses minimal timestamps for all but the first block in one period (allowing difficulty to rise 4x) and then sets the final block in the subsequent period to 8 weeks later than the first block (lowering difficulty 4x), they can alternative this pattern indefinitely to produce up to 6 blocks per second without increasing the relative difference between any block time and wall time.

In other words, using alternation, if the two blocks that are set to 8 weeks later than their predecessor blocks still have a block time less than wall time + two hours, they’ll be accepted by full nodes. Not using alternation with the same 6 blocks/per second rate and the same starting time will quickly produce a chain that includes some block times far in the future, which will not be accepted until wall time catches up.

1 Like