A more efficient for loop index proceeding #49
Labels
bug
Something isn't working
G (Gas Optimization)
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
Jujic
Vulnerability details
Impact
Here you could use unchecked{++i} to save gas since it is more efficient then i++.
Proof of Concept
https://github.com/code-423n4/2022-01-timeswap/blob/bf50d2a8bb93a5571f35f96bd74af54d9c92a210/Timeswap/Timeswap-V1-Core/contracts/TimeswapPair.sol#L359
Tools Used
Remix
Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: