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 ​

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

updateRateDataV2s ​

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

updateTokenConfigs ​

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

updateUserClasses ​

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

updateUserWithdrawalLimit ​

sets a new withdrawal limit as the current limit for a certain user. Resets decay limit to 0

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 ​

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

updateUserBorrowConfigs ​

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