RswEthWstEthSpotOracle
Inherits: SpotOracle
The rswETH spot oracle denominated in wstETH
State Variables
MAX_TIME_FROM_LAST_UPDATE
uint256 public immutable MAX_TIME_FROM_LAST_UPDATE;
Functions
constructor
Creates a new RswEthWstEthSpotOracle
instance.
constructor(uint256 _ltv, address _reserveOracle, uint256 _maxTimeFromLastUpdate) SpotOracle(_ltv, _reserveOracle);
Parameters
Name
Type
Description
_ltv
uint256
The loan to value ratio for rswETH <> wstETH
_reserveOracle
address
The associated reserve oracle.
_maxTimeFromLastUpdate
uint256
The maximum delay for the oracle update in seconds
getPrice
Gets the price of rswETH in wstETH. (ETH / rswETH) / (ETH / stETH) * (wstETH / stETH) = wstETH / rswETH
Redstone oracle returns ETH per rswETH with 8 decimals. This needs to be converted to wstETH per rswETH denomination.
function getPrice() public view override returns (uint256);
Returns
Name
Type
Description
<none>
uint256
wstEthPerRswEth price of rswETH in wstETH. [WAD]