Omniscia Maverick Protocol Audit
MaverickV2VotingEscrowFactory Code Style Findings
MaverickV2VotingEscrowFactory Code Style Findings
MVY-01C: Ineffectual Usage of Safe Arithmetics
| Type | Severity | Location |
|---|---|---|
| Language Specific | ![]() | MaverickV2VotingEscrowFactory.sol:L66 |
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/MaverickV2VotingEscrowFactory.sol
65for (uint256 i = startIndex; i < endIndex; i++) {66 returnElements[i - startIndex] = _allVotingEscrow[i];67}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 operation has been properly wrapped in an unchecked code block, optimizing its gas cost whilst retaining its security guarantees via preceding statements.
