CLFallbackUniV3Oracle

Gets the exchange rate between the underlying asset and the peg asset by using: the price from a Chainlink price feed or, if that feed fails, the price from a UniV3 TWAP delta checked Oracle.

constructor

constructor(string infoName_, struct ChainlinkStructs.ChainlinkConstructorParams chainlinkParams_, struct UniV3OracleImpl.UniV3ConstructorParams uniV3Params_) public

sets the Chainlink and UniV3 Oracle configs.

Parameters

NameTypeDescription
infoName_stringOracle identify helper name.
chainlinkParams_struct ChainlinkStructs.ChainlinkConstructorParamsChainlinkOracle constructor params struct.
uniV3Params_struct UniV3OracleImpl.UniV3ConstructorParamsUniV3Oracle constructor params struct.

getExchangeRateOperate

function getExchangeRateOperate() public view virtual returns (uint256 exchangeRate_)

Get the exchangeRate_ between the underlying asset and the peg asset in 1e27 for operates

getExchangeRateLiquidate

function getExchangeRateLiquidate() public view virtual returns (uint256 exchangeRate_)

Get the exchangeRate_ between the underlying asset and the peg asset in 1e27 for liquidations

getExchangeRate

function getExchangeRate() public view virtual returns (uint256 exchangeRate_)

Deprecated. Use getExchangeRateOperate() and getExchangeRateLiquidate() instead. Only implemented for backwards compatibility.