EthPerWstEthRateProvider

Git Source

Inherits: IRateProvider

Reports the price of wstETH in terms of ETH.

State Variables

IChainlink public immutable ST_ETH_TO_ETH_CHAINLINK;

WST_ETH

IWstEth public immutable WST_ETH;

MAX_TIME_FROM_LAST_UPDATE

uint256 public immutable MAX_TIME_FROM_LAST_UPDATE;

Functions

constructor

constructor(address _stEthToEthChainlink, address _wstETH, uint256 _maxTimeFromLastUpdate);

Parameters

getRate

Gets the price of wstETH in terms of ETH.

If the beaconchain reserve decreases, the wstETH to stEth conversion will be directly impacted, but the stEth to Eth conversion will simply be determined by the chainlink price oracle.

function getRate() public view returns (uint256 ethPerWstEth);

Returns

Errors

MaxTimeFromLastUpdatePassed

error MaxTimeFromLastUpdatePassed(uint256 blockTimestamp, uint256 lastUpdated);