Omniscia Moby Audit
PositionValueFeed Code Style Findings
PositionValueFeed Code Style Findings
PVF-01C: Generic Typographic Mistake
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | PositionValueFeed.sol:L64 |
Description:
The referenced line contains a typographical mistake (i.e. private variable without an underscore prefix) or generic documentational error (i.e. copy-paste) that should be corrected.
Example:
64// Update the value and sign for each vaultRecommendation:
We advise this to be done so to enhance the legibility of the codebase.
Alleviation (a8720219a6a97e10b8d9c6a70c6345747f0fdcb3):
The referenced documentation line is no longer present in the codebase, rendering the exhibit nullified.
PVF-02C: Loop Iterator Optimizations
| Type | Severity | Location |
|---|---|---|
| Gas Optimization | ![]() | PositionValueFeed.sol:L40, L63 |
Description:
The linked for loops increment / decrement their iterator "safely" due to Solidity's built - in safe arithmetics (post-0.8.X).
Example:
40for (uint256 i = 0; i < _vaults.length; 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 (a8720219a6a97e10b8d9c6a70c6345747f0fdcb3):
The referenced loop iterator increment statements have been relocated at the end of each respective for loop's body and have been unwrapped in an unchecked code block, optimizing their gas cost.
