Skip to content
Business logic Audit finding Intermediate

_validateIsToken(...) blocks validators from claiming earned rewards from removed tokens.

A validator commission claim function uses a token-validation modifier that reverts whenever the reward token has been removed, so validators cannot claim commissions they earned before removal. An attacker cannot exploit this directly, but affected validators have their earned rewards temporarily frozen.

Kaysoft Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

52390 sc high validateistoken blocks validators from claiming earned rewards from removed tokens

Submitted on Aug 10th 2025 at 12:01:48 UTC by @kaysoft for Attackathon | Plume Network

Description

Brief/Intro

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.

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

Instead of reverting immediately in the above logic, check for unclaimed earned commissions like the RewardsFacet.sol#_validateTokenForClaim(...).

Solidity
function requestCommissionClaim(
        uint16 validatorId,
        address token
    )
        external
        onlyValidatorAdmin(validatorId)
        nonReentrant
        _validateValidatorExists(validatorId)
        _validateIsToken(token)//@audit-issue validator cannot claim a token that has been removed
    {
        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);
    }

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.

{% hint style="danger" %} Severity: High — Temporary freezing of funds for at least 24 hours. {% endhint %}

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

{% stepper %} {% step %}

Setup

  1. Admin deploys PlumeStaking contract and adds 2 reward tokens.
  2. Bob has validator 1 on PlumeStaking.
  3. Bob has earned 100 Plume reward tokens but has not requested claiming them with the requestCommissionClaim(...) function. {% endstep %}

{% step %}

Trigger

  1. Admin removes Plume token from reward tokens.
  2. 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. {% endstep %}

{% step %}

Result

  1. Bob cannot claim his earned 100 Plume reward tokens. {% endstep %} {% endstepper %}

References

The original report as published on Immunefi, by kaysoft. 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 claim path reuses a strict token-existence check that reverts for removed tokens instead of first checking whether the caller has unclaimed earned rewards, as the rewards facet does.

Impact

Earned commissions for a removed reward token are temporarily frozen and cannot be claimed by the validator.

What the attacker needed

Validator with unclaimed commissions; admin removes the reward token

The fix

The claim function should check for pending or earned rewards on a removed token before reverting, following the pattern used in the rewards facet.

How it was found

  1. Admin deploys the staking contract and adds two reward tokens.
  2. A validator earns reward tokens but does not request a commission claim.
  3. Admin removes one of the reward tokens from the allowed list.
  4. The validator calls the commission claim function and the transaction reverts.

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 a staking system and earns a cut of rewards. When the admin removes a reward token from the allowed list, the claim function refuses to run even though the validator already earned some of that token, so the money is stuck until the code is changed.

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 Kaysoft

View all

22 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.