EthXSpotOracle
Inherits: SpotOracle
The ETHx spot oracle.
State Variables
REDSTONE_ETHX_PRICE_FEED
USD_PER_ETH_CHAINLINK
Functions
constructor
Creates a new EthXSpotOracle
instance.
Parameters
Name
Type
Description
_ltv
uint256
The loan to value ratio for ETHX.
_reserveOracle
address
The associated reserve oracle.
_redstoneEthXPriceFeed
address
The redstone price feed for ETHx/USD.
_usdPerEthChainlink
address
The chainlink price feed for ETH/USD.
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.
Returns
Name
Type
Description
ethPerEthX
uint256
price of ETHx in ETH. [WAD]