FluidCappedRateL2 ​
Inherits:FluidCappedRateBase, FluidCenterPriceL2
This contract stores an exchange rate in intervals to optimize gas cost for an L2
Properly implements all interfaces for use as IFluidCenterPrice and IFluidOracle.
Functions ​
constructor ​
constructor(CappedRateConstructorParams memory params_, address sequencerUptimeFeed_)
FluidCappedRateBase(params_)
FluidCenterPriceL2(params_.infoName, sequencerUptimeFeed_);
centerPrice ​
function centerPrice() external override(IFluidCappedRate, FluidCenterPriceL2) returns (uint256 price_);
infoName ​
function infoName() public view override(IFluidOracle, FluidCenterPriceL2) 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
function targetDecimals() public pure override(IFluidOracle, FluidCenterPriceL2) returns (uint8);
getExchangeRate ​
Deprecated. Use getExchangeRateOperate()
and getExchangeRateLiquidate()
instead. Only implemented for backwards compatibility.
function getExchangeRate() public view virtual override returns (uint256 exchangeRate_);
getExchangeRateOperate ​
Get the exchangeRate_
between the underlying asset and the peg asset in 1e27 for operates
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
function getExchangeRateLiquidate() public view virtual override returns (uint256 exchangeRate_);
getExchangeRateOperateDebt ​
Get the operate() exchange rate for debt asset side, with no cap upwards and capped decrease
function getExchangeRateOperateDebt() public view virtual override returns (uint256 exchangeRate_);
getExchangeRateLiquidateDebt ​
Get the liquidate() exchange rate for debt asset side, with max APR cap upwards, and capped decrease
function getExchangeRateLiquidateDebt() public view virtual override returns (uint256 exchangeRate_);