Skip to content
Business logic Audit finding Beginner

ClaimAll() only loops over active reward tokens and ignores historical tokens

The claimAll() function only iterates over currently active reward tokens, so it fails to claim rewards for tokens that were removed but remain in the historical list. Users can still claim those rewards individually, but claimAll() does not fulfil its purpose of claiming all rewards.

KlosMitSoss Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

51083 sc insight claimall only loops over active reward tokens and ignores historical tokens

Submitted on Jul 31st 2025 at 00:22:43 UTC by @KlosMitSoss for Attackathon | Plume Network

{% hint style="info" %} Brief / Intro

When RewardsFacet::claimAll() is called, it only loops over the currently active reward tokens and claims those rewards. This ignores historical reward tokens, so claimAll() does not actually claim all rewards. {% endhint %}

Vulnerability Details

  • When a token is added it is pushed onto both the rewardTokens array and the historicalRewardToken array (see code in the target repository).
  • When a token is later removed, it is only popped from the rewardTokens array (but not from historicalRewardToken).
  • As a result, rewards for historical reward tokens remain claimable, but claimAll() only iterates over the (active) rewardTokens array and therefore omits historical tokens.
  • Recommendation: loop over the historicalRewardTokens array (or otherwise include historical tokens in the iteration) so that claimAll() truly claims all rewards.

Impact Details

claimAll() does not claim all available rewards. Users can still claim rewards for historical tokens by calling claim() individually with a historical reward token. Given this behavior, this report is classified as an insight.

References

Code references are provided throughout the report (see target link above):

Proof of Concept

{% stepper %} {% step %}

Step

Add tokenA as a reward token. It will be pushed onto rewardTokens (and historicalRewardToken).

Reference (add):
https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/facets/RewardsFacet.sol#L153-L202 {% endstep %}

{% step %}

Step

Remove tokenA later. The implementation pops it from the rewardTokens array but does not remove it from historicalRewardToken.

Reference (remove):
https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/facets/RewardsFacet.sol#L210-L250 {% endstep %}

{% step %}

Step

Users who accumulated rewards for tokenA can still claim them via claim(tokenA). However, claimAll()—which iterates only over rewardTokens—will not claim those historical-token rewards. {% endstep %} {% endstepper %}

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

Impact

claimAll() does not claim all available rewards, but users can still claim historical-token rewards individually, so this is an insight rather than a direct loss of funds.

What the attacker needed

None

The fix

The claimAll() function should iterate over the historicalRewardTokens array (or otherwise include historical tokens) so that it truly claims all rewards.

How it was found

  1. Add tokenA as a reward token, which pushes it onto both the rewardTokens and historicalRewardToken arrays.
  2. Remove tokenA later, which pops it from the rewardTokens array but leaves it in historicalRewardToken.
  3. Users can still claim tokenA rewards via claim(tokenA), but claimAll() will not claim them because it only iterates over rewardTokens.

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 smart contract keeps a list of tokens that give rewards. When a token is removed from the active list, it is still kept in a history list because users may still have unclaimed rewards for it. The function that is supposed to claim all rewards only looks at the active list, so it misses the old tokens. This is a logic flaw, not a way to steal funds.

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 KlosMitSoss

View all

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