Skip to content

DexSmartDebtPegOracle ​

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

plugs result of DexSmartDebtOracleImpl into any existing FluidOracle. result of DexSmartDebtOracleImpl is e.g. for USDC/USDT smart debt, USDC amount per 1 share. we need share in relation to 1 col. so e.g. USDC/USDT debt w.r.t. ETH col. so plug result into ETH/USDC oracle then we get shares per 1 ETH. can be paired with DexSmartColOracle to create an Oracle for type 4 smart col & smart debt.

_COL_DEBT_ORACLE ​

solidity
contract IFluidOracle _COL_DEBT_ORACLE

external IFluidOracle used to convert from debt shares to a Fluid vault debt token

_COL_DEBT_INVERT ​

solidity
bool _COL_DEBT_INVERT

_COL_DEBT_DECIMALS ​

solidity
uint8 _COL_DEBT_DECIMALS

_COL_DEBT_DIVISOR ​

solidity
uint256 _COL_DEBT_DIVISOR

constructor ​

solidity
constructor(string infoName_, address dexPool_, address reservesConversionOracle_, bool quoteInToken0_, bool reservesConversionInvert_, uint256 reservesPegBufferPercent_, contract IFluidOracle colDebtOracle_, bool colDebtInvert_, uint8 colDebtDecimals_) public

getExchangeRateOperate ​

solidity
function getExchangeRateOperate() public view virtual returns (uint256 exchangeRate_)

Get the exchangeRate_ between the underlying asset and the peg asset in 1e27 for operates

getExchangeRateLiquidate ​

solidity
function getExchangeRateLiquidate() public view virtual returns (uint256 exchangeRate_)

Get the exchangeRate_ between the underlying asset and the peg asset in 1e27 for liquidations

getExchangeRate ​

solidity
function getExchangeRate() public view virtual returns (uint256 exchangeRate_)

Deprecated. Use getExchangeRateOperate() and getExchangeRateLiquidate() instead. Only implemented for backwards compatibility.

getDexSmartDebtOracleData ​

solidity
function getDexSmartDebtOracleData() public view returns (address colDebtOracle_, bool colDebtInvert_, uint8 colDebtDecimals_)

Returns Col/Debt Oracle data