EthXSpotOracle

Git Source

Inherits: SpotOracle

The ETHx spot oracle.

State Variables

REDSTONE_ETHX_PRICE_FEED

IRedstonePriceFeed public immutable REDSTONE_ETHX_PRICE_FEED;
IChainlink public immutable USD_PER_ETH_CHAINLINK;

Functions

constructor

Creates a new EthXSpotOracle instance.

constructor(
    uint256 _ltv,
    address _reserveOracle,
    address _redstoneEthXPriceFeed,
    address _usdPerEthChainlink
)
    SpotOracle(_ltv, _reserveOracle);

Parameters

getPrice

Gets the price of ETHx in ETH.

Redstone oracle returns dollar value per ETHx with 6 decimals. This needs to be converted to a WAD and to ETH denomination.

function getPrice() public view override returns (uint256 ethPerEthX);

Returns