Omniscia XFai Audit
XPriceOracle Static Analysis Findings
XPriceOracle Static Analysis Findings
XPO-01S: Inexistent Inheritence
Type | Severity | Location |
---|---|---|
Code Style | Informational | XPriceOracle.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 period10// note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period11contract 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.