FluidLimitsAuthDex ​
Inherits:Variables, Error, Events
Functions ​
validAddress ​
Validates that an address is not the zero address
modifier validAddress(address value_);onlyMultisig ​
Validates that an address is the team multisig
modifier onlyMultisig();setWithdrawalLimit ​
Sets the withdrawal limit for a specific user at a dex
This function can only be called by team multisig
function setWithdrawalLimit(address dex_, address user_, uint256 newLimit_) external onlyMultisig;Parameters
| Name | Type | Description | 
|---|---|---|
dex_ | address | The address of the dex | 
user_ | address | The address of the user for which to set the withdrawal limit | 
newLimit_ | uint256 | The new withdrawal limit to be set | 
setUserWithdrawLimit ​
Sets the user withdraw base limit at a specific dex for a user (vault) without restrictions. Can only be called by team multisig.
function setUserWithdrawLimit(address dex_, address user_, uint256 baseLimit_, bool skipMaxPercentChangeCheck_)
    external
    onlyMultisig;Parameters
| Name | Type | Description | 
|---|---|---|
dex_ | address | The address of the dex at which to set the user withdraw limit | 
user_ | address | The address of the user 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 at a specific dex for a user (vault), with time and max percent change restrictions. Can only be called by team multisig.
function setUserBorrowLimits(address dex_, address user_, uint256 baseLimit_, uint256 maxLimit_)
    external
    onlyMultisig;Parameters
| Name | Type | Description | 
|---|---|---|
dex_ | address | The address of the dex at which to set the user borrow limit | 
user_ | address | The address of the user 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. | 
setMaxBorrowShares ​
Sets the max borrow shares of a DEX. To update max supply and max borrow shares at once within same coolDown, use setMaxShares.
This function can only be called by team multisig
function setMaxBorrowShares(address dex_, uint256 maxBorrowShares_, bool confirmLiquidityLimitsCoverCap_)
    external
    onlyMultisig;Parameters
| Name | Type | Description | 
|---|---|---|
dex_ | address | The address of the dex at which to set the max borrow shares | 
maxBorrowShares_ | uint256 | The max borrow shares. | 
confirmLiquidityLimitsCoverCap_ | bool | Reminder to manually confirm that the limits for the dex at liquidity layer cover the cap. | 
setMaxSupplyShares ​
Sets the max supply shares of a DEX. To update max supply and max borrow shares at once within same coolDown, use setMaxShares.
This function can only be called by team multisig
function setMaxSupplyShares(address dex_, uint256 maxSupplyShares_, bool confirmLiquidityLimitsCoverCap_)
    external
    onlyMultisig;Parameters
| Name | Type | Description | 
|---|---|---|
dex_ | address | The address of the dex at which to set the max supply shares | 
maxSupplyShares_ | uint256 | The max supply shares. | 
confirmLiquidityLimitsCoverCap_ | bool | Reminder to manually confirm that the limits for the dex at liquidity layer cover the cap. | 
setMaxShares ​
Sets both max borrow shares and max supply shares of a DEX at once.
This function can only be called by team multisig
function setMaxShares(
    address dex_,
    uint256 maxSupplyShares_,
    uint256 maxBorrowShares_,
    bool confirmLiquidityLimitsCoverCap_
) external onlyMultisig;Parameters
| Name | Type | Description | 
|---|---|---|
dex_ | address | The address of the dex at which to set the max shares | 
maxSupplyShares_ | uint256 | The max supply shares. | 
maxBorrowShares_ | uint256 | The max borrow shares. | 
confirmLiquidityLimitsCoverCap_ | bool | Reminder to manually confirm that the limits for the dex at liquidity layer cover the cap. | 
_validateSetDexShares ​
Validates parameters for setting DEX shares.
function _validateSetDexShares(address dex_, bool confirmLiquidityLimitsCoverCap_) internal;_setMaxBorrowShares ​
Sets the max borrow shares for a DEX.
function _setMaxBorrowShares(address dex_, uint256 maxBorrowShares_) internal;_setMaxSupplyShares ​
Sets the max supply shares for a DEX.
function _setMaxSupplyShares(address dex_, uint256 maxSupplyShares_) internal;_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;getMaxBorrowShares ​
Get the max borrow shares of a DEX
function getMaxBorrowShares(address dex_) public view returns (uint256);Parameters
| Name | Type | Description | 
|---|---|---|
dex_ | address | The address of the DEX | 
Returns
| Name | Type | Description | 
|---|---|---|
<none> | uint256 | The max borrow shares | 
getMaxSupplyShares ​
Get the max supply shares of a DEX
function getMaxSupplyShares(address dex_) public view returns (uint256);Parameters
| Name | Type | Description | 
|---|---|---|
dex_ | address | The address of the DEX | 
Returns
| Name | Type | Description | 
|---|---|---|
<none> | uint256 | The max supply shares | 
getUserSupplyConfig ​
Returns the user supply config for a given dex and user.
function getUserSupplyConfig(address dex_, address user_)
    public
    view
    returns (AdminModuleStructs.UserSupplyConfig memory userSupplyConfigs_);getUserBorrowConfig ​
Returns the user borrow config for a given dex and user.
function getUserBorrowConfig(address dex_, address user_)
    public
    view
    returns (AdminModuleStructs.UserBorrowConfig memory userBorrowConfigs_);
