EzEthWstEthSpotOracle

Git Source

Inherits: SpotOracle

The ezETH 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 EzEthWstEthSpotOracle instance.

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

Parameters

NameTypeDescription

_ltv

uint256

The loan to value ratio for ezETH <> wstETH

_reserveOracle

address

The associated reserve oracle.

_maxTimeFromLastUpdate

uint256

getPrice

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

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

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

Returns

NameTypeDescription

<none>

uint256

wstEthPerWeEth price of ezETH in wstETH. [WAD]