Polygon Fund Flow Controller
PolygonFundFlowController manages deposits and withdrawals for Polygon staking vaults, including unbonding, restaking, and reward management. It coordinates with the strategy and withdrawal pool contracts and exposes functions for vault and reward state queries.
View Functions
strategy
Returns the address of the staking strategy contract.
function strategy() public view returns (address)strategy
address
Staking strategy address
withdrawalPool
Returns the address of the withdrawal pool contract.
function withdrawalPool() public view returns (address)withdrawalPool
address
Withdrawal pool address
depositController
Returns the address authorized to deposit queued tokens into vaults.
function depositController() public view returns (address)depositController
address
Deposit controller address
minTimeBetweenUnbonding
Returns the minimum number of seconds between unbonding calls.
minTimeBetweenUnbonding
uint64
Minimum seconds between unbonding
timeOfLastUnbond
Returns the time of the last unbonding call.
timeOfLastUnbond
uint64
Time of last unbonding
canDepositQueuedTokens
Returns whether tokens can be deposited.
Return Values
canDeposit
bool
true if deposit is allowed
shouldUnbondVaults
Returns whether vaults should be unbonded.
Return Values
shouldUnbond
bool
true if unbonding is needed
shouldWithdrawVaults
Returns whether vaults are unbonded and ready to be withdrawn from, and the list of withdrawable vaults.
Return Values
canWithdraw
bool
true if withdrawal is possible
vaultIds
uint256[]
List of withdrawable vault IDs
getVaultDeposits
Returns a list of total deposits for all vaults.
Return Values
deposits
uint256[]
List of vault deposits
getVaultRewards
Returns a list of unclaimed rewards for all vaults.
Return Values
rewards
uint256[]
List of vault rewards
getUnbondingVaults
Returns a list of currently unbonding vaults (excluding those queued for removal).
Return Values
vaultIds
uint256[]
List of unbonding vaults
getWithdrawableVaults
Returns a list of currently withdrawable vaults (excluding those queued for removal).
Return Values
vaultIds
uint256[]
List of withdrawable vaults
Write Functions
depositQueuedTokens
Deposits queued tokens into vaults.
_vaultIds
uint256[]
List of vault IDs
_amounts
uint256[]
Amounts to deposit per vault
unbondVaults
Unbonds vaults if needed.
forceUnbondVaults
Unbonds vaults to rebalance deposits between vaults.
_vaultIds
uint256[]
List of vault IDs
_amounts
uint256[]
Amounts to unbond per vault
withdrawVaults
Withdraws from vaults and triggers withdrawal pool upkeep if needed.
_vaultIds
uint256[]
List of vault IDs
restakeRewards
Restakes vault rewards for given vaults.
_vaultIds
uint256[]
List of vault IDs
setDepositController
Sets the address authorized to deposit queued tokens.
_depositController
address
Deposit controller address
setMinTimeBetweenUnbonding
Sets the minimum time between unbonding calls.
_minTimeBetweenUnbonding
uint64
Minimum seconds between unbonding
Last updated