Structs

Configs

struct Configs {
  uint16 supplyRateMagnifier;
  uint16 borrowRateMagnifier;
  uint16 collateralFactor;
  uint16 liquidationThreshold;
  uint16 liquidationMaxLimit;
  uint16 withdrawalGap;
  uint16 liquidationPenalty;
  uint16 borrowFee;
  address oracle;
  uint256 oraclePrice;
  address rebalancer;
}

ExchangePricesAndRates

struct ExchangePricesAndRates {
  uint256 lastStoredLiquiditySupplyExchangePrice;
  uint256 lastStoredLiquidityBorrowExchangePrice;
  uint256 lastStoredVaultSupplyExchangePrice;
  uint256 lastStoredVaultBorrowExchangePrice;
  uint256 liquiditySupplyExchangePrice;
  uint256 liquidityBorrowExchangePrice;
  uint256 vaultSupplyExchangePrice;
  uint256 vaultBorrowExchangePrice;
  uint256 supplyRateVault;
  uint256 borrowRateVault;
  uint256 supplyRateLiquidity;
  uint256 borrowRateLiquidity;
  uint256 rewardsRate;
}

TotalSupplyAndBorrow

struct TotalSupplyAndBorrow {
  uint256 totalSupplyVault;
  uint256 totalBorrowVault;
  uint256 totalSupplyLiquidity;
  uint256 totalBorrowLiquidity;
  uint256 absorbedSupply;
  uint256 absorbedBorrow;
}

LimitsAndAvailability

struct LimitsAndAvailability {
  uint256 withdrawLimit;
  uint256 withdrawableUntilLimit;
  uint256 withdrawable;
  uint256 borrowLimit;
  uint256 borrowableUntilLimit;
  uint256 borrowable;
  uint256 minimumBorrowing;
}

CurrentBranchState

struct CurrentBranchState {
  uint256 status;
  int256 minimaTick;
  uint256 debtFactor;
  uint256 partials;
  uint256 debtLiquidity;
  uint256 baseBranchId;
  int256 baseBranchMinima;
}

VaultState

struct VaultState {
  uint256 totalPositions;
  int256 topTick;
  uint256 currentBranch;
  uint256 totalBranch;
  uint256 totalBorrow;
  uint256 totalSupply;
  struct Structs.CurrentBranchState currentBranchState;
}

VaultEntireData

struct VaultEntireData {
  address vault;
  struct IFluidVaultT1.ConstantViews constantVariables;
  struct Structs.Configs configs;
  struct Structs.ExchangePricesAndRates exchangePricesAndRates;
  struct Structs.TotalSupplyAndBorrow totalSupplyAndBorrow;
  struct Structs.LimitsAndAvailability limitsAndAvailability;
  struct Structs.VaultState vaultState;
  struct Structs.UserSupplyData liquidityUserSupplyData;
  struct Structs.UserBorrowData liquidityUserBorrowData;
}

UserPosition

struct UserPosition {
  uint256 nftId;
  address owner;
  bool isLiquidated;
  bool isSupplyPosition;
  int256 tick;
  uint256 tickId;
  uint256 beforeSupply;
  uint256 beforeBorrow;
  uint256 beforeDustBorrow;
  uint256 supply;
  uint256 borrow;
  uint256 dustBorrow;
}

LiquidationStruct

liquidation related data Liquidity in Two will always be >= One. Sometimes One can provide better swaps, sometimes Two can provide better swaps. But available in Two will always be >= One

Parameters

NameTypeDescription
struct LiquidationStruct {
  address vault;
  address tokenIn;
  address tokenOut;
  uint256 tokenInAmtOne;
  uint256 tokenOutAmtOne;
  uint256 tokenInAmtTwo;
  uint256 tokenOutAmtTwo;
}

AbsorbStruct

struct AbsorbStruct {
  address vault;
  bool absorbAvailable;
}