Omniscia Tren Finance Audit

Code Style

Code Style

During the manual portion of the audit, we identified 27 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
ACT-01CInefficient Imposition of Access Control
ACT-02CRedundant Parenthesis Statement
BOS-01CImproper Usage of Low-Level Status
CIE-01CIneffectual Usage of Safe Arithmetics
CAS-01CNon-Standard Definition of Gap
CAS-02CRepetitive Value Literal
FCR-01CInefficient Data Location
FCR-02CRepetitive Value Literal
FPA-01CIneffectual Usage of Safe Arithmetics
FLN-01CIneffectual Usage of Safe Arithmetics
LTR-01CInefficient Data Pointer
LTR-02CInefficient Storage Reads
LTR-03CMislabelled Variable
LTR-04CNon-Standard Overlap of Modifier
LTR-05CSuboptimal Struct Declaration Style
PFD-01CInefficient Enum Handling
STR-01CIneffectual Usage of Safe Arithmetics
SPL-01CInefficient mapping Lookups
TRN-01CIneffectual Usage of Safe Arithmetics
TRN-02CInefficient Handling of Debt Token Gains
TRN-03CInefficient Update of Debt Token Snapshots
TRN-04CInefficient mapping Lookups
TKC-01CGeneric Typographic Mistake
TBO-01CRedundant Code Branches
TBO-02CRedundant Parenthesis Statements
TBS-01CInefficient mapping Lookups
TBS-02CRedundant Parenthesis Statement