The VaultControllerStrategy::_depositToVaults() function handles depositing leftover tokens (toDeposit
) into non-group vaults, starting from the index tracked by globalState.depositIndex
. However, if the deposit index reaches the length of the vaults array, it does not reset. This causes any remaining tokens to be prevented from being deposited into non-group vaults in future deposit cycles.
The globalState.depositIndex
is intended to track the next non-group vault that should receive a token deposit. However, if globalState.depositIndex
reaches the length of the vaults array (vaults.length
), it is not reset to start from the first non-group vault.
VaultControllerStrategy::_depositToVaults():
This issue prevents the contract from properly distributing leftover tokens to non-group vaults once the index reaches the end of the vaults
array.
vscode
Ensure that the globalState.depositIndex
is reset to the first of the non-group vaults once it reaches vaults.length
.
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.