Skip to content

Structs ​

Configs ​

solidity
struct Configs {
  uint16 supplyRateMagnifier;
  uint16 borrowRateMagnifier;
  uint16 collateralFactor;
  uint16 liquidationThreshold;
  uint16 liquidationMaxLimit;
  uint16 withdrawalGap;
  uint16 liquidationPenalty;
  uint16 borrowFee;
  address oracle;
  uint256 oraclePriceOperate;
  uint256 oraclePriceLiquidate;
  address rebalancer;
  uint256 lastUpdateTimestamp;
}

ExchangePricesAndRates ​

solidity
struct ExchangePricesAndRates {
  uint256 lastStoredLiquiditySupplyExchangePrice;
  uint256 lastStoredLiquidityBorrowExchangePrice;
  uint256 lastStoredVaultSupplyExchangePrice;
  uint256 lastStoredVaultBorrowExchangePrice;
  uint256 liquiditySupplyExchangePrice;
  uint256 liquidityBorrowExchangePrice;
  uint256 vaultSupplyExchangePrice;
  uint256 vaultBorrowExchangePrice;
  uint256 supplyRateLiquidity;
  uint256 borrowRateLiquidity;
  int256 supplyRateVault;
  int256 borrowRateVault;
  int256 rewardsOrFeeRateSupply;
  int256 rewardsOrFeeRateBorrow;
}

TotalSupplyAndBorrow ​

solidity
struct TotalSupplyAndBorrow {
  uint256 totalSupplyVault;
  uint256 totalBorrowVault;
  uint256 totalSupplyLiquidityOrDex;
  uint256 totalBorrowLiquidityOrDex;
  uint256 absorbedSupply;
  uint256 absorbedBorrow;
}

LimitsAndAvailability ​

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

CurrentBranchState ​

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

VaultState ​

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

VaultEntireData ​

solidity
struct VaultEntireData {
  address vault;
  bool isSmartCol;
  bool isSmartDebt;
  struct IFluidVault.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 ​

solidity
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 with absirb will always be >= without asborb. Sometimes without asborb can provide better swaps, sometimes with absirb can provide better swaps. But available in with absirb will always be >= One

Parameters ​

NameTypeDescription
solidity
struct LiquidationStruct {
  address vault;
  address token0In;
  address token0Out;
  address token1In;
  address token1Out;
  uint256 inAmt;
  uint256 outAmt;
  uint256 inAmtWithAbsorb;
  uint256 outAmtWithAbsorb;
  bool absorbAvailable;
}

AbsorbStruct ​

solidity
struct AbsorbStruct {
  address vault;
  bool absorbAvailable;
}