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

0 stars 0 forks source link

Gas Optimizations #469

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

Contract: GobblerReserve.sol

Changing i++ to ++i in the for loop of:

line 37

will save around 5 gas per iteration.

Recommendation:

for (uint256 i = 0; i < ids.length; ++i) {

This will also bring more code consistency given that all other for loops in contracts under review follow this logic.

GalloDaSballo commented 1 year ago

Only 5 gas, closing as invalid against reports that save 4k+ gas