Omniscia Boson Protocol Audit

Code Style

Code Style

During the manual portion of the audit, we identified 36 optimizations that can be applied to the codebase that will decrease the gas-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
BCS-01CGeneric Typographic Mistakes
BTS-01CPotentially Harmful Default Enum State
BVR-01CHard-Coded Interface Type
BBS-01CRepetitive Invocations of Getter Function
BHF-01CUnused Code
DLB-01CRedundant Conditional Return Statement
DBE-01CRepetitive Invocations of Getter Function
EIP-01CDeprecated Chain ID Retrieval Code
EHF-01CMultiple Top-Level Type Declarations
FHF-01CInefficient mapping Lookups
FHF-02CRepetitive Invocations of Getter Functions
FHF-03CSuboptimal Struct Declaration Style
FLB-01CIneffectual Usage of Safe Arithmetics
FLB-02CInefficient mapping Lookups
FLB-03CInexplicable Contract Specifier
GBE-01CRepetitive Invocations of Getter Functions
GHF-01CInefficient mapping Lookups
GHF-02CRepetitive Invocations of Getter Function
OBE-01CSuboptimal Struct Declaration Style
CON-01CRedundant Modifier Overlap
PBE-01CBytecode Size Optimization
PBE-02CPotential Operator Optimization
PBS-01CRepetitive Invocations of Getter Functions
PLB-01CGeneric Typographic Mistake
PLB-02CInefficient Data Types
RGB-01COutdated Documentation of Reentrancy Guard
SBE-01CMultiple Top-Level Type Declarations
SBE-02CRepetitive Invocations of Getter Functions
SHF-01CInefficient mapping Lookups
SHF-02CRepetitive Invocations of Getter Function
TBE-01CHard-Coded Interface Types
TBE-02CInefficient Loop Limit Evaluations
TBE-03CInefficient mapping Lookups
TBE-04CRepetitive Invocations of Getter Function
TBE-05CSuboptimal Struct Declaration Type
THF-01CRepetitive Invocations of Getter Function