Structs ​
Structs ​
DexState ​
solidity
struct DexState {
uint256 lastToLastStoredPrice;
uint256 lastStoredPrice;
uint256 centerPrice;
uint256 lastUpdateTimestamp;
uint256 lastPricesTimeDiff;
uint256 oracleCheckPoint;
uint256 oracleMapping;
uint256 totalSupplyShares;
uint256 totalBorrowShares;
bool isSwapAndArbitragePaused;
ShiftChanges shifts;
}
ShiftData ​
solidity
struct ShiftData {
uint256 oldUpper;
uint256 oldLower;
uint256 duration;
uint256 startTimestamp;
uint256 oldTime;
}
CenterPriceShift ​
solidity
struct CenterPriceShift {
uint256 shiftPercentage;
uint256 duration;
uint256 startTimestamp;
}
ShiftChanges ​
solidity
struct ShiftChanges {
bool isRangeChangeActive;
bool isThresholdChangeActive;
bool isCenterPriceShiftActive;
ShiftData rangeShift;
ShiftData thresholdShift;
CenterPriceShift centerPriceShift;
}
Configs ​
solidity
struct Configs {
bool isSmartCollateralEnabled;
bool isSmartDebtEnabled;
uint256 fee;
uint256 revenueCut;
uint256 upperRange;
uint256 lowerRange;
uint256 upperShiftThreshold;
uint256 lowerShiftThreshold;
uint256 shiftingTime;
address centerPriceAddress;
address hookAddress;
uint256 maxCenterPrice;
uint256 minCenterPrice;
uint256 utilizationLimitToken0;
uint256 utilizationLimitToken1;
}
SwapLimitsAndAvailability ​
solidity
struct SwapLimitsAndAvailability {
uint256 liquiditySupplyToken0;
uint256 liquiditySupplyToken1;
uint256 liquidityBorrowToken0;
uint256 liquidityBorrowToken1;
uint256 liquidityWithdrawableToken0;
uint256 liquidityWithdrawableToken1;
uint256 liquidityBorrowableToken0;
uint256 liquidityBorrowableToken1;
uint256 utilizationLimitToken0;
uint256 utilizationLimitToken1;
uint256 withdrawableUntilUtilizationLimitToken0;
uint256 withdrawableUntilUtilizationLimitToken1;
uint256 borrowableUntilUtilizationLimitToken0;
uint256 borrowableUntilUtilizationLimitToken1;
FluidLiquidityResolverStructs.UserSupplyData liquidityUserSupplyDataToken0;
FluidLiquidityResolverStructs.UserSupplyData liquidityUserSupplyDataToken1;
FluidLiquidityResolverStructs.UserBorrowData liquidityUserBorrowDataToken0;
FluidLiquidityResolverStructs.UserBorrowData liquidityUserBorrowDataToken1;
}
DexEntireData ​
solidity
struct DexEntireData {
address dex;
IFluidDexT1.ConstantViews constantViews;
IFluidDexT1.ConstantViews2 constantViews2;
Configs configs;
IFluidDexT1.PricesAndExchangePrice pex;
IFluidDexT1.CollateralReserves colReserves;
IFluidDexT1.DebtReserves debtReserves;
DexState dexState;
SwapLimitsAndAvailability limitsAndAvailability;
}
UserSupplyData ​
solidity
struct UserSupplyData {
bool isAllowed;
uint256 supply;
uint256 withdrawalLimit;
uint256 lastUpdateTimestamp;
uint256 expandPercent;
uint256 expandDuration;
uint256 baseWithdrawalLimit;
uint256 withdrawableUntilLimit;
uint256 withdrawable;
FluidLiquidityResolverStructs.UserSupplyData liquidityUserSupplyDataToken0;
FluidLiquidityResolverStructs.UserSupplyData liquidityUserSupplyDataToken1;
}
UserBorrowData ​
solidity
struct UserBorrowData {
bool isAllowed;
uint256 borrow;
uint256 borrowLimit;
uint256 lastUpdateTimestamp;
uint256 expandPercent;
uint256 expandDuration;
uint256 baseBorrowLimit;
uint256 maxBorrowLimit;
uint256 borrowableUntilLimit;
uint256 borrowable;
FluidLiquidityResolverStructs.UserBorrowData liquidityUserBorrowDataToken0;
FluidLiquidityResolverStructs.UserBorrowData liquidityUserBorrowDataToken1;
}