Omniscia Boson Protocol Audit

FundsHandlerFacet Code Style Findings

FundsHandlerFacet Code Style Findings

FHF-01C: Loop Iterator Optimizations

Description:

The linked for loops increment / decrement their iterator "safely" due to Solidity's built - in safe arithmetics (post-0.8.X).

Example:

contracts/protocol/facets/FundsHandlerFacet.sol
186for (uint i = 0; i < _limit; 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 (2b9f60b6c3323fd234b570089ceff924cdb5851c):

The referenced loop iterator increment statements have been properly relocated to the end of each for loop's body and wrapped in an unchecked code block, optimizing their execution cost.