An attacker could exploit this to make _auctionElapsedTime return a low value when it should be high, thereby manipulating the reward calculation.
The vulnerability comes from the subtraction (currentTime - sequenceOffset) which could underflow if sequenceOffset is maliciously set to a very large value greater than currentTime.
For example:
currentTime = 100
sequenceOffset = 200
Then currentTime - sequenceOffset will underflow to a very large number close to 2^64.
This can then cause the modulo % sequencePeriod to return an incorrect elapsed time.
Manual
add an explicit check for underflow before doing the subtraction
Other
The text was updated successfully, but these errors were encountered:
All reactions