Skip to content

CLFallbackUniV3Oracle ​

Git Source

Inherits:FluidOracle, ChainlinkOracleImpl, UniV3OracleImpl

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.

Functions ​

constructor ​

sets the Chainlink and UniV3 Oracle configs.

solidity
constructor(
    string memory infoName_,
    ChainlinkConstructorParams memory chainlinkParams_,
    UniV3ConstructorParams memory uniV3Params_
) ChainlinkOracleImpl(chainlinkParams_) UniV3OracleImpl(uniV3Params_) FluidOracle(infoName_);

Parameters

NameTypeDescription
infoName_stringOracle identify helper name.
chainlinkParams_ChainlinkConstructorParamsChainlinkOracle constructor params struct.
uniV3Params_UniV3ConstructorParamsUniV3Oracle constructor params struct.

getExchangeRateOperate ​

solidity
function getExchangeRateOperate() public view virtual override returns (uint256 exchangeRate_);

getExchangeRateLiquidate ​

solidity
function getExchangeRateLiquidate() public view virtual override returns (uint256 exchangeRate_);

getExchangeRate ​

solidity
function getExchangeRate() public view virtual override returns (uint256 exchangeRate_);