50312 sc insight validator can steal user rewards due to a lack of cooldown when validator increases commission

Submitted on Jul 23rd 2025 at 16:09:04 UTC by @holydevoti0n for Attackathon | Plume Network

  • Report ID: #50312

  • Report Type: Smart Contract

  • Report severity: Insight

  • Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/plume/src/facets/ValidatorFacet.sol

  • Impacts:

    • Theft of unclaimed yield

Description

Brief/Intro

When a validator increases their commission, the change takes effect immediately. This means that users who staked with the validator under the old commission rate are automatically subject to the new, higher rate. As a result, user rewards (for the next segment) are affected, since they are calculated as the gross rewards minus the validator's commission.

Vulnerability Details

The staking system works based on segments. When a validator increases their commission rate, for example to the maximum allowed ($.maxAllowedValidatorCommission), the code updates the commission immediately:

https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/facets/ValidatorFacet.sol#L317-L352

    function setValidatorCommission(
        uint16 validatorId,
        uint256 newCommission
    ) external onlyValidatorAdmin(validatorId) {
        // Check against the system-wide maximum allowed commission.
        if (newCommission > $.maxAllowedValidatorCommission) {
            revert CommissionExceedsMaxAllowed(newCommission, $.maxAllowedValidatorCommission);
        }

        ...

        // Now update the validator's commission rate to the new rate.
@>        validator.commission = newCommission;
@>        PlumeRewardLogic.createCommissionRateCheckpoint($, validatorId, newCommission);
        ...
    }

User rewards are computed per segment; the commission used is the effective commission rate at the start of that segment:

https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/lib/PlumeRewardLogic.sol#L339-L352

Because commission is applied using the commission rate effective at the start of each segment, but commission rate changes are effective immediately, a validator can increase their commission right after users stake and thereby take a larger share of future rewards for those users. The user only stops losing rewards when they unstake, but rewards accumulated while the increased commission is active are lost to the validator.

The root cause is the absence of a cooldown period that would let users decide whether to accept the new commission rate or unstake.

Example

1

User stakes with low-commission validator

User stakes with validator A who currently has a 1% commission.

2

Validator increases commission

Validator A has many users attracted by the 1% commission. Validator A increases commission to the maximum allowed (e.g., 50%).

3

New segments use higher commission immediately

For the next segment, all users who staked under 1% are now subject to 50% commission because the rate change is effective immediately.

4

Users' rewards are reduced

User rewards for that segment are reduced by the new commission rate. The longer users remain staked, the more the validator extracts.

5

Subtle attacks possible

A validator could temporarily increase commission at specific times then revert it, profiting from short intervals while avoiding detection.

Impact

Theft of unclaimed yield as validators can immediately increase the commission rate to the maximum allowed, claiming up to half (or more depending on limits) of the user's yield for subsequent segments.

Recommendation

Proof of Concept

Add the following test to PlumeStakingDiamond.t.sol:

Run:

Example output:

Was this helpful?