Omniscia XFai Audit

XPriceOracle Static Analysis Findings

XPriceOracle Static Analysis Findings

XPO-01S: Inexistent Inheritence

TypeSeverityLocation
Code StyleInformationalXPriceOracle.sol:L11

Description:

The XPriceOracle should inherit from the IXPriceOracle defined within XPoolHandler which should be relocated in its own file.

Example:

contracts/XPriceOracle.sol
9// fixed window oracle that recomputes the average price for the entire period once every period
10// note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period
11contract XPriceOracle {

Recommendation:

We advise it to be done so to increase the maintainability and legibility of the codebase.

Alleviation:

The interface of the XPriceOracle was moved to a dedicated file that is consequently imported were necessary and in the case of the actual implementation inherited from.