The removeStrategy function in the StakingPool contract removes a strategy and withdraws its deposits. However, for community strategies, it does not claim rewards before removing the strategy. The unclaimed rewards remain stuck in the rewards controller or in strategy because the only way to claim and process them is by first calling CommunityVCS::claimRewards and then CommunityVCS::updateDeposits. However, after removal, updateDeposits can no longer be triggered, leading to rewards being permanently inaccessible.
When a strategy is removed from the staking pool, the function _updateStrategyRewards is called to handle reward claims and deposit updates.
Then _updateStrategyRewards is calling strategy.updateDepositsfor each strategy.
This works fine for operator strategy, but community strategy do not claim rewards during this process. Only way to claim fees for community strategy is calling CommunityVCS::claimRewards.
Once claimed, fees need to be processed by strategy.updateDeposits to be transferred to the staking pool.
Since community strategies do not claim rewards as part of the updateDeposits function, any rewards not claimed before removal remain stuck. updateDeposits can only be triggered by the StakingPool contract, and once the strategy is removed, this function cannot be called anymore. Therefore, the unclaimed rewards are left in the rewards controller or in strategy contract are unrecoverable.
The rewards for the removed community strategy will be permanently stuck, as there is no function available to claim them after the strategy has been removed from the pool.
Manual
Ensure that the rewards for the community strategy are claimed before the strategy is removed. Modify the removeStrategy function to include a call to claimRewards for community strategies before the strategy is removed.
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.