IFluidLiquidityAdmin ​
Functions ​
updateAuths ​
adds/removes auths. Auths generally could be contracts which can have restricted actions defined on contract. auths can be helpful in reducing governance overhead where it's not needed.
function updateAuths(AdminModuleStructs.AddressBool[] calldata authsStatus_) external;
Parameters
Name | Type | Description |
---|---|---|
authsStatus_ | AdminModuleStructs.AddressBool[] | array of structs setting allowed status for an address. status true => add auth, false => remove auth |
updateGuardians ​
adds/removes guardians. Only callable by Governance.
function updateGuardians(AdminModuleStructs.AddressBool[] calldata guardiansStatus_) external;
Parameters
Name | Type | Description |
---|---|---|
guardiansStatus_ | AdminModuleStructs.AddressBool[] | array of structs setting allowed status for an address. status true => add guardian, false => remove guardian |
updateRevenueCollector ​
changes the revenue collector address (contract that is sent revenue). Only callable by Governance.
function updateRevenueCollector(address revenueCollector_) external;
Parameters
Name | Type | Description |
---|---|---|
revenueCollector_ | address | new revenue collector address |
changeStatus ​
changes current status, e.g. for pausing or unpausing all user operations. Only callable by Auths.
function changeStatus(uint256 newStatus_) external;
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(AdminModuleStructs.RateDataV1Params[] calldata tokensRateData_) external;
Parameters
Name | Type | Description |
---|---|---|
tokensRateData_ | AdminModuleStructs.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(AdminModuleStructs.RateDataV2Params[] calldata tokensRateData_) external;
Parameters
Name | Type | Description |
---|---|---|
tokensRateData_ | AdminModuleStructs.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(AdminModuleStructs.TokenConfig[] calldata tokenConfigs_) external;
Parameters
Name | Type | Description |
---|---|---|
tokenConfigs_ | AdminModuleStructs.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(AdminModuleStructs.AddressUint256[] calldata userClasses_) external;
Parameters
Name | Type | Description |
---|---|---|
userClasses_ | AdminModuleStructs.AddressUint256[] | struct array of uint256 value to assign for each user address |
updateUserSupplyConfigs ​
sets user supply configs per token basis. Eg: with interest or interest-free and automated limits. Only callable by Auths.
function updateUserSupplyConfigs(AdminModuleStructs.UserSupplyConfig[] memory userSupplyConfigs_) external;
Parameters
Name | Type | Description |
---|---|---|
userSupplyConfigs_ | AdminModuleStructs.UserSupplyConfig[] | struct array containing user supply config, see UserSupplyConfig struct for more info |
updateUserWithdrawalLimit ​
sets a new withdrawal limit as the current limit for a certain user
function updateUserWithdrawalLimit(address user_, address token_, uint256 newLimit_) external;
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). |
updateUserBorrowConfigs ​
setting user borrow configs per token basis. Eg: with interest or interest-free and automated limits. Only callable by Auths.
function updateUserBorrowConfigs(AdminModuleStructs.UserBorrowConfig[] memory userBorrowConfigs_) external;
Parameters
Name | Type | Description |
---|---|---|
userBorrowConfigs_ | AdminModuleStructs.UserBorrowConfig[] | struct array containing user borrow config, see UserBorrowConfig struct for more info |
pauseUser ​
pause operations for a particular user in class 0 (class 1 users can't be paused by guardians). Only callable by Guardians.
function pauseUser(address user_, address[] calldata supplyTokens_, address[] calldata borrowTokens_) external;
Parameters
Name | Type | Description |
---|---|---|
user_ | address | address of user to pause operations for |
supplyTokens_ | address[] | token addresses to pause withdrawals for |
borrowTokens_ | address[] | token addresses to pause borrowings for |
unpauseUser ​
unpause operations for a particular user in class 0 (class 1 users can't be paused by guardians). Only callable by Guardians.
function unpauseUser(address user_, address[] calldata supplyTokens_, address[] calldata borrowTokens_) external;
Parameters
Name | Type | Description |
---|---|---|
user_ | address | address of user to unpause operations for |
supplyTokens_ | address[] | token addresses to unpause withdrawals for |
borrowTokens_ | address[] | token addresses to unpause borrowings for |
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;
Parameters
Name | Type | Description |
---|---|---|
tokens_ | address[] | array of tokens to collect revenue for |
updateExchangePrices ​
gets the current updated exchange prices for n tokens and updates all prices, rates related data in storage.
function updateExchangePrices(address[] calldata tokens_)
external
returns (uint256[] memory supplyExchangePrices_, uint256[] memory borrowExchangePrices_);
Parameters
Name | Type | Description |
---|---|---|
tokens_ | address[] | tokens to update exchange prices for |
Returns
Name | Type | Description |
---|---|---|
supplyExchangePrices_ | uint256[] | new supply rates of overall system for each token |
borrowExchangePrices_ | uint256[] | new borrow rates of overall system for each token |