Skip to content
Business logic Audit finding Intermediate

Validators are not able to claim their accrued commission when the reward token is removed.

Validators cannot claim accrued commission for a reward token after the protocol removes that token, because the claim function rejects removed tokens. This can permanently lock the validator's earned commission.

WinSec Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

50924 sc high validators are not able to claim their accrued commission when the reward token is removed

Description

Brief / Intro

Validators are not able to claim their accrued commission if the reward token they earned has been removed by the protocol. This is because requestCommissionClaim uses the _validateIsToken modifier which reverts for removed tokens.

Vulnerability Details

The relevant part of requestCommissionClaim in ValidatorFacet:

Solidity
function requestCommissionClaim(
    uint16 validatorId,
    address token
)
    external
    onlyValidatorAdmin(validatorId)
    nonReentrant
    _validateValidatorExists(validatorId)
    _validateIsToken(token)
{
    PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();
    PlumeStakingStorage.ValidatorInfo storage validator = $.validators[validatorId];

    if (!validator.active || validator.slashed) {
        revert ValidatorInactive(validatorId);
    }

    // Settle commission up to now to ensure accurate amount
    PlumeRewardLogic._settleCommissionForValidatorUpToNow($, validatorId);

    uint256 amount = $.validatorAccruedCommission[validatorId][token];
    if (amount == 0) {
        revert InvalidAmount(0);
    }
    if ($.pendingCommissionClaims[validatorId][token].amount > 0) {
        revert PendingClaimExists(validatorId, token);
    }
    address recipient = validator.l2WithdrawAddress;
    uint256 nowTs = block.timestamp;
    $.pendingCommissionClaims[validatorId][token] = PlumeStakingStorage.PendingCommissionClaim({
        amount: amount,
        requestTimestamp: nowTs,
        token: token,
        recipient: recipient
    });
    // Zero out accrued commission immediately
    $.validatorAccruedCommission[validatorId][token] = 0;

    emit CommissionClaimRequested(validatorId, token, recipient, amount, nowTs);
}

The _validateIsToken modifier:

Solidity
modifier _validateIsToken(
    address token
) {
    if (!PlumeStakingStorage.layout().isRewardToken[token]) {
        revert TokenDoesNotExist(token);
    }
    _;
}

Because the modifier requires isRewardToken[token] to be true, once an admin calls removeRewardToken (which sets isRewardToken[token] to false), the validator can no longer call requestCommissionClaim for that token — even if they previously accrued commission. The accrued commission would remain stuck (or eventually lost), as requestCommissionClaim cannot be executed and therefore a subsequent finalizeCommissionClaim cannot be initiated by the validator.

Note: user claims for removed tokens are still supported because claim calls _validateTokenForClaim, which allows claims for removed tokens if there are stored or calculable rewards:

Solidity
function _validateTokenForClaim(address token, address user) internal view returns (bool isActive) {
    PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();

    isActive = $.isRewardToken[token];

    if (!isActive) {
        // If token is not active, check if there are previously earned/stored rewards
        // or pending rewards that can still be calculated
        uint16[] memory validatorIds = $.userValidators[user];
        bool hasRewards = false;

        for (uint256 i = 0; i < validatorIds.length; i++) {
            uint16 validatorId = validatorIds[i];

            // Check stored rewards
            if ($.userRewards[user][validatorId][token] > 0) {
                hasRewards = true;
                break;
            }

            // Check pending (calculable) rewards for removed tokens
            uint256 userStakedAmount = $.userValidatorStakes[user][validatorId].staked;
            if (userStakedAmount > 0) {
                (uint256 userRewardDelta,,) = PlumeRewardLogic.calculateRewardsWithCheckpointsView(
                    $, user, validatorId, token, userStakedAmount
                );
                if (userRewardDelta > 0) {
                    hasRewards = true;
                    break;
                }
            }
        }

        if (!hasRewards) {
            revert TokenDoesNotExist(token);
        }
    }
}

To mitigate, apply the same relaxed validation for validators so they can still request and finalize commission claims for tokens that have been removed but for which there are accrued commission amounts.

Impact Details

A validator cannot claim accrued commission for a token after that token has been removed (since requestCommissionClaim cannot be called). This can result in permanent loss of validator commissions — classified here as Theft of unclaimed yield — severity: High.

Proof of Concept

{% stepper %} {% step %} A validator sets a commission rate of 30%. {% endstep %}

{% step %} A user delegates tokens to this validator. {% endstep %}

{% step %} After some time the user accrues 1000 reward tokens. The validator's commission is 300 tokens, user gets 700. {% endstep %}

{% step %} The protocol removes this reward token (admin calls removeRewardToken). {% endstep %}

{% step %} The user calls claim and successfully receives their 700 tokens (user claims still work for removed tokens). {% endstep %}

{% step %} The validator tries to call requestCommissionClaim for the 300 tokens but it reverts due to _validateIsToken rejecting removed tokens. The validator cannot request/finalize the commission claim and thus loses those 300 tokens. {% endstep %} {% endstepper %}

References

The original report as published on Immunefi, by WinSec. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The commission claim function uses a token validation check that rejects any token no longer marked as a reward token, without allowing claims for previously accrued commission.

Impact

The validator permanently loses accrued commission for the removed token, which the report classifies as theft of unclaimed yield.

What the attacker needed

Validator has accrued commission; admin removes the reward token

The fix

The commission claim validation should be relaxed to allow claims for removed tokens when accrued commission exists, similar to how user claims are handled.

How it was found

  1. A validator sets a commission rate.
  2. A user delegates tokens to the validator.
  3. Rewards accrue, giving the validator a commission.
  4. The protocol removes the reward token.
  5. The user successfully claims their share.
  6. The validator's commission claim reverts because the token was removed.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A validator is a participant who helps run the network and earns a commission from rewards. If the network later removes a reward token, the validator's already-earned commission for that token becomes impossible to withdraw because the claim function refuses to process removed tokens.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by WinSec

View all

8 more disclosed reports, best first.

More from Plume Network

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.