Omniscia 0xPhase Audit

Code Style

Code Style

During the manual portion of the audit, we identified 37 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
ACL-01CInefficient mapping Lookups
ACL-02CLoop Iterator Optimization
ACL-03CMultiple Top-Level Declarations
ACL-04CRedundant Repetitive Invocations of Getter Function
ACB-01CInefficient mapping Lookups
ACB-02CLoop Iterator Optimization
ACB-03CRedundant Repetitive Invocations of Getter Function
COE-01CVariable Mutability Specifiers (Immutable)
DBV-01CInefficient Assignments of State
DBV-02CInefficient Iteration of Expected Results
DBV-03CLoop Iterator Optimizations
DBV-04CRedundant Instantiations of Arrays
DLI-01CInefficient mapping Lookups
DLF-01CLoop Iterator Optimization
ERP-01CRedundant In-Memory Variable
ERV-01CIneffectual Usage of Safe Arithmetics
ERV-02CRedundant In-Memory Variable
ETN-01CMultiple Top-Level Declarations
FRI-01CRedundant Duplicate Getter Definition
ICO-01CMultiple Top-Level Declarations
ICA-01CMultiple Top-Level Declarations
IDB-01CMultiple Top-Level Declarations
IPT-01CMultiple Top-Level Declarations
ISC-01CMultiple Top-Level Declarations
ITY-01CMultiple Top-Level Declarations
IVT-01CMultiple Top-Level Declarations
MRE-01CRepetitive Value Literals
MOE-01CLoop Iterator Optimization
MLB-01CIneffectual Usage of Safe Arithmetics
MFT-01CLoop Iterator Optimization
MFT-02CPotentially Dangerous Multicall Paradigm
SCV-01CInefficient Variable Usage
SCV-02CPotentially Redundant Evaluation of Time
TV1-01CRedundant Duplicate Application of Access Control
VAF-01CIneffectual Usage of Safe Arithmetics
VBE-01CIneffectual Usage of Safe Arithmetics
VLF-01CSuboptimal Struct Declaration Styles