Skip to content

CLFallbackUniV3OracleL2 ​

Git Source

Inherits:FluidOracleL2, 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.

Functions ​

constructor ​

sets the Chainlink and UniV3 Oracle configs.

solidity
constructor(
    string memory infoName_,
    ChainlinkConstructorParams memory chainlinkParams_,
    UniV3ConstructorParams memory uniV3Params_,
    address sequencerUptimeFeed_
) CLFallbackUniV3Oracle(infoName_, chainlinkParams_, uniV3Params_) FluidOracleL2(sequencerUptimeFeed_);

Parameters

NameTypeDescription
infoName_stringOracle identify helper name.
chainlinkParams_ChainlinkConstructorParamsChainlinkOracle constructor params struct.
uniV3Params_UniV3ConstructorParamsUniV3Oracle constructor params struct.
sequencerUptimeFeed_addressL2 sequencer uptime Chainlink feed

getExchangeRateOperate ​

solidity
function getExchangeRateOperate()
    public
    view
    override(CLFallbackUniV3Oracle, FluidOracleL2)
    returns (uint256 exchangeRate_);

getExchangeRateLiquidate ​

solidity
function getExchangeRateLiquidate()
    public
    view
    override(CLFallbackUniV3Oracle, FluidOracleL2)
    returns (uint256 exchangeRate_);

getExchangeRate ​

solidity
function getExchangeRate() public view override(CLFallbackUniV3Oracle, FluidOracleL2) returns (uint256 exchangeRate_);