Omniscia Maverick Protocol Audit

MaverickV2VotingEscrowLens Code Style Findings

MaverickV2VotingEscrowLens Code Style Findings

MVL-01C: Ineffectual Usage of Safe Arithmetics

Description:

The linked mathematical operation is guaranteed to be performed safely by logical inference, such as surrounding conditionals evaluated in require checks or if-else constructs.

Example:

v2-rewards/contracts/MaverickV2VotingEscrowLens.sol
24for (uint256 i = startIndex; i < endIndex; i++) {
25 returnElements[i - startIndex] = ve.claimInformation(account, i);
26}

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 (07ad29f773f16bdfbae3d97d3a7c2f9d64866093):

The referenced operations have been properly wrapped in unchecked code blocks, optimizing their gas cost whilst retaining their security guarantees via each operation's preceding statements.