Skip to content

AuthModule ​

Git Source

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.

solidity
uint256 private constant MAX_TOKEN_CONFIG_UPDATE_THRESHOLD = 500;

Functions ​

onlyAuths ​

only auths guard

solidity
modifier onlyAuths();

collectRevenue ​

collects revenue for tokens to configured revenueCollector address.

Note that this can revert if token balance is < revenueAmount (utilization > 100%)

solidity
function collectRevenue(address[] calldata tokens_) external onlyAuths;

Parameters

NameTypeDescription
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.

solidity
function changeStatus(uint256 newStatus_) external onlyAuths;

Parameters

NameTypeDescription
newStatus_uint256new status status = 2 -> pause, status = 1 -> resume.

updateRateDataV1s ​

update tokens rate data version 1. Only callable by Auths.

solidity
function updateRateDataV1s(RateDataV1Params[] calldata tokensRateData_) external onlyAuths;

Parameters

NameTypeDescription
tokensRateData_RateDataV1Params[]array of RateDataV1Params with rate data to set for each token

updateRateDataV2s ​

update tokens rate data version 2. Only callable by Auths.

solidity
function updateRateDataV2s(RateDataV2Params[] calldata tokensRateData_) external onlyAuths;

Parameters

NameTypeDescription
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.

solidity
function updateTokenConfigs(TokenConfig[] calldata tokenConfigs_) external onlyAuths;

Parameters

NameTypeDescription
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.

solidity
function updateUserClasses(AddressUint256[] calldata userClasses_) external onlyAuths;

Parameters

NameTypeDescription
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

solidity
function updateUserWithdrawalLimit(address user_, address token_, uint256 newLimit_) external onlyAuths;

Parameters

NameTypeDescription
user_addressuser address for which to update the withdrawal limit
token_addresstoken address for which to update the withdrawal limit
newLimit_uint256new 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.

solidity
function updateUserSupplyConfigs(UserSupplyConfig[] memory userSupplyConfigs_) external onlyAuths;

Parameters

NameTypeDescription
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.

solidity
function updateUserBorrowConfigs(UserBorrowConfig[] memory userBorrowConfigs_) external onlyAuths;

Parameters

NameTypeDescription
userBorrowConfigs_UserBorrowConfig[]struct array containing user borrow config, see UserBorrowConfig struct for more info