Skip to content
Business logic Audit finding Intermediate

Users can claim rewards for inactive validator periods due to incorrect checkpoint accrual.

A logic flaw in reward checkpoint handling allows users to claim staking rewards for periods when their validator was inactive. When reward rates are updated during inactivity, non-zero checkpoints are created, and reactivation clears the inactivity cap, so claims include the inactive period.

farman1094 Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

51728 sc high users can claim rewards for inactive validator periods due to incorrect checkpoint accrual

Submitted on Aug 5th 2025 at 11:02:41 UTC by @farman1094 for Attackathon | Plume Network

Impacts:

  • Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield

Description

Brief / Intro

A logic flaw in the reward calculation mechanism allows users to claim staking rewards for periods when their validator was inactive due to improper handling of reward rate checkpoints.

Vulnerability Details

When a validator’s status is set to inactive, a checkpoint with a zero reward rate is correctly pushed to the checkpoint array to ensure no rewards are calculated during inactivity:

Solidity
// ValidatorFacet::setValidatorStatus
  // Record when the validator became inactive (reuse slashedAtTimestamp field)
                // This allows existing reward logic to cap rewards at this timestamp
                validator.slashedAtTimestamp = block.timestamp;

                // Create a zero-rate checkpoint for all reward tokens to signal inactivity start
                for (uint256 i = 0; i < rewardTokens.length; i++) {
                    PlumeRewardLogic.createRewardRateCheckpoint($, rewardTokens[i], validatorId, 0);
                }

However, subsequent calls to functions such as setRewardRates or setMaxRewardRate push new checkpoints for all validators by calling createRewardRateCheckpoint, regardless of whether a validator is inactive or slashed. This causes non-zero reward-rate checkpoints to be added for periods when the validator should not be accruing rewards:

Solidity
// RewardsFacet::setRewardRates
    uint16[] memory validatorIds = $.validatorIds;
        for (uint256 i = 0; i < tokens.length; i++) {
            address token_loop = tokens[i];
            uint256 rate_loop = rewardRates_[i];

            if (!$.isRewardToken[token_loop]) {
                revert TokenDoesNotExist(token_loop);
            }
            uint256 maxRate = $.maxRewardRates[token_loop] > 0 ? $.maxRewardRates[token_loop] : MAX_REWARD_RATE;
            if (rate_loop > maxRate) {
                revert RewardRateExceedsMax();
            }

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

                PlumeRewardLogic.createRewardRateCheckpoint($, token_loop, validatorId_for_crrc, rate_loop);
            }
            $.rewardRates[token_loop] = rate_loop;
        }

When the validator is reactivated, validator.slashedAtTimestamp is cleared (set to 0), removing the cap that should limit reward accrual to the inactivity end time. The reactivation call also pushes a checkpoint restoring the global reward rate:

Solidity
// ValidatorFacet::setValidatorStatus
         if (newActiveStatus && !currentStatus) {
                // Create a new checkpoint to restore the reward rate, signaling activity resumes
                for (uint256 i = 0; i < rewardTokens.length; i++) {
                    address token = rewardTokens[i];
                    $.validatorLastUpdateTimes[validatorId][token] = block.timestamp;
                    uint256 currentGlobalRate = $.rewardRates[token];
                    PlumeRewardLogic.createRewardRateCheckpoint($, token, validatorId, currentGlobalRate);
                }
                // Clear the timestamp since validator is active again (unless actually slashed)
                if (!validator.slashed) {
                    validator.slashedAtTimestamp = 0;
                }
            }

As a result, when a user claims rewards after the validator is reactivated, the ending time will be the current block.timestamp, and non-zero reward-rate checkpoints exist for the interval when the validator was supposed to be inactive. The reward calculation therefore includes these inactive periods, allowing overpayment.

Impact Details

{% hint style="warning" %} This vulnerability allows users to illegitimately claim rewards for durations when their validator was not performing work (inactive). Rewards are misallocated, enabling some users to claim rewards they shouldn’t, which reduces the pool available for others (or leads to overpayment of total rewards). {% endhint %}

Suggested Fix

{% hint style="info" %} Add a check in PlumeRewardLogic::createRewardRateCheckpoint (or in the callers before pushing checkpoints) to avoid creating non-zero reward-rate checkpoints for validators that have a non-zero validator.slashedAtTimestamp (i.e., validators that are inactive/slashed). This ensures zero-rate checkpoints remain effective for the inactive period and prevents accidental restoration of non-zero rates during inactivity. {% endhint %}

