DexSmartT4PegOracle ​
Inherits:FluidOracle, DexSmartColOracleImpl, DexSmartDebtOracleImpl, DexConversionPriceFluidOracle, DexReservesFromLiquidityPeg
Gets the exchange rate between a Fluid Dex smart collateral shares 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).
Functions ​
constructor ​
solidity
constructor(DexSmartT4PegOracleParams memory params_)
    FluidOracle(params_.infoName, params_.targetDecimals)
    DexOracleAdjustResult(params_.resultMultiplier, params_.resultDivisor)
    DexReservesFromLiquidityPeg(params_.dexPool, params_.quoteInToken0, params_.pegBufferPercent)
    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_);dexSmartColSharesRates ​
Returns the rates of shares (totalReserves/totalShares)
solidity
function dexSmartColSharesRates() public view override returns (uint256 operate_, uint256 liquidate_);dexSmartDebtSharesRates ​
Returns the rates of shares (totalShares/totalReserves)
solidity
function dexSmartDebtSharesRates() public view override returns (uint256 operate_, uint256 liquidate_);Structs ​
DexSmartT4PegOracleParams ​
solidity
struct DexSmartT4PegOracleParams {
    string infoName;
    uint8 targetDecimals;
    address dexPool;
    bool quoteInToken0;
    uint256 pegBufferPercent;
    DexConversionPriceFluidOracleParams reservesConversionParams;
    uint256 resultMultiplier;
    uint256 resultDivisor;
}
