Omniscia Moby Audit
Code Style
Code Style
During the manual portion of the audit, we identified 82 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 |
---|---|---|---|
BPM-01C | Deprecated Revert Pattern | ||
BTN-01C | Ineffectual Usage of Safe Arithmetics | ||
BTN-02C | Inefficient mapping Lookups | ||
BTN-03C | Loop Iterator Optimizations | ||
CTX-01C | Potentially Redundant Contract Implementation | ||
CUE-01C | Potentially Redundant Contract Implementation | ||
CRE-01C | Inefficient Iterator Type | ||
CRE-02C | Loop Iterator Optimizations | ||
CRE-03C | Redundant Conditional Evaluation | ||
CRE-04C | Repetitive Value Literal | ||
ERC-01C | Inexistent Error Message | ||
ERC-02C | Variable Mutability Specifier (Immutable) | ||
EST-01C | Potentially Inefficient Shift Operation | ||
FPF-01C | Inexistent Usage of Existing Calculation | ||
FPF-02C | Loop Iterator Optimizations | ||
FPF-03C | Redundant Validation of Literal | ||
FDR-01C | Loop Iterator Optimization | ||
FDR-02C | Repetitive Value Literal | ||
MHT-01C | Suboptimal Implementation of Math::mulDiv | ||
OMR-01C | Deprecated Revert Pattern | ||
OMR-02C | Ineffectual Usage of Safe Arithmetics | ||
OMR-03C | Loop Iterator Optimizations | ||
OMR-04C | Redundant Code Repetition | ||
OMR-05C | Redundant Parenthesis Statements | ||
OMT-01C | Inefficient mapping Lookups | ||
OMT-02C | Loop Iterator Optimizations | ||
OMT-03C | Redundant Parenthesis Statement | ||
OTN-01C | Inefficient Iterator Type | ||
OTN-02C | Loop Iterator Optimization | ||
PMR-01C | Improper Operation Location | ||
PMR-02C | Ineffectual Usage of Safe Arithmetics | ||
PMR-03C | Redundant Code Repetition | ||
PMR-04C | Suboptimal Struct Declaration Styles | ||
PMR-05C | Test Code | ||
PVF-01C | Generic Typographic Mistake | ||
PVF-02C | Loop Iterator Optimizations | ||
RRV-01C | Redundant Code Repetitions | ||
RTR-01C | Deprecated Revert Pattern | ||
RTR-02C | Ineffectual Usage of Safe Arithmetics | ||
RTR-03C | Inefficient mapping Lookups | ||
RTR-04C | Loop Iterator Optimization | ||
SER-01C | Redundant Parenthesis Statement | ||
SPD-01C | Loop Iterator Optimization | ||
SPD-02C | Potentially Inefficient Storage Relation | ||
SPF-01C | Ineffectual Usage of Safe Arithmetics | ||
SPF-02C | Loop Iterator Optimization | ||
SPF-03C | Redundant Parenthesis Statements | ||
SPF-04C | Redundant Reservation of Memory | ||
TUP-01C | Inexistent Error Messages | ||
USL-01C | Inefficient Extraction of Option Entry | ||
USL-02C | Inefficient Iterator Types | ||
USL-03C | Inefficient Loop Iteration | ||
USL-04C | Inefficient Validation of Strike Prices | ||
USL-05C | Loop Iterator Optimizations | ||
USL-06C | Optimization of Condition Evaluation | ||
USL-07C | Redundant Bitwise Clear Operations | ||
USL-08C | Redundant Reservation of Memory | ||
USL-09C | Simplification of Strategy Conditions | ||
USL-10C | Suboptimal Bit Flipping Mechanism | ||
USL-11C | Suboptimal Opposite Strategy Evaluation | ||
USL-12C | Unutilized Contract Level Constant | ||
VTL-01C | Deprecated Revert Pattern | ||
VTL-02C | Ineffectual Usage of Safe Arithmetics | ||
VTL-03C | Repetitive Value Literal | ||
VTL-04C | Unused Contract Member | ||
VPF-01C | Deprecated Revert Pattern | ||
VPF-02C | Ineffectual Usage of Safe Arithmetics | ||
VPF-03C | Loop Iterator Optimization | ||
VPF-04C | Redundant Parenthesis Statements | ||
VUS-01C | Ineffectual Usage of Safe Arithmetics | ||
VUS-02C | Inefficient Array Copy | ||
VUS-03C | Inefficient Array Shifts | ||
VUS-04C | Inefficient mapping Lookups | ||
VUS-05C | Loop Iterator Optimizations | ||
VUS-06C | Redundant Code Repetition | ||
VUS-07C | Redundant Parenthesis Statements | ||
VAR-01C | Ineffectual Usage of Safe Arithmetics | ||
VAR-02C | Loop Iterator Optimization | ||
VAR-03C | Suboptimal Struct Declaration Styles | ||
YTN-01C | Ineffectual Usage of Safe Arithmetics | ||
YTN-02C | Inefficient mapping Lookups | ||
YTN-03C | Loop Iterator Optimizations |