Proof of Concept

{% stepper %} {% step %}

Step

Assume a user has staked with a Validator. The Validator is initially active and earning rewards. {% endstep %}

{% step %}

Step

The protocol calls setValidatorStatus(validatorId, false) to set the Validator inactive. This sets validator.slashedAtTimestamp = block.timestamp and pushes a zero-rate checkpoint for all tokens. Rewards accrual should stop from this timestamp onward.

Solidity
// ValidatorFacet::setValidatorStatus
  // Record when the validator became inactive (reuse slashedAtTimestamp field)
                // This allows existing reward logic to cap rewards at this timestamp
                validator.slashedAtTimestamp = block.timestamp;

                // Create a zero-rate checkpoint for all reward tokens to signal inactivity start
                for (uint256 i = 0; i < rewardTokens.length; i++) {
                    PlumeRewardLogic.createRewardRateCheckpoint($, rewardTokens[i], validatorId, 0);
                }

{% endstep %}

{% step %}

Step

The protocol later calls setRewardRates(...) or setMaxRewardRate(...) (which iterate over all validators). These calls invoke PlumeRewardLogic.createRewardRateCheckpoint, pushing new non-zero reward-rate checkpoints for every validator, including the inactive one. {% endstep %}

{% step %}

Step

The validator’s checkpoint history now contains non-zero reward-rate checkpoints that overlap the period it was supposed to be inactive. {% endstep %}

{% step %}

Step

The protocol calls setValidatorStatus(validatorId, true) to reactivate the validator. This clears validator.slashedAtTimestamp and pushes another checkpoint restoring the current global reward rate.

Solidity
// ValidatorFacet::setValidatorStatus
         if (newActiveStatus && !currentStatus) {
                // Create a new checkpoint to restore the reward rate, signaling activity resumes
                for (uint256 i = 0; i < rewardTokens.length; i++) {
                    address token = rewardTokens[i];
                    $.validatorLastUpdateTimes[validatorId][token] = block.timestamp;
                    uint256 currentGlobalRate = $.rewardRates[token];
                    PlumeRewardLogic.createRewardRateCheckpoint($, token, validatorId, currentGlobalRate);
                }
                // Clear the timestamp since validator is active again (unless actually slashed)
                if (!validator.slashed) {
                    validator.slashedAtTimestamp = 0;
                }
            }

{% endstep %}

{% step %}

Step

A user who staked with that Validator calls RewardsFacet::claim. The reward calculation sums rewards across all distinct checkpoint periods from the last claim to the current time. Because non-zero checkpoints exist for the inactive period, the user receives rewards for that period. {% endstep %} {% endstepper %}

Result: The user receives rewards that should not have been payable for the inactive period, misallocating the rewards pool.


The original report as published on Immunefi, by farman1094. 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

Likely the reward checkpoint creation does not skip inactive validators, so non-zero rate checkpoints are added during inactivity and the reactivation clears the timestamp cap.

Impact

Users could illegitimately claim rewards for inactive periods, reducing the pool available for others or causing overpayment of total rewards.

What the attacker needed

User has staked with a validator; validator becomes inactive; reward rates are updated during inactivity; validator is reactivated

The fix

The fix should add a check to avoid creating non-zero reward-rate checkpoints for validators with a non-zero slashedAtTimestamp (inactive or slashed).

How it was found

  1. A user stakes with an active validator that is earning rewards.
  2. The protocol sets the validator inactive, which records the timestamp and pushes a zero-rate checkpoint.
  3. The protocol later updates reward rates, which pushes non-zero checkpoints for all validators including the inactive one.
  4. The validator's checkpoint history now has non-zero rates overlapping the inactive period.
  5. The protocol reactivates the validator, clearing the inactivity timestamp and pushing a checkpoint restoring the global rate.
  6. The user claims rewards and receives payment for the inactive period.

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.

Staking rewards are paid for the time your validator is active. This report shows that if a validator is paused and then the reward rate is changed, the system accidentally records that rewards were still being earned during the pause. When the validator is turned back on, users can claim extra rewards for the paused time.

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 farman1094

View all

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