WeEthWstEthSpotOracle

Git Source

Inherits: SpotOracle

The weETH 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 WeEthWstEthSpotOracle instance.

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

Parameters

getPrice

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

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

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

Returns