Closed code423n4 closed 2 years ago
Jujic
Using the unchecked keyword to avoid redundant arithmetic underflow/overflow checks to save gas when an underflow/overflow cannot happen.
https://github.com/code-423n4/2021-12-vader/blob/00ed84015d4116da2f9db0c68db6742c89e73f65/contracts/tokens/USDV.sol#L79
cycleTimestamp = block.timestamp + 24 hours;
Remix
Consider using 'unchecked' where it is safe to do so.
unchecked { cycleTimestamp = block.timestamp + 24 hours; }
Dup #130
Handle
Jujic
Vulnerability details
Impact
Using the unchecked keyword to avoid redundant arithmetic underflow/overflow checks to save gas when an underflow/overflow cannot happen.
Proof of Concept
https://github.com/code-423n4/2021-12-vader/blob/00ed84015d4116da2f9db0c68db6742c89e73f65/contracts/tokens/USDV.sol#L79
Tools Used
Remix
Recommended Mitigation Steps
Consider using 'unchecked' where it is safe to do so.