Omniscia Mean Finance Audit
SwapperRegistry Code Style Findings
SwapperRegistry Code Style Findings
SRY-01C: Loop Iterator Optimizations
| Type | Severity | Location |
|---|---|---|
| Gas Optimization | ![]() | SwapperRegistry.sol:L30, L35, L42, L61, L69, L77, L85 |
Description:
The linked for loops increment / decrement their iterator "safely" due to Solidity's built - in safe arithmetics(post - 0.8.X).
Example:
solidity/contracts/SwapperRegistry.sol
30for (uint256 i; i < _initialAdmins.length; i++) {Recommendation:
We advise the increment / decrement operations to be performed in an unchecked code block as the last statement within each for loop to optimize their execution cost.
Alleviation:
All for loops have been appropriately optimized via the usage of the unchecked code block for each iterator's increment.
