Omniscia DAFI Protocol Audit

PriceFeed Static Analysis Findings

PriceFeed Static Analysis Findings

PFD-01S: Nonstandard Naming Convention

TypeSeverityLocation
Code StyleInformationalPriceFeed.sol:L22

Description:

The addressesForPrices struct contains an irregular name.

Example:

contracts/PriceFeed.sol
22struct addressesForPrices{
23 bytes32 synth;
24 IAggregatorV3Interface priceFeedAddress;
25 uint256 _price;
26}

Recommendation:

We advise it to be set to something more legible in accordance to the official Solidity style guide, such as SynthData.

Alleviation:

The name was set to synthData, however, it is still not conformant to the official Solidity style guide and begins with a lowercase letter.

PFD-02S: Redundant Declarations

TypeSeverityLocation
Gas OptimizationInformationalPriceFeed.sol:L51, L53, L55

Description:

The linked values retrieved by the latestRoundData remain unutilized.

Example:

contracts/PriceFeed.sol
50(
51 uint80 roundID,
52 int price,
53 uint startedAt,
54 uint timeStamp,
55 uint80 answeredInRound
56) = priceFeed.latestRoundData();

Recommendation:

We advise them to be omitted from the return assignment by simply retaining the commas specified and removing the declarations.The development team has acknowledged this exhibit but decided to not apply its remediation in the current version of the codebase citing time constraints.

Alleviation:

The development team has acknowledged this exhibit but decided to not apply its remediation in the current version of the codebase citing time constraints.