WstETHOracleImpl

This contract is used to get the exchange rate between wstETH and stETH

_WSTETH_PRICE_SCALER_MULTIPLIER

uint256 _WSTETH_PRICE_SCALER_MULTIPLIER

constant value for price scaling to reduce gas usage

_WSTETH

contract IWstETH _WSTETH

WSTETH contract, e.g. on mainnet 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0

constructor

constructor(contract IWstETH wstETH_) internal

constructor sets the wstETH wstETH_ token address.

_getWstETHExchangeRate

function _getWstETHExchangeRate() internal view returns (uint256 rate_)

Get the exchange rate from wstETH contract

Return Values

NameTypeDescription
rate_uint256The exchange rate in OracleUtils.RATE_OUTPUT_DECIMALS

wstETHOracleData

function wstETHOracleData() public view returns (uint256 wstETHExchangeRate_, contract IWstETH wstETH_)

returns all wWtETH oracle related data as utility for easy off-chain use / block explorer in a single view method