Omniscia Boson Protocol Audit

SellerHandlerFacet Code Style Findings

SellerHandlerFacet Code Style Findings

SHF-01C: Loop Iterator Optimization

Description:

The linked for loop increments / decrements the iterator "safely" due to Solidity's built-in safe arithmetics (post-0.8.X).

Example:

contracts/protocol/facets/SellerHandlerFacet.sol
277for (i = 0; i < collectionCount; i++) {

Recommendation:

We advise the increment / decrement operation to be performed in an unchecked code block as the last statement within the for loop to optimize its execution cost.

Alleviation (2b9f60b6c3323fd234b570089ceff924cdb5851c):

The referenced iterator increment statement has been properly relocated to the end of the for loop body and wrapped in an unchecked code block, rendering this exhibit alleviated.