CLFallbackUniV3OracleL2
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_, address sequencerUptimeFeed_) 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. |
sequencerUptimeFeed_ | address | L2 sequencer uptime Chainlink feed |
getExchangeRateOperate
function getExchangeRateOperate() public view returns (uint256 exchangeRate_)
Get the exchangeRate_
between the underlying asset and the peg asset in 1e27 for operates
getExchangeRateLiquidate
function getExchangeRateLiquidate() public view returns (uint256 exchangeRate_)
Get the exchangeRate_
between the underlying asset and the peg asset in 1e27 for liquidations
getExchangeRate
function getExchangeRate() public view returns (uint256 exchangeRate_)
Deprecated. Use getExchangeRateOperate()
and getExchangeRateLiquidate()
instead. Only implemented for
backwards compatibility.