Omniscia Xcaliswap Audit

Code Style

Code Style

During the manual portion of the audit, we identified 35 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
B46-01CSub-Optimal Assembly Block
BEB-01CGeneric Typographic Mistakes
BEB-02CInexistent Error Message
FMH-01CInexistent Error Messages
GEG-01CInexistent Error Messages
MHT-01CCode Duplication
MRE-01CGeneric Typographic Mistakes
MRE-02CIneffectual Usage of Safe Arithmetics
MRE-03CInexistent Error Messages
MRE-04COrder of Operation Legibility Increase
MRE-05CRepetitive Value Literal
MPA-01CInexistent Error Messages
MPA-02CRedundant Consecutive Checks
MPA-03CRepetitive Value Literal
RRE-01CGeneric Typographic Mistakes
RRE-02CInexistent Error Messages
RUL-01CMultiple Top-Level Declarations
SFY-01CInefficient Fee Definition System
SFY-02CInexistent Error Messages
SFS-01CInexistent Error Messages
SPR-01CInefficient Calculation of Domain Separator
SPR-02CInexistent Error Messages
SPR-03CLoop Iterator Optimization
SPR-04CRepetitive Value Literal
TNE-01CInexplicable Mint Instruction
TNE-02CInefficient mapping Lookups
TNE-03CInexistent Error Messages
TNE-04CInexistent Override of Interface
VRE-01CGeneric Typographic Mistakes
VRE-02CInexistent Error Messages
VDT-01CRepetitive Value Literal
VDT-02CVariable Mutability Specifiers (Immutable)
VEW-01CInefficient Data Type
VEW-02CInexistent Error Messages
VEW-03CNon-Unique Name & Symbol