Fund Flow Controller
The FundFlowController
manages deposits and withdrawals for Chainlink staking vaults in the OperatorVCS
and CommunityVCS
. Specifcally, it calculates vault deposit/withdrawal order, calculates the current state of accounting across vault groups, and periodically unbonds vaults in the Chainlink staking contract to ensure there are always funds available to withdraw.
View Functions
operatorVCS
Returns the address of the Operator VCS
Return Values
operatorVCS
address
Address of Operator VCS
communityVCS
Returns the address of the Community VCS
Return Values
communityVCS
address
Address of Community VCS
unbondingPeriod
Returns the duration of the unbonding period in the Chainlink staking contract
Return Values
unbondingPeriod
uint64
Unbonding period
claimPeriod
Returns the duration of the claim period in the Chainlink staking contract
Return Values
claimPeriod
uint64
Claim period
numVaultGroups
Returns the total number of vault groups
Return Values
numVaultGroups
uint64
Number of vault groups
curUnbondedVaultGroup
Returns the index of current unbonded vault group
Return Values
curUnbondedVaultGroup
uint64
Current unbonded vault group
timeOfLastUpdateByGroup
Returns the time that a vault group was last unbonded
Parameters
vaultGroup
uint64
Index of vault group
Return Values
timeOfLastUpdate
uint64
Time of last update for selected group
getDepositData
Returns encoded vault deposit order for each strategy
Return data should be passed to the priority pool when depositing into the staking pool
Parameters
_toDeposit
uint256
amount to deposit
Return Values
depositData
bytes[]
list of encoded vault deposit data
getWithdrawalData
Returns encoded vault withdrawal order for each strategy
Return data should be passed to the priority pool when withdrawing from the staking pool
Parameters
_toWithdraw
uint256
amount to withdraw
Return Values
withdrawalData
bytes[]
list of encoded vault withdrawal data
claimPeriodActive
Returns whether claim period is active
Funds can only be withdrawn while the claim period is active
Return Values
isActive
bool
true if claim period is active, false otherwise
Write Functions
updateVaultGroups
Executes a vault group update
Re-unbonds all vaults in the current vault group and increments the current vault group to the next one which will have just entered the claim period an update is needed once per claim period right after the claim period expires for the current vault group
updateOperatorVaultGroupAccounting
Calculates and updates totalDepositRoom and totalUnbonded for a list of operator vault groups
Used to correct minor accounting errors that result from the removal or slashing of operators in the Chainlink staking contract
Parameters
_vaultGroups
uint256[]
list of vault groups
Last updated