Omniscia Arcade XYZ Audit

ArtBlocksVerifier Code Style Findings

ArtBlocksVerifier Code Style Findings

ABV-01C: Ineffectual Usage of Safe Arithmetics

Description:

The linked mathematical operation is guaranteed to be performed safely by surrounding conditionals evaluated in either require checks or if-else constructs.

Example:

contracts/verifiers/ArtBlocksVerifier.sol
110found++;
111
112if (found >= item.amount) break;

Recommendation:

Given that safe arithmetics are toggled on by default in pragma versions of 0.8.X, we advise the linked statement to be wrapped in an unchecked code block thereby optimizing its execution cost.

Alleviation (7a4e1dc948e94ded7385dbb74818bcf93ecc207c):

The referenced increment of the found variable has been wrapped in an unchecked code block safely, optimizing its gas cost.

ABV-02C: 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/verifiers/ArtBlocksVerifier.sol
86for (uint256 i = 0; i < items.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 (7a4e1dc948e94ded7385dbb74818bcf93ecc207c):

All referenced iterator optimizations have been applied, addressing this exhibit in full.