This contract implements the SimplePriceOracle interface.
The system can enable support for only one price oracle per currency-underlying pair.
Note: The price obtained from the oracle is expected to be the underlying price per currency. For example, to support DAI-ETH pair, an oracle built with this interface can use MakerDao’s Medianizer as its price feed to return ETH price per DAI.
Developers can submit their own price oracle contracts as long as the contracts contain the following functions:
|get_price||-||Update the current price of underlying per currency from the price feed. Return the updated price.|
|owner||-||Get the owner of the oracle contract.|
|currency||-||Get the currency token address.|
|underlying||-||Get the underlying token address.|
|feed_address||-||Get the price feed address.|
|current_price||-||Return the last updated price.|