Omniscia Maverick Protocol Audit

Code Style

Code Style

During the manual portion of the audit, we identified 29 optimizations that can be applied to the codebase that will decrease the operational cost associated with the execution of a particular function and generally ensure that the project complies with the latest best practices and standards in Solidity.

Additionally, this section of the audit contains any opinionated adjustments we believe the code should make to make it more legible as well as truer to its purpose.

These optimizations are enumerated below:

IDSeverityAddressedTitle
HBE-01CRedundant Safe Casting
MVI-01CGeneric Typographic Mistakes
MVI-02CIncorrect Vetoing Start Period (Error Argument)
MVI-03CInefficient Voting Budget Rollover Calculation
MVI-04CInefficient mapping Lookups
MVI-05CInexistent Re-Use of Local Variable
MVI-06CRedundant Duplicate Safe Casts
MVI-07CRedundant Local Variables
MVI-08CRedundant Unconditional Calculation of Maximum Vote Match
MVM-01CIneffectual Usage of Safe Arithmetics
MVM-02CSuboptimal Struct Declaration Style
MVR-01CIneffectual Usage of Safe Arithmetics
MVR-02CNon-Standard Validation of Ownership
MVR-03COptimization of Assignment
MVR-04COptimization of Reward Token Count Assignment
MVR-05CRedundant Safe Casting Operations
MVF-01CIneffectual Usage of Safe Arithmetics
MVW-01CCombination of Statements
MVW-02CIneffectual Usage of Safe Arithmetics
MVW-03CInefficient mapping Lookups
MVY-01CIneffectual Usage of Safe Arithmetics
MVL-01CIneffectual Usage of Safe Arithmetics
MVS-01CIneffectual Usage of Safe Arithmetics
MVS-02CInefficient mapping Lookups
RAG-01CRedundant Duplicate Read of Account Balance
VEW-01CGeneric Typographic Mistake
VEW-02CIneffectual Usage of Safe Arithmetics
VEW-03CInefficient Consecutive Operations
VEW-04CInefficient mapping Lookups