Omniscia Steadefi Audit

Code Style

Code Style

During the manual portion of the audit, we identified 38 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
CLO-01CInefficient mapping Lookups
GMD-01CInefficient Code Repetition
GMD-02CInefficient Token Weight Assessment
GMD-03CLoop Iterator Optimizations
GMD-04CRepetition of Statements
GMD-05CVariable Mutability Specifiers (Immutable)
GMP-01CIneffectual Usage of Safe Arithmetics
GMP-02CRepetitive Value Literals
GMP-03CVariable Mutability Specifiers (Immutable)
GMX-01CIneffectual Usage of Safe Arithmetics
GMX-02CInefficient Transfer Flow
GMX-03CInexplicable Transfer of Dust
GMX-04CRepetitive Value Literal
GMX-05CVariable Mutability Specifiers (Immutable)
JOE-01CVariable Mutability Specifiers (Immutable)
LPL-01CIncrease of Fee Function Usability
LPL-02CIneffectual Usage of Safe Arithmetics
LPL-03CInefficient Calculation Offsets
LPL-04CInefficient Calculation of First Interest
LPL-05CInefficient Enforcement of EIP-20 Asset Trait
LPL-06CInefficient Event Emission
LPL-07CInefficient Recalculation of Formulas
LPL-08CInefficient mapping Lookups
LPL-09CRepetitive Value Literal
LPL-10CVariable Mutability Specifiers (Immutable)
LPC-01CIneffectual Usage of Safe Arithmetics
LPC-02CRedundant Pre-Calculation of Rate
MHT-01CRepetitive Value Literal
MHT-02CSuboptimal Delta Evaluation
TJM-01CIneffectual Usage of Safe Arithmetics
TJM-02CVariable Mutability Specifiers (Immutable)
TJF-01CIneffectual Usage of Safe Arithmetics
TJF-02CRepetitive Value Literal
TJF-03CVariable Mutability Specifiers (Immutable)
TJY-01CInefficient Transfer Flow
TJY-02CInexplicable Transfer of Dust
TJY-03CRepetitive Value Literal
TJY-04CVariable Mutability Specifiers (Immutable)