Omniscia Mantissa Finance Audit
LP Code Style Findings
LP Code Style Findings
CON-01C: Generic Typographic Mistakes
Type | Severity | Location |
---|---|---|
Code Style | LP.sol:L34-L37, L44, L45, L47 |
Description:
The referenced lines contain typographical mistakes (i.e. private
variable without an underscore prefix) or generic documentational errors (i.e. copy-paste) that should be corrected.
Example:
34uint256 private runningSum;35uint256 private lastUpdate;36uint256 private windows;37uint256 private lastWindowUpdate;
Recommendation:
We advise them to be corrected enhancing the legibility of the codebase.
Alleviation (418ee413ad8e26f7eea383764c19953ff31b2bf3):
The Mantissa Finance evaluated this exhibit and given that it has no security implications opted not to apply it to avoid updating the on-chain contracts and / or introducing significant complexity to existing deployments. As such, we consider this exhibit acknowledged.
CON-02C: Loop Iterator Optimizations
Type | Severity | Location |
---|---|---|
Gas Optimization | LP.sol:L131, L174 |
Description:
The linked for
loops increment / decrement their iterator "safely" due to Solidity's built - in safe arithmetics (post-0.8.X
).
Example:
131for (uint256 i = dayIndex > windows ? dayIndex - windows : 0; i < dayIndex; i++) {
Recommendation:
We advise the increment / decrement operations to be performed in an unchecked
code block as the last statement within each for
loop to optimize their execution cost.
Alleviation (418ee413ad8e26f7eea383764c19953ff31b2bf3):
The Mantissa Finance evaluated this exhibit and given that it has no security implications opted not to apply it to avoid updating the on-chain contracts and / or introducing significant complexity to existing deployments. As such, we consider this exhibit acknowledged.