Omniscia Myso Finance Audit

Code Style

Code Style

During the manual portion of the audit, we identified 31 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
BVL-01CMultiple Top-Level Declarations
BVL-02CSuboptimal Struct Declaration Styles
BGY-01CCode Simplification
BGY-02CRedundant Parenthesis Statement
BGY-03CRelocation of Statement
CBC-01CRedundant Parenthesis Statement
CBW-01CInexplicable Price Methodology
CLP-01CInefficient Withdrawal Flow
CLP-02CRedundant Function Argument
ESR-01CPotential Error Usability Enhancement
FPL-01CDuplicate Calculation of Same Value
FPL-02CIneffectual Usage of Safe Arithmetics
FPL-03CInefficient mapping Lookups
FPL-04CRedundant Parenthesis Statement
LVI-01CCode Repetition
LVI-02CImplicit Arithmetic Grouping
LVI-03CInefficient Removal of Signer
LVI-04CInefficient mapping Lookups
LVI-05CRedundant Temporary Variable
LVI-06CRestrictive Automated Withdrawal Feature
LPI-01CGeneric Typographic Mistake
LPI-02CInefficient mapping Lookups
LPI-03CRedundant Parenthesis Statement
OOE-01CMisleading Contract Setup
OEL-01CGeneric Typographic Mistake
OEL-02CInefficient Event Emission
OEL-03CNon-Standard Initialization of Owner
QHR-01CInefficient mapping Lookups
UVC-01CInefficient mapping Lookups
UVC-02CRedundant Parenthesis Statement
UVL-01CMultiple Top-Level Declarations