code-423n4 / 2022-09-artgobblers-findings

0 stars 0 forks source link

Gas Optimizations #449

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

+1 days things should be unchecked

https://github.com/code-423n4/2022-09-artgobblers/blob/main/src/ArtGobblers.sol

327: gobblerRevealsData.nextRevealTimestamp = uint64(_mintStart + 1 days);
535: gobblerRevealsData.nextRevealTimestamp = uint64(nextRevealTimestamp + 1 days);

Since time shouldn't overflow, it should be unchecked

327: unchecked { gobblerRevealsData.nextRevealTimestamp = uint64(_mintStart + 1 days); }
535: unchecked { gobblerRevealsData.nextRevealTimestamp = uint64(nextRevealTimestamp + 1 days); }
GalloDaSballo commented 1 year ago

50 gas

GalloDaSballo commented 1 year ago

As single report it's underwhelming