Skip to content

DexSmartDebtCLOracle ​

Git Source

Inherits:FluidOracle, DexSmartDebtOracleImpl, DexColDebtPriceFluidOracle, DexConversionPriceCL, DexReservesFromPEX

Gets the exchange rate between a Fluid Dex normal collateral and smart debt shares.

-> Reserves from Liquidity, adjusted for conversion price. -> Reserves conversion price from Chainlink feeds. -> colDebt Price Oracle is an IFluidOracle.

Functions ​

constructor ​

solidity
constructor(DexSmartDebtCLOracleParams memory params_)
    FluidOracle(params_.infoName, params_.targetDecimals)
    DexOracleAdjustResult(params_.resultMultiplier, params_.resultDivisor)
    DexReservesFromPEX(params_.dexPool, params_.quoteInToken0)
    DexColDebtPriceFluidOracle(params_.colDebtOracle, params_.colDebtInvert)
    DexConversionPriceCL(
        params_.reservesConversion,
        params_.reservesConversionPriceMultiplier,
        params_.reservesConversionPriceDivisor
    );

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 ​

DexSmartDebtCLOracleParams ​

solidity
struct DexSmartDebtCLOracleParams {
    string infoName;
    uint8 targetDecimals;
    address dexPool;
    bool quoteInToken0;
    IFluidOracle colDebtOracle;
    bool colDebtInvert;
    ChainlinkOracleImpl.ChainlinkConstructorParams reservesConversion;
    uint256 reservesConversionPriceMultiplier;
    uint256 reservesConversionPriceDivisor;
    uint256 resultMultiplier;
    uint256 resultDivisor;
}