The _validateIsToken(...) modifier reverts for a reward token that has been removed.
The requestCommissionClaim(...) function uses the _validateIsToken(...) modifier which will cause unclaimed rewards to revert for a token that has been removed.
Vulnerability Details
The requestCommissionClaim(...) has a _validateIsToken(...) that immediately reverts if the reward token has been removed. Pending reward tokens for a removed token cannot be claimed by validators.
Instead of reverting immediately in the above logic, check for unclaimed earned commissions like the RewardsFacet.sol#_validateTokenForClaim(...).
Impact Details
Validators cannot claim pending earned reward tokens for a removed reward token. This happens if the reward token was removed before the validator calls the requestCommissionClaim(...) function.
All rewards earned up to the point of reward token removal before a validator calls requestCommissionClaim(...) are blocked.
Severity: High — Temporary freezing of funds for at least 24 hours.
Recommendation
Implement a pending reward check for a removed token when requestCommissionClaim(...) function is called instead of the reverting that is done in the _validateIsToken(...).
Refer to RewardsFacet.sol#_validateTokenForClaim(...) as an example of checking for pending/earned rewards for removed tokens prior to reverting.
Proof of Concept
1
Setup
Admin deploys PlumeStaking contract and adds 2 reward tokens.
Bob has validator 1 on PlumeStaking.
Bob has earned 100 Plume reward tokens but has not requested claiming them with the requestCommissionClaim(...) function.
2
Trigger
Admin removes Plume token from reward tokens.
Bob calls the requestCommissionClaim(...) function to start the claiming process of his earned 100 Plume reward tokens but the transaction reverts due to the _validateIsToken(...) modifier.
3
Result
Bob cannot claim his earned 100 Plume reward tokens.