AuthModule ​
Inherits:AuthInternals, GovernanceModule
Fluid Liquidity Auths only related methods
State Variables ​
MAX_TOKEN_CONFIG_UPDATE_THRESHOLD ​
max update on storage threshold as a sanity check. threshold is in 1e2, so 500 = 5%. A higher threshold is not allowed as it would cause the borrow rate to be updated too rarely.
uint256 private constant MAX_TOKEN_CONFIG_UPDATE_THRESHOLD = 500;
Functions ​
onlyAuths ​
only auths guard
modifier onlyAuths();
collectRevenue ​
collects revenue for tokens to configured revenueCollector address.
Note that this can revert if token balance is < revenueAmount (utilization > 100%)
function collectRevenue(address[] calldata tokens_) external onlyAuths;
Parameters
Name | Type | Description |
---|---|---|
tokens_ | address[] | array of tokens to collect revenue for |
changeStatus ​
changes current status, e.g. for pausing or unpausing all user operations. Only callable by Auths.
function changeStatus(uint256 newStatus_) external onlyAuths;
Parameters
Name | Type | Description |
---|---|---|
newStatus_ | uint256 | new status status = 2 -> pause, status = 1 -> resume. |
updateRateDataV1s ​
update tokens rate data version 1. Only callable by Auths.
function updateRateDataV1s(RateDataV1Params[] calldata tokensRateData_) external onlyAuths;
Parameters
Name | Type | Description |
---|---|---|
tokensRateData_ | RateDataV1Params[] | array of RateDataV1Params with rate data to set for each token |
updateRateDataV2s ​
update tokens rate data version 2. Only callable by Auths.
function updateRateDataV2s(RateDataV2Params[] calldata tokensRateData_) external onlyAuths;
Parameters
Name | Type | Description |
---|---|---|
tokensRateData_ | RateDataV2Params[] | array of RateDataV2Params with rate data to set for each token |
updateTokenConfigs ​
updates token configs: fee charge on borrowers interest & storage update utilization threshold. Only callable by Auths.
function updateTokenConfigs(TokenConfig[] calldata tokenConfigs_) external onlyAuths;
Parameters
Name | Type | Description |
---|---|---|
tokenConfigs_ | TokenConfig[] | contains token address, fee & utilization threshold |
updateUserClasses ​
updates user classes: 0 is for new protocols, 1 is for established protocols. Only callable by Auths.
function updateUserClasses(AddressUint256[] calldata userClasses_) external onlyAuths;
Parameters
Name | Type | Description |
---|---|---|
userClasses_ | AddressUint256[] | struct array of uint256 value to assign for each user address |
updateUserWithdrawalLimit ​
sets a new withdrawal limit as the current limit for a certain user
function updateUserWithdrawalLimit(address user_, address token_, uint256 newLimit_) external onlyAuths;
Parameters
Name | Type | Description |
---|---|---|
user_ | address | user address for which to update the withdrawal limit |
token_ | address | token address for which to update the withdrawal limit |
newLimit_ | uint256 | new limit until which user supply can decrease to. Important: input in raw. Must account for exchange price in input param calculation. Note any limit that is < max expansion or > current user supply will set max expansion limit or current user supply as limit respectively. - set 0 to make maximum possible withdrawable: instant full expansion, and if that goes below base limit then fully down to 0. - set type(uint256).max to make current withdrawable 0 (sets current user supply as limit). |
updateUserSupplyConfigs ​
sets user supply configs per token basis. Eg: with interest or interest-free and automated limits. Only callable by Auths.
function updateUserSupplyConfigs(UserSupplyConfig[] memory userSupplyConfigs_) external onlyAuths;
Parameters
Name | Type | Description |
---|---|---|
userSupplyConfigs_ | UserSupplyConfig[] | struct array containing user supply config, see UserSupplyConfig struct for more info |
updateUserBorrowConfigs ​
setting user borrow configs per token basis. Eg: with interest or interest-free and automated limits. Only callable by Auths.
function updateUserBorrowConfigs(UserBorrowConfig[] memory userBorrowConfigs_) external onlyAuths;
Parameters
Name | Type | Description |
---|---|---|
userBorrowConfigs_ | UserBorrowConfig[] | struct array containing user borrow config, see UserBorrowConfig struct for more info |