Skip to content

WeETHUniV3CheckCLRSOracle ​

Git Source

Inherits:FluidOracle, WeETHOracleImpl, UniV3CheckCLRSOracle

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:
  3. weETH -> eETH = ETH via weETH Oracle
  4. ETH -> USDC via UniV3 ETH <> USDC pool checked against ETH -> USDC Chainlink feed.

Functions ​

constructor ​

constructs a WeETHUniV3CheckCLRSOracle with all inherited contracts

solidity
constructor(string memory infoName_, IWeETH weETH_, UniV3CheckCLRSConstructorParams memory uniV3CheckCLRSParams_)
    WeETHOracleImpl(weETH_)
    UniV3CheckCLRSOracle(infoName_, uniV3CheckCLRSParams_);

Parameters

NameTypeDescription
infoName_stringOracle identify helper name.
weETH_IWeETHaddress of the weETH contract
uniV3CheckCLRSParams_UniV3CheckCLRSConstructorParamsUniV3CheckCLRSOracle constructor params

getExchangeRateOperate ​

solidity
function getExchangeRateOperate()
    public
    view
    override(FluidOracle, UniV3CheckCLRSOracle)
    returns (uint256 exchangeRate_);

getExchangeRateLiquidate ​

solidity
function getExchangeRateLiquidate()
    public
    view
    override(FluidOracle, UniV3CheckCLRSOracle)
    returns (uint256 exchangeRate_);

getExchangeRate ​

solidity
function getExchangeRate() public view override(FluidOracle, UniV3CheckCLRSOracle) returns (uint256 exchangeRate_);