DexSmartColNoBorrowOracle ​
Inherits:FluidOracle, DexSmartColOracleImpl, DexColDebtPriceFluidOracle, DexConversionPriceDirectNoBorrow, DexReservesFromLiquidity
Gets the exchange rate between a Fluid Dex smart collateral shares and normal debt.
IMPORTANT: TO BE USED ONLY WITH NO BORROW VAULTS (very tight borrow limits).
-> Reserves from Liquidity. -> Reserves conversion price lastStoredPrice from the Fluid Dex pool. -> colDebt Price Oracle is an IFluidOracle.
Functions ​
constructor ​
solidity
constructor(DexSmartColNoBorrowOracleParams memory params_)
FluidOracle(params_.infoName, params_.targetDecimals)
DexOracleAdjustResult(params_.resultMultiplier, params_.resultDivisor)
DexReservesFromLiquidity(params_.dexPool, params_.quoteInToken0)
DexColDebtPriceFluidOracle(params_.colDebtOracle, params_.colDebtInvert)
DexConversionPriceDirectNoBorrow();
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_);
Structs ​
DexSmartColNoBorrowOracleParams ​
solidity
struct DexSmartColNoBorrowOracleParams {
string infoName;
uint8 targetDecimals;
address dexPool;
bool quoteInToken0;
IFluidOracle colDebtOracle;
bool colDebtInvert;
uint256 resultMultiplier;
uint256 resultDivisor;
}