The SpotOracle
is supposed to reflect the current market price of a collateral asset. It is used by IonPool
to determine the health factor of a vault as a user is opening or closing a position. NOTE: The price data provided by this contract is not used by the liquidation module at all. The spot price will also always be bounded by the collateral's corresponding reserve oracle price to ensure that a user can never open position that is directly liquidatable.
Creates a new SpotOracle
instance.
Parameters
Name | Type | Description |
---|---|---|
Gets the price of the collateral asset in ETH.
Overridden by collateral specific spot oracle contracts.
Returns
Gets the risk-adjusted market price.
Returns
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_ltv
uint256
Loan to value ratio for the collateral.
_reserveOracle
address
Address for the associated reserve oracle.
price
uint256
of the asset in ETH. [WAD]
spot
uint256
The risk-adjusted market price.