Skip to content
Smart contracts Audit finding Intermediate

Validator will loose commission for the tokens which are removed from the reward tokens but they still have commission left to be claimed.

When a reward token is removed, the contract settles validators' pending commission for that token, but the commission claim function rejects any token that is no longer an active reward token. Validators therefore cannot claim commission they had already accrued for removed tokens, losing that yield.

swarun Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

52983 sc high validator will loose commission for the tokens which are removed from the reward tokens but they still have commission left to be claimed

Submitted on Aug 14th 2025 at 14:54:39 UTC by @swarun for Attackathon | Plume Network

Description

Brief/Intro

Claiming commission is not allowed for historical tokens because of an incorrect modifier which prevents validators from receiving the unclaimed commission.

Vulnerability Details

When a reward token is removed its pending commission is calculated and updated for validators (so they should be able to claim it). However, an incorrect modifier applied to the commission claim function prohibits claiming commission for non-reward tokens, thereby preventing claims for historical tokens.

Impact Details

Validators lose commission they are eligible to claim even though they are not slashed.

References

Proof of Concept

{% stepper %} {% step %}

Step: Removing a reward token updates final checkpoints and validator commission

When a reward token is removed, the contract updates rewards and commissions for validators up to removal time, then removes the token from the reward tokens set:

Solidity
function removeRewardToken(
        address token
    ) external onlyRole(PlumeRoles.REWARD_MANAGER_ROLE) {
        PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();
        if (!$.isRewardToken[token]) {
            revert TokenDoesNotExist(token);
        }

        // Find the index of the token in the array
        uint256 tokenIndex = _getTokenIndex(token);

        // Store removal timestamp to prevent future accrual
        uint256 removalTimestamp = block.timestamp;
        $.tokenRemovalTimestamps[token] = removalTimestamp;

        // Update validators (bounded by number of validators, not users)
        for (uint256 i = 0; i < $.validatorIds.length; i++) {
            uint16 validatorId = $.validatorIds[i];

            // Final update to current time to settle all rewards up to this point
            PlumeRewardLogic.updateRewardPerTokenForValidator($, token, validatorId);

            // Create a final checkpoint with a rate of 0 to stop further accrual definitively.
            PlumeRewardLogic.createRewardRateCheckpoint($, token, validatorId, 0);
        }

        // Set rate to 0 to prevent future accrual. This is now redundant but harmless.
        $.rewardRates[token] = 0;
        // DO NOT delete global checkpoints. Historical data is needed for claims.
        // delete $.rewardRateCheckpoints[token];

        // Update the array
        $.rewardTokens[tokenIndex] = $.rewardTokens[$.rewardTokens.length - 1];
        $.rewardTokens.pop();

        // Update the mapping
        $.isRewardToken[token] = false;

        delete $.maxRewardRates[token];
        emit RewardTokenRemoved(token);
    }

The loop calls update functions that settle commission for validators for that token. See reward logic references:

{% step %}

Step: Validator requests commission claim for that token

After removal, a validator should be able to request the commission that was accrued up to the removal timestamp. The following function is used to request commission claims:

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);
    }

This function settles commission and attempts to create a pending claim for the token. {% endstep %}

{% step %}

Step: Request fails due to token validation modifier

The request fails because of the _validateIsToken modifier which requires the token to be an active reward token:

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

Since isRewardToken[token] was set to false during removal, the modifier reverts, preventing validators from claiming commission for that (historical) token — despite commission having been accrued and settled for them. This results in permanent loss of unclaimed commission. {% endstep %} {% endstepper %}

The original report as published on Immunefi, by swarun. 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 modifier that requires the token to still be an active reward token, even though commission for removed tokens has already been settled and should remain claimable.

Impact

Validators permanently lose commission they had already accrued for removed tokens, even though they were not slashed.

What the attacker needed

A validator with accrued commission; the reward token is later removed

How it was found

  1. A reward manager removes a reward token, which settles each validator's commission up to that moment and marks the token as no longer a reward token.
  2. A validator calls the commission claim request function for that removed token.
  3. The call reverts because the token is no longer an active reward token, so the commission cannot be claimed.

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 cut (commission) of rewards. When the project stops paying rewards in a particular token, the contract still records what each validator is owed in that token, but the function for collecting it refuses to work because the token is no longer on the approved list. So the validator's earned commission is stuck and cannot be withdrawn.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More by swarun

View all

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

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.