DexSmartT4CLOracle ​
Inherits:FluidOracle, DexSmartColOracleImpl, DexSmartDebtOracleImpl, DexConversionPriceCL, DexReservesFromPEX
Gets the exchange rate between a Fluid Dex smart collateral and smart debt for a T4 vault. returns amount of debt shares per 1 col share.
-> Reserves from Liquidity, adjusted for conversion price. -> Reserves conversion price from Chainlink feeds.
Functions ​
constructor ​
solidity
constructor(DexSmartT4CLOracleParams memory params_)
FluidOracle(params_.infoName, params_.targetDecimals)
DexOracleAdjustResult(params_.resultMultiplier, params_.resultDivisor)
DexReservesFromPEX(params_.dexPool, params_.quoteInToken0)
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_);
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 ​
DexSmartT4CLOracleParams ​
solidity
struct DexSmartT4CLOracleParams {
string infoName;
uint8 targetDecimals;
address dexPool;
bool quoteInToken0;
ChainlinkOracleImpl.ChainlinkConstructorParams reservesConversion;
uint256 reservesConversionPriceMultiplier;
uint256 reservesConversionPriceDivisor;
uint256 resultMultiplier;
uint256 resultDivisor;
}