Skip to content

FluidGenericCenterPrice ​

Git Source

Inherits:FluidCenterPrice, IFluidOracle, FluidGenericOracleBase

Gets the exchange rate between 2 tokens via GenericOracle feeds for a Dex center price

Also implements IFluidOracle interface

Functions ​

constructor ​

solidity
constructor(string memory infoName_, OracleHopSource[] memory sources_)
    FluidCenterPrice(infoName_)
    FluidGenericOracleBase(sources_);

centerPrice ​

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

infoName ​

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

targetDecimals ​

solidity
function targetDecimals() public pure override(IFluidOracle, FluidCenterPrice) 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_);