Skip to content

FluidOracle ​

Git Source

Inherits:IFluidOracle, OracleError

Base contract that any Fluid Oracle must implement

State Variables ​

_infoName ​

short helper string to easily identify the oracle. E.g. token symbols

solidity
bytes32 private immutable _infoName;

Functions ​

constructor ​

solidity
constructor(string memory infoName_);

infoName ​

helper string to easily identify the oracle. E.g. token symbols

solidity
function infoName() external view returns (string memory);

getExchangeRate ​

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

solidity
function getExchangeRate() external view virtual returns (uint256 exchangeRate_);

getExchangeRateOperate ​

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

solidity
function getExchangeRateOperate() external view virtual returns (uint256 exchangeRate_);

getExchangeRateLiquidate ​

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

solidity
function getExchangeRateLiquidate() external view virtual returns (uint256 exchangeRate_);