Omniscia Alliance Block Audit

Code Style

Code Style

During the manual portion of the audit, we identified 42 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
ASE-01CInformationalYesRedundant Default Value Assignments
ASE-02CInformationalYesVariable Mutability Specifier
ASE-03CInformationalYesVariable Mutability Specifier
CRF-01CInformationalYesVariable Mutability Specifier
LAS-01CInformationalYesVariable Mutability Specifier
LMC-01CInformationalYesInconsistent Reward Multiplier Sync
LMC-02CInformationalYesInefficient Loop Limit Evaluation
LMC-03CInformationalYesInexistent Variable Visibility
LMC-04CInformationalYesVariable Mutability Specifier
LMC-05CInformationalYesVariable Naming Typo
LMF-01CInformationalYesData Location Optimization
LMF-02CInformationalYesRedundant Usage of SafeMath
LMF-03CInformationalYesRedundant Validation Loop
LSE-01CInformationalYesAmbiguous Event
LSE-02CInformationalYesRedundant struct Member
LSE-03CInformationalYesVariable Mutability Specifiers
NCP-01CInformationalYesData Location Optimization
NCP-02CInformationalYesRedundant Validation Loop
NCP-03CInformationalYesVariable Mutability Specifiers
OSF-01CInformationalYesData Mutability Optimization
OEF-01CInformationalNoUnused Function Argument
PCR-01CInformationalYesOptimizational Adjustments
RPB-01CInformationalNoData Location Optimization
RPB-02CInformationalYesDuplicate Calculation
RPB-03CInformationalYesDuplication of require Checks
RPB-04CInformationalYesIneffectual Check
RPB-05CInformationalYesInefficient Loop Limit Evaluation
RPB-06CInformationalYesRedundant SafeMath Utilization
RPB-07CInformationalYesRedundant SafeMath Utilization
RPF-01CInformationalYesData Location Optimization
RPF-02CInformationalYesRedundant Usage of SafeMath
RPF-03CInformationalYesRedundant Validation Loop
SLK-01CInformationalYesData Mutability Optimization
STR-01CInformationalYesEmpty Block Function
STF-01CInformationalYesInconsistent Reward Multiplier Sync
TET-01CInformationalNoData Mutability Optimization
TET-02CInformationalYesRedundant Array Argument
TET-03CInformationalYesRedundant while Loop
TRE-01CInformationalYesVariable Mutability Specifier
TOD-01CInformationalYesData Mutability Optimization
TOD-02CInformationalYesEvent Enrichment
TOF-01CInformationalYesData Mutability Optimization