Skip to content

FluidWithdrawLimitAuth ​

Git Source

Inherits:Variables, Error, Events

Functions ​

validAddress ​

Validates that an address is not the zero address

solidity
modifier validAddress(address value_);

onlyRebalancer ​

Validates that an address is a rebalancer (taken from reserve contract)

solidity
modifier onlyRebalancer();

onlyMultisig ​

Validates that an address is a multisig (taken from reserve contract)

solidity
modifier onlyMultisig();

constructor ​

solidity
constructor(IFluidReserveContract reserveContract_, address liquidity_, address multisig_)
    validAddress(address(reserveContract_))
    validAddress(liquidity_)
    validAddress(multisig_);

rebalanceWithdrawalLimit ​

updates the withdrawal limit for a specific token of a user in the liquidity

This function can only be called by the rebalancer

solidity
function rebalanceWithdrawalLimit(address user_, address token_, uint256 newLimit_) external onlyRebalancer;

Parameters

NameTypeDescription
user_addressThe address of the user for which to set the withdrawal limit
token_addressThe address of the token for which to set the withdrawal limit
newLimit_uint256The new withdrawal limit to be set

setWithdrawalLimit ​

Sets the withdrawal limit for a specific token of a user in the liquidity

This function can only be called by team multisig

solidity
function setWithdrawalLimit(address user_, address token_, uint256 newLimit_) external onlyMultisig;

Parameters

NameTypeDescription
user_addressThe address of the user for which to set the withdrawal limit
token_addressThe address of the token for which to set the withdrawal limit
newLimit_uint256The new withdrawal limit to be set

getUsersData ​

solidity
function getUsersData(address[] memory users_, address[] memory tokens_)
    public
    view
    returns (uint256[] memory initialUsersSupply_, uint256[] memory initialWithdrawLimit_);

_percentDiffForValue ​

gets the percentage difference between oldValue_ and newValue_ in relation to oldValue_

solidity
function _percentDiffForValue(uint256 oldValue_, uint256 newValue_)
    internal
    pure
    returns (uint256 configPercentDiff_);