FluidReserveContract
Inherits:Error, ReserveContractAuth, UUPSUpgradeable
This contract manages the approval of tokens for use by protocols and the execution of rebalances on protocols
Functions
onlyRebalancer
Checks that the sender is a rebalancer
modifier onlyRebalancer();
constructor
constructor(IFluidLiquidity liquidity_) validAddress(address(liquidity_)) Variables(liquidity_);
initialize
initializes the contract
function initialize(address[] memory _auths, address[] memory _rebalancers, address owner_)
public
initializer
validAddress(owner_);
Parameters
Name | Type | Description |
---|---|---|
_auths | address[] | The addresses that have the auth to approve and revoke protocol token allowances |
_rebalancers | address[] | The addresses that can execute a rebalance on a protocol |
owner_ | address | owner address is able to upgrade contract and update auth users |
_authorizeUpgrade
function _authorizeUpgrade(address) internal override onlyOwner;
renounceOwnership
override renounce ownership as it could leave the contract in an unwanted state if called by mistake.
function renounceOwnership() public view override onlyOwner;
rebalanceFToken
Executes a rebalance on a protocol by calling that protocol's rebalance
function
function rebalanceFToken(address protocol_, uint256 value_) external payable onlyRebalancer;
Parameters
Name | Type | Description |
---|---|---|
protocol_ | address | The protocol to rebalance |
value_ | uint256 | any msg.value to send along (as fetched from resolver!) |
rebalanceVault
Executes a rebalance on a protocol by calling that protocol's rebalance
function
function rebalanceVault(address protocol_, uint256 value_) external payable onlyRebalancer;
Parameters
Name | Type | Description |
---|---|---|
protocol_ | address | The protocol to rebalance |
value_ | uint256 | any msg.value to send along (as fetched from resolver!) |
transferFunds
function transferFunds(address[] calldata tokens_) external virtual onlyAuth;
getProtocolTokens
Gets the tokens that are approved for use by a protocol
function getProtocolTokens(address protocol_) external view returns (address[] memory result_);
Parameters
Name | Type | Description |
---|---|---|
protocol_ | address | The protocol to get the tokens for |
Returns
Name | Type | Description |
---|---|---|
result_ | address[] | The tokens that are approved for use by the protocol |
receive
allow receive native token
receive() external payable;