The updateVaultGroups function in the FundFlowController contract lacks proper input validation and access control. Malicious or incorrect inputs could lead to inconsistent states, unbonding incorrect vaults, or mismanagement of funds. Additionally, the function can be called by any address, which poses a significant security risk.
In the FundFlowController contract, the updateVaultGroups function is defined as:
Lack of Access Control:
The function lacks an access control modifier like onlyOwner or onlyAuthorized.
Any external address can call updateVaultGroups, potentially manipulating the contract's state.
Lack of Input Validation:
The function relies on internal calculations and external contract calls to update critical state variables.
The parameters passed to operatorVCS.updateVaultGroups and communityVCS.updateVaultGroups are not validated within the FundFlowController contract.
In OperatorVCS, the updateVaultGroups function is:
Even though updateVaultGroups in OperatorVCS is restricted by onlyFundFlowController, the FundFlowController itself lacks access control, allowing unauthorized entities to call updateVaultGroups and manipulate vault groups.
Unauthorized or incorrect unbonding of vaults, leading to withdrawal delays or loss of staking rewards.
Incorrect updates to totalDepositRoom and totalUnbonded could disrupt accounting, leading to misallocation of funds.
Users may experience loss of funds or rewards due to mismanagement caused by improper state updates.
The overall integrity and reliability of the staking system could be compromised.
Manual code review.
Add an access control modifier to updateVaultGroups, such as onlyOwner or a custom modifier restricting access to authorized entities.
Validate all input parameters within updateVaultGroups to ensure they are within expected ranges.
Verify that vault indices in _curGroupVaultsToUnbond are valid and correspond to existing vaults.
Check that _curGroupTotalDepositRoom and _nextGroupTotalUnbonded are accurate and consistent with current state.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.