Skip to content

FluidOracle ​

Git Source

Inherits:IFluidOracle, OracleError

Title: FluidOracle

Base contract that any Fluid Oracle must implement

Constants ​

_infoName ​

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

solidity
bytes32 private immutable _infoName

_infoNameLength ​

solidity
uint8 private immutable _infoNameLength

_TARGET_DECIMALS ​

solidity
uint8 internal constant _TARGET_DECIMALS = 27

_targetDecimals ​

kept as a constructor param for parity with IFluidOracle; any token-decimal adjustment is the consuming vault oracle's job, as it is for capped rates.

solidity
uint8 private immutable _targetDecimals

Functions ​

constructor ​

solidity
constructor(string memory infoName_, uint8 targetDecimals_) ;

targetDecimals ​

target decimals of the returned oracle rate when scaling to 1e27. E.g. for ETH / USDC it would be 15 because diff of ETH decimals to 1e27 is 9, and USDC has 6 decimals, so 6+9 = 15, e.g. 2029,047772120364926 For USDC / ETH: 21 + 18 = 39, e.g. 0,000492842018675092636829357843847601646

solidity
function targetDecimals() external view returns (uint8);

infoName ​

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

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