51530 sc high validators can not claim pending accrued commission when reward tokens have been removed from the isrewardtoken mapping
Description
Brief/Intro
Vulnerability Details
/**
* @notice Request a commission claim for a validator and token (starts timelock)
* @dev Only callable by validator admin. Amount is locked at request time.
*/
function requestCommissionClaim(
uint16 validatorId,
address token
)
external
onlyValidatorAdmin(validatorId)
nonReentrant
_validateValidatorExists(validatorId)
@audit>>> _validateIsToken(token)
{
PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();
PlumeStakingStorage.ValidatorInfo storage validator = $.validators[validatorId];
if (!validator.active || validator.slashed) {
revert ValidatorInactive(validatorId);
}
// Settle the commission up to now to ensure an accurate amount
PlumeRewardLogic._settleCommissionForValidatorUpToNow($, validatorId);
@audit>> uint256 amount = $.validatorAccruedCommission[validatorId][token];
@audit>> if (amount == 0) {
revert InvalidAmount(0);
}
if ($.pendingCommissionClaims[validatorId][token].amount > 0) {
revert PendingClaimExists(validatorId, token);
}Impact Details
References
Proof of Concept
Previous50745 sc low single cooldown entry design causes timer reset on multiple unstakes leading to extended lock periodsNext50393 sc insight unused admin state variable increases deployment and storage costs
Was this helpful?