Omniscia Astrolab DAO Audit
StrategyV5Pyth Code Style Findings
StrategyV5Pyth Code Style Findings
SVP-01C: Generic Typographic Mistake
Type | Severity | Location |
---|---|---|
Code Style | ![]() | StrategyV5Pyth.sol:L26 |
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:
26IPythAggregator internal pyth; // Pyth oracle
Recommendation:
We advise this to be done so to enhance the legibility of the codebase.
Alleviation (59b75fbee1d8f3dee807c928f18be41c58b904e1):
The relevant declaration, now located under PythProvider
, has been properly prefixed with an underscore rendering this exhibit addressed.
SVP-02C: Loop Iterator Optimizations
Type | Severity | Location |
---|---|---|
Gas Optimization | ![]() | StrategyV5Pyth.sol:L73, L126 |
Description:
The linked for
loops increment / decrement their iterator "safely" due to Solidity's built - in safe arithmetics (post-0.8.X
).
Example:
73for (uint256 i = 0; i < _pythParams.inputFeeds.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 (59b75fbee1d8f3dee807c928f18be41c58b904e1):
The former loop has been relocated under the PriceProvider::_setFeeds
function and its iterator has been optimized whilst the latter loop is no longer present in the codebase.
These actions cumulatively render this exhibit addressed.
SVP-03C: Repetitive Value Literal
Type | Severity | Location |
---|---|---|
Code Style | ![]() | StrategyV5Pyth.sol:L99, L107 |
Description:
The linked value literal is repeated across the codebase multiple times.
Example:
9918);
Recommendation:
We advise it to be set to a constant
variable instead optimizing the legibility of the codebase.
Alleviation (59b75fbee1d8f3dee807c928f18be41c58b904e1):
The relevant literal has been declared as a constant
labelled USD_DECIMALS
under the PriceProvider
implementation, addressing this exhibit.