Omniscia Teahouse Finance Audit

Code Style

Code Style

During the manual portion of the audit, we identified 34 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
AAT-01CLoop Iterator Optimizations
AOE-01CInefficient mapping Lookups
AOE-02CLoop Iterator Optimizations
AOE-03CRedundant Initialization of Pool Information
AOE-04CRedundant Parenthesis Statements
AOE-05CRepetitive Value Literal
TVP-01CInefficient Square Root Implementation
TVP-02CLoop Iterator Optimizations
TVP-03CRedundant Parenthesis Statements
TVP-04CRedundant Type Cast Operations
TVV-01CDeprecated Usage of Signature Value Literals
TVV-02CInefficient Emission of Captured Fees
TVV-03CInefficient Emissions of Contextual Variable
TVV-04CInefficient On-Chain Path Calculation
TVV-05CInefficient Ownership Transfer
TVV-06CInefficient Removal of Array Element
TVV-07CInefficient Shift Operation
TVV-08CInefficient Variable Mutability (Constant)
TVV-09CInefficient Variable Mutability (Immutable)
TVV-10CLoop Iterator Optimizations
TVV-11CRedundant Local Variables
TVV-12CRedundant Maintenance of Total Amounts
TVV-13CRepetitive Value Literal
TVH-01CDeprecated Revert Statements
TVH-02CGeneric Typographic Mistake
TVH-03CLoop Iterator Optimizations
TVH-04CPotentially Redundant Rescue Functions
TVH-05CUnreachable Code
UVP-01CGeneric Typographic Mistake
UVP-02CIneffectual Usage of Safe Arithmetics
UVP-03CInefficient Emissions of Contextual Variable
UVP-04CLoop Iterator Optimization
UVP-05CPotential Usability Enhancement
UVP-06CRedundant Recalculation of Value