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:
ID | Severity | Addressed | Title |
---|---|---|---|
HBE-01C | ![]() | ![]() | Redundant Safe Casting |
MVI-01C | ![]() | ![]() | Generic Typographic Mistakes |
MVI-02C | ![]() | ![]() | Incorrect Vetoing Start Period (Error Argument) |
MVI-03C | ![]() | ![]() | Inefficient Voting Budget Rollover Calculation |
MVI-04C | ![]() | ![]() | Inefficient mapping Lookups |
MVI-05C | ![]() | ![]() | Inexistent Re-Use of Local Variable |
MVI-06C | ![]() | ![]() | Redundant Duplicate Safe Casts |
MVI-07C | ![]() | ![]() | Redundant Local Variables |
MVI-08C | ![]() | ![]() | Redundant Unconditional Calculation of Maximum Vote Match |
MVM-01C | ![]() | ![]() | Ineffectual Usage of Safe Arithmetics |
MVM-02C | ![]() | ![]() | Suboptimal Struct Declaration Style |
MVR-01C | ![]() | ![]() | Ineffectual Usage of Safe Arithmetics |
MVR-02C | ![]() | ![]() | Non-Standard Validation of Ownership |
MVR-03C | ![]() | ![]() | Optimization of Assignment |
MVR-04C | ![]() | ![]() | Optimization of Reward Token Count Assignment |
MVR-05C | ![]() | ![]() | Redundant Safe Casting Operations |
MVF-01C | ![]() | ![]() | Ineffectual Usage of Safe Arithmetics |
MVW-01C | ![]() | ![]() | Combination of Statements |
MVW-02C | ![]() | ![]() | Ineffectual Usage of Safe Arithmetics |
MVW-03C | ![]() | ![]() | Inefficient mapping Lookups |
MVY-01C | ![]() | ![]() | Ineffectual Usage of Safe Arithmetics |
MVL-01C | ![]() | ![]() | Ineffectual Usage of Safe Arithmetics |
MVS-01C | ![]() | ![]() | Ineffectual Usage of Safe Arithmetics |
MVS-02C | ![]() | ![]() | Inefficient mapping Lookups |
RAG-01C | ![]() | ![]() | Redundant Duplicate Read of Account Balance |
VEW-01C | ![]() | ![]() | Generic Typographic Mistake |
VEW-02C | ![]() | ![]() | Ineffectual Usage of Safe Arithmetics |
VEW-03C | ![]() | ![]() | Inefficient Consecutive Operations |
VEW-04C | ![]() | ![]() | Inefficient mapping Lookups |