Skip to content

FluidGenericCenterPriceL2 ​

Git Source

Inherits:FluidCenterPriceL2, IFluidOracle, FluidGenericOracleBase

Gets the exchange rate between 2 tokens via GenericOracle feeds for a Dex center price for Layer 2 (with sequencer uptime feed check)

Also implements IFluidOracle interface

Functions ​

constructor ​

solidity
constructor(string memory infoName_, OracleHopSource[] memory sources_, address sequencerUptimeFeed_)
    FluidCenterPriceL2(infoName_, sequencerUptimeFeed_)
    FluidGenericOracleBase(sources_);

centerPrice ​

solidity
function centerPrice() external view override returns (uint256 price_);

infoName ​

solidity
function infoName() public view override(IFluidOracle, FluidCenterPriceL2) returns (string memory);

targetDecimals ​

solidity
function targetDecimals() public pure override(IFluidOracle, FluidCenterPriceL2) returns (uint8);

getExchangeRateOperate ​

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

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

getExchangeRateLiquidate ​

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

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

getExchangeRate ​

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

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