depositIdList
is array of Silo deposits owned by account. Ids are pushed on new deposits and deleted on withdrawals. depositIdList
is used to track deposits of user off-chain.
Problem is that L2ContractMigrationFacet doesn't update this array when migrates deposits. You can check it here:
https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/df2dd129a878d16d4adc75049179ac0029d9a96b/protocol/contracts/beanstalk/silo/L2ContractMigrationFacet.sol#L168-L170
Issue arises at the moment when such migrated deposit is removed from account (during transfer or withdrawal). It tries to remove such depositId from depositIdList
, as a result full removal will revert:
https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/df2dd129a878d16d4adc75049179ac0029d9a96b/protocol/contracts/libraries/Silo/LibTokenSilo.sol#L383-L387
Accounts which migrated via L2ContractMigrationFacet.sol can't perform full withdrawal in Silo. Worth noting is that L2ContractMigrationFacet manages migration of deposits owned by smart contracts.
So it is highly likely that smart contracts don't have functionality to perform partial withdraw to avoid issue. In case it lacks such functionality, its deposits can't be withdrawn and therefore frozen forever.
Manual Review
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.