FluidCappedRate ​
Inherits:FluidCappedRateBase, FluidCenterPrice
This contract stores an exchange rate in intervals to optimize gas cost.
Properly implements all interfaces for use as IFluidCenterPrice and IFluidOracle.
Functions ​
constructor ​
solidity
constructor(CappedRateConstructorParams memory params_)
FluidCappedRateBase(params_)
FluidCenterPrice(params_.infoName);
centerPrice ​
solidity
function centerPrice() external override(IFluidCappedRate, FluidCenterPrice) returns (uint256 price_);
infoName ​
solidity
function infoName() public view override(IFluidOracle, FluidCenterPrice) returns (string memory);
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() public pure override(IFluidOracle, FluidCenterPrice) returns (uint8);