FluidLimitsAuth ​
Inherits:Variables, Events, Error
Functions ​
validAddress ​
Validates that an address is not the zero address
modifier validAddress(address value_);
onlyMultisig ​
modifier onlyMultisig();
constructor ​
constructor(address liquidity_) validAddress(liquidity_);
setWithdrawalLimit ​
Sets the withdrawal limit for a specific token of a user in the liquidity
This function can only be called by team multisig
function setWithdrawalLimit(address user_, address token_, uint256 newLimit_) external onlyMultisig;
Parameters
Name | Type | Description |
---|---|---|
user_ | address | The address of the user for which to set the withdrawal limit |
token_ | address | The address of the token for which to set the withdrawal limit |
newLimit_ | uint256 | The new withdrawal limit to be set |
setUserWithdrawLimit ​
sets withdraw base limit without restrictions. Can only be called by team multisig.
function setUserWithdrawLimit(address user_, address token_, uint256 baseLimit_, bool skipMaxPercentChangeCheck_)
external
onlyMultisig;
Parameters
Name | Type | Description |
---|---|---|
user_ | address | The address of the user for which to set the user withdraw limit |
token_ | address | The address of the token for which to set the user withdraw limit |
baseLimit_ | uint256 | The base limit for the user supply. Set to 0 to keep current value. |
skipMaxPercentChangeCheck_ | bool | allow full range of limit check. Keep to false by default to have additional human error check. |
setUserBorrowLimits ​
Sets the user borrow limits for a specific token of a user, with time and max percent change restrictions. Can only be called by team multisig.
This function can only be called by team multisig
function setUserBorrowLimits(address user_, address token_, uint256 baseLimit_, uint256 maxLimit_)
external
onlyMultisig;
Parameters
Name | Type | Description |
---|---|---|
user_ | address | The address of the user for which to set the user borrow limit |
token_ | address | The address of the token for which to set the user borrow limit |
baseLimit_ | uint256 | The base limit for the user borrow. Set to 0 to keep current value. |
maxLimit_ | uint256 | The max limit for the user borrow. Set to 0 to keep current value. |
getUserSupplyConfig ​
Returns the user supply config for a given user and token.
function getUserSupplyConfig(address user_, address token_)
public
view
returns (AdminModuleStructs.UserSupplyConfig memory userSupplyConfigs_);
getUserBorrowConfig ​
Returns the user borrow config for a given user and token.
function getUserBorrowConfig(address user_, address token_)
public
view
returns (AdminModuleStructs.UserBorrowConfig memory userBorrowConfigs_);
_validateWithinMaxPercentChange ​
Validates that the new limit is within the allowed max percent change.
function _validateWithinMaxPercentChange(uint256 oldLimit_, uint256 newLimit_) internal pure;
_validateLastUpdateTime ​
Validates that the cooldown period has passed since the last update.
function _validateLastUpdateTime(uint256 lastUpdateTime_) internal view;