DexSmartDebtPegOracle ​
Inherits:FluidOracle, DexSmartDebtOracleImpl, DexColDebtPriceFluidOracle, DexConversionPriceFluidOracle, DexReservesFromLiquidityPeg
Gets the exchange rate between a Fluid Dex normal collateral and smart debt shares.
-> Reserves from Liquidity with Peg buffer percent. -> Reserves conversion price from separately deployed FluidOracle (optional e.g. needed for wstETH-ETH). -> colDebt Price Oracle is an IFluidOracle.
Functions ​
constructor ​
solidity
constructor(DexSmartDebtPegOracleParams memory params_)
FluidOracle(params_.infoName, params_.targetDecimals)
DexOracleAdjustResult(params_.resultMultiplier, params_.resultDivisor)
DexReservesFromLiquidityPeg(params_.dexPool, params_.quoteInToken0, params_.pegBufferPercent)
DexColDebtPriceFluidOracle(params_.colDebtOracle, params_.colDebtInvert)
DexConversionPriceFluidOracle(params_.reservesConversionParams);
getExchangeRateOperate ​
solidity
function getExchangeRateOperate() public view virtual override returns (uint256 exchangeRate_);
getExchangeRateLiquidate ​
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_);
dexSmartDebtSharesRates ​
Returns the rates of shares (totalShares/totalReserves)
solidity
function dexSmartDebtSharesRates() public view override returns (uint256 operate_, uint256 liquidate_);
Structs ​
DexSmartDebtPegOracleParams ​
solidity
struct DexSmartDebtPegOracleParams {
string infoName;
uint8 targetDecimals;
address dexPool;
bool quoteInToken0;
IFluidOracle colDebtOracle;
bool colDebtInvert;
uint256 pegBufferPercent;
DexConversionPriceFluidOracleParams reservesConversionParams;
uint256 resultMultiplier;
uint256 resultDivisor;
}