Omniscia Beanstalk Audit
Code Style
Code Style
During the manual portion of the audit, we identified 43 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:
ID | Severity | Addressed | Title |
---|---|---|---|
BEA-01C | Deprecated Representation Style | ||
BDR-01C | Deprecated Representation Style | ||
BIP-01C | Inefficient Assignment of Array | ||
BIP-02C | Inefficient Length Evaluation | ||
PRO-01C | Inexplicable Value Literal | ||
PRO-02C | Suboptimal Code Legibility | ||
CFE-01C | Redundant Usage of SafeMath | ||
CSO-01C | Inexistent Usage of Constant | ||
CSO-02C | Redundant Usage of SafeMath | ||
DEC-01C | Return Value Optimization | ||
DIB-01C | Code Duplication | ||
DIB-02C | Conditional Reorder Optimization | ||
DIB-03C | Deprecated Representation Style | ||
FFT-01C | Redundant Usage of SafeMath | ||
FFE-01C | Redundant Usage of SafeMath | ||
GFT-01C | Code Duplication | ||
GFT-02C | Inefficient First Vote | ||
IB0-01C | Inefficient Loop Data Type | ||
IDD-01C | Deprecated Representation Style | ||
IEY-01C | Misleading Comments | ||
PRL-01C | Mislabelled Contract | ||
LPS-01C | Inexistent Usage of Constant | ||
LPS-02C | Redundant Re-Calculation | ||
LCT-01C | Redundant Future Trade Timestamp | ||
LCT-02C | Ternary Operator Optimization | ||
LCT-03C | Variable Typo | ||
LDD-01C | Gas Optimization Deviation | ||
LIL-01C | Inefficient Function Signature Computation | ||
LMT-01C | Code Duplication | ||
LMT-02C | Redundant Future Trade Timestamp | ||
LMT-03C | Redundant Usage of SafeMath | ||
LIF-01C | Deprecated Representation Style | ||
LIF-02C | Redundant Usage of SafeMath | ||
OFT-01C | Redundant Condition Evaluation | ||
SIL-01C | Ineffectual Loop Iteration | ||
SEE-01C | Inefficient Length Lookups | ||
SEE-02C | Redundant Usage of SafeMath | ||
SEE-03C | Ternary Operator Optimization | ||
SET-01C | Lock Cleanup Optimization | ||
SET-02C | Redundant Usage of SafeMath | ||
USO-01C | Redundant Conditional Evaluation | ||
WEA-01C | Deprecated Representation Style | ||
WEA-02C | Redundant Usage of SafeMath |