Omniscia rain protocol Audit

Code Style

Code Style

During the manual portion of the audit, we identified 25 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
COO-01CPotential Mutability Optimization
ERF-01CSuboptimal Visibility Specifier
ERC-01CRedundant Evaluation of Multiple Assertions
ERT-01COptimized Value Usage
ERT-02CRedundant Usage of Saturating Subtractions
ECT-01CIncorrect Event Argument
FAC-01CRedundant Code Block Declaration
MOS-01CUnoptimized Stack Index Adjustment
PHA-01CPhase Consistency
PHA-02CType Casting Optimization
RVM-01CDocumentation Typo
RER-01CNon-Standard Error Capture
SMH-01CDeviation of Comment Style
SER-01CPotential Legibility Optimization
SER-02CPotentially Convoluted Redemption Protection Mechanism
SEC-01CSuboptimal Visibility Specifier
TBC-01CPotential Mutability Optimization
TOP-01CPotential Misuse of Select LTE Instruction
TOP-02CUnoptimized Stack Index Adjustment
TRT-01CRedundant Maximum Tier Enforcement
TCE-01CPotential User-Defined Value Type
TRU-01CError Message Typo
TFY-01CNon-Standard Implementation Deployment Check
VTR-01CMathematical Optimization
VER-01CRBAC Documentation Discrepancy