Skip to content

IFluidVaultT1 ​

VAULT_ID ​

solidity
function VAULT_ID() external view returns (uint256)

returns the vault id

readFromStorage ​

solidity
function readFromStorage(bytes32 slot_) external view returns (uint256 result_)

reads uint256 data result_ from storage at a bytes32 storage slot_ key.

ConstantViews ​

solidity
struct ConstantViews {
  address liquidity;
  address factory;
  address adminImplementation;
  address secondaryImplementation;
  address supplyToken;
  address borrowToken;
  uint8 supplyDecimals;
  uint8 borrowDecimals;
  uint256 vaultId;
  bytes32 liquiditySupplyExchangePriceSlot;
  bytes32 liquidityBorrowExchangePriceSlot;
  bytes32 liquidityUserSupplySlot;
  bytes32 liquidityUserBorrowSlot;
}

constantsView ​

solidity
function constantsView() external view returns (struct IFluidVaultT1.ConstantViews constantsView_)

returns all Vault constants

fetchLatestPosition ​

solidity
function fetchLatestPosition(int256 positionTick_, uint256 positionTickId_, uint256 positionRawDebt_, uint256 tickData_) external view returns (int256, uint256, uint256, uint256, uint256)

fetches the latest user position after a liquidation

updateExchangePrices ​

solidity
function updateExchangePrices(uint256 vaultVariables2_) external view returns (uint256 liqSupplyExPrice_, uint256 liqBorrowExPrice_, uint256 vaultSupplyExPrice_, uint256 vaultBorrowExPrice_)

calculates the updated vault exchange prices

updateExchangePricesOnStorage ​

solidity
function updateExchangePricesOnStorage() external returns (uint256 liqSupplyExPrice_, uint256 liqBorrowExPrice_, uint256 vaultSupplyExPrice_, uint256 vaultBorrowExPrice_)

calculates the updated vault exchange prices and writes them to storage

LIQUIDITY ​

solidity
function LIQUIDITY() external view returns (address)

returns the liquidity contract address

operate ​

solidity
function operate(uint256 nftId_, int256 newCol_, int256 newDebt_, address to_) external payable returns (uint256, int256, int256)

liquidate ​

solidity
function liquidate(uint256 debtAmt_, uint256 colPerUnitDebt_, address to_, bool absorb_) external payable returns (uint256 actualDebtAmt_, uint256 actualColAmt_)

absorb ​

solidity
function absorb() external

rebalance ​

solidity
function rebalance() external payable returns (int256 supplyAmt_, int256 borrowAmt_)

FluidLiquidateResult ​

solidity
error FluidLiquidateResult(uint256 colLiquidated, uint256 debtLiquidated)