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
Name | Type | Description |
---|---|---|
infoName_ | string | Oracle identify helper name. |
chainlinkParams_ | struct ChainlinkStructs.ChainlinkConstructorParams | ChainlinkOracle constructor params struct. |
uniV3Params_ | struct UniV3OracleImpl.UniV3ConstructorParams | UniV3Oracle 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.