Structs ​
Structs ​
InitializeVariables ​
solidity
struct InitializeVariables {
bool smartCol;
uint256 token0ColAmt;
bool smartDebt;
uint256 token0DebtAmt;
uint256 centerPrice;
uint256 fee;
uint256 revenueCut;
uint256 upperPercent;
uint256 lowerPercent;
uint256 upperShiftThreshold;
uint256 lowerShiftThreshold;
uint256 thresholdShiftTime;
uint256 centerPriceAddress;
uint256 hookAddress;
uint256 maxCenterPrice;
uint256 minCenterPrice;
}UserSupplyConfig ​
struct to set user supply & withdrawal config
solidity
struct UserSupplyConfig {
///
/// @param user address
address user;
///
/// @param expandPercent withdrawal limit expand percent. in 1e2: 100% = 10_000; 1% = 100
/// Also used to calculate rate at which withdrawal limit should decrease (instant).
uint256 expandPercent;
///
/// @param expandDuration withdrawal limit expand duration in seconds.
/// used to calculate rate together with expandPercent
uint256 expandDuration;
///
/// @param baseWithdrawalLimit base limit, below this, user can withdraw the entire amount.
/// amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:
/// with interest -> raw, without interest -> normal
uint256 baseWithdrawalLimit;
}UserBorrowConfig ​
struct to set user borrow & payback config
solidity
struct UserBorrowConfig {
///
/// @param user address
address user;
///
/// @param expandPercent debt limit expand percent. in 1e2: 100% = 10_000; 1% = 100
/// Also used to calculate rate at which debt limit should decrease (instant).
uint256 expandPercent;
///
/// @param expandDuration debt limit expand duration in seconds.
/// used to calculate rate together with expandPercent
uint256 expandDuration;
///
/// @param baseDebtCeiling base borrow limit. until here, borrow limit remains as baseDebtCeiling
/// (user can borrow until this point at once without stepped expansion). Above this, automated limit comes in place.
/// amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:
/// with interest -> raw, without interest -> normal
uint256 baseDebtCeiling;
///
/// @param maxDebtCeiling max borrow ceiling, maximum amount the user can borrow.
/// amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:
/// with interest -> raw, without interest -> normal
uint256 maxDebtCeiling;
}
