WeETHUniV3CheckCLRSOracle
Gets the exchange rate between the underlying asset and the peg asset by using: 1. weETH Oracle price for weETH -> eETH = ETH (pegged) 2. result from 1. combined with a uniV3CheckCLRSOracle to get someToken (e.g. ETH) -> someToken2. e.g. when going from weETH to USDC: 1. weETH -> eETH = ETH via weETH Oracle 2. ETH -> USDC via UniV3 ETH <> USDC pool checked against ETH -> USDC Chainlink feed.
constructor
constructor(string infoName_, contract IWeETH weETH_, struct UniV3CheckCLRSOracle.UniV3CheckCLRSConstructorParams uniV3CheckCLRSParams_) public
constructs a WeETHUniV3CheckCLRSOracle with all inherited contracts
Parameters
Name | Type | Description |
---|---|---|
infoName_ | string | Oracle identify helper name. |
weETH_ | contract IWeETH | address of the weETH contract |
uniV3CheckCLRSParams_ | struct UniV3CheckCLRSOracle.UniV3CheckCLRSConstructorParams | UniV3CheckCLRSOracle constructor params |
getExchangeRateOperate
function getExchangeRateOperate() public view returns (uint256 exchangeRate_)
Get the exchangeRate_
between the underlying asset and the peg asset in 1e27 for operates
getExchangeRateLiquidate
function getExchangeRateLiquidate() public view returns (uint256 exchangeRate_)
Get the exchangeRate_
between the underlying asset and the peg asset in 1e27 for liquidations
getExchangeRate
function getExchangeRate() public view returns (uint256 exchangeRate_)
Deprecated. Use getExchangeRateOperate()
and getExchangeRateLiquidate()
instead. Only implemented for
backwards compatibility.