RsEthWstEthSpotOracle

Git Source

Inherits: SpotOracle

The rsETH 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 RsEthWstEthSpotOracle instance.

constructor(uint256 _ltv, address _reserveOracle, uint256 _maxTimeFromLastUpdate) SpotOracle(_ltv, _reserveOracle);

Parameters

NameTypeDescription

_ltv

uint256

The loan to value ratio for rsETH <> wstETH

_reserveOracle

address

The associated reserve oracle.

_maxTimeFromLastUpdate

uint256

The maximum delay for the oracle update in seconds

getPrice

Gets the price of rsETH in wstETH. (ETH / rsETH) / (ETH / stETH) * (wstETH / stETH) = wstETH / rsETH

Redstone oracle returns ETH per rsETH with 8 decimals. This needs to be converted to wstETH per rsETH denomination.

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

Returns

NameTypeDescription

<none>

uint256

wstEthPerRsEth price of rsETH in wstETH. [WAD]