15,000 USDC
View results
Submission Details
Severity: gas
Valid

using ++i and uncheked is more gas saving

i++ is less gas efficient than ++i with unchecked math

for (uint256 i = 0; i < tokenAddresses.length; i++) {
// for (uint256 i = 0; i < tokenAddresses.length; ) {
unchecked { ++i ;}

Recommendations

using unchecked and ++i to increment the loop counter i

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.