Skip to content

DexColDebtPriceFluidOracle ​

Git Source

Inherits:DexColDebtPriceGetter

reads the col debt Oracle Price from a separately deployed FluidOracle

used to plug result of DexSmartColOracleImpl into any existing FluidOracle. result of DexSmartColOracleImpl is e.g. for WSTETH/ETH smart col, WSTETH amount per 1 share. we need 1 share in relation to debt. so e.g. wstETH/ETH smart col w.r.t. USDC debt. so plug result into wstETH/USDC oracle then we get USDC per 1 share.

State Variables ​

COL_DEBT_ORACLE ​

external IFluidOracle used to convert from col or debt shares to a Fluid vault debt token. can be address zero if no conversion needed. IFluidOracle always returns 1e27 scaled price (DEX_COL_DEBT_ORACLE_PRECISION).

solidity
IFluidOracle internal immutable COL_DEBT_ORACLE;

COL_DEBT_INVERT ​

solidity
bool internal immutable COL_DEBT_INVERT;

Functions ​

constructor ​

solidity
constructor(IFluidOracle colDebtOracle_, bool colDebtInvert_);

_getDexColDebtPriceOperate ​

solidity
function _getDexColDebtPriceOperate() internal view override returns (uint256 colDebtPrice_);

_getDexColDebtPriceLiquidate ​

solidity
function _getDexColDebtPriceLiquidate() internal view override returns (uint256 colDebtPrice_);

getDexColDebtOracleData ​

Returns Col/Debt Oracle data

solidity
function getDexColDebtOracleData() public view returns (address colDebtOracle_, bool colDebtInvert_);