Totalamountclaimable reverts instead of returning the claimable reward for historical tokens
The totalAmountClaimable view function checks the active reward-token mapping, so it reverts for tokens that were removed but remain claimable as historical reward tokens. As a result, nobody can read the total claimable amount across all users for those tokens.
Originally disclosed on Immunefi
- Disclosed after under an hour
51966 sc low totalamountclaimable reverts instead of returning the claimable reward for historical tokens
Submitted on Aug 6th 2025 at 21:32:59 UTC by @holydevoti0n for Attackathon | Plume Network
- Report ID: #51966
- Report Type: Smart Contract
- Report severity: Low
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/plume/src/facets/StakingFacet.sol
- Impacts:
- Contract fails to deliver promised returns, but doesn't lose value
Description
Brief/Intro
The totalAmountClaimable() function reverts when called for historical reward tokens, even if users still have claimable balances.
Vulnerability Details
The function StakingFacet.totalAmountClaimable checks for $.isRewardToken:
/**
* @notice Get the total amount of a specific token claimable across all users.
* @param token Address of the token to check.
* @return amount Total amount of the token claimable.
*/
function totalAmountClaimable(
address token
) external view returns (uint256 amount) {
PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();
// @audit - revert when token is historical reward token
@> require($.isRewardToken[token], "Token is not a reward token");
// Return the total claimable amount
return $.totalClaimableByToken[token];
}
But historical reward tokens were once reward tokens that accrued rewards; they may also have amounts to be claimable.
Impact Details
It is not possible to see the amount claimable of a specific token across all users when the token to be consulted is a historical reward token.
Recommended Change
Check against isHistoricalRewardToken instead of the current isRewardToken mapping to allow access to all tokens that have ever been valid rewards.
Proposed diff:
function totalAmountClaimable(
address token
) external view returns (uint256 amount) {
...
// Check if token is a reward token using the mapping
- require($.isRewardToken[token], "Token is not a reward token");
+ require($.isHistoricalRewardToken[token], "Token is not a reward token");
...
}
Proof of Concept
Context
- An active reward token accrues rewards over time. Several users can claim their rewards.
- Admin removes the reward token, but it remains active as a historical reward token, so users can claim it.
{% stepper %} {% step %}
Reproduce - step
User calls totalAmountClaimable passing the recently removed token as a parameter, expecting to see the total amount to be claimed by all users.
{% endstep %}
{% step %}
Reproduce - step
totalAmountClaimable reverts as it checks for isRewardToken instead of isHistoricalRewardToken.
{% endstep %}
{% endstepper %}
Result: The function works partially, but reverts when tokens are historical reward tokens.
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 function validates the token against the active reward-token mapping instead of the historical reward-token mapping, so removed-but-still-claimable tokens fail the check.
Impact
The total claimable amount for historical reward tokens cannot be read, though no funds are lost.
What the attacker needed
Token was removed as an active reward token
The fix
The check should use the historical reward-token mapping so any token that was ever a valid reward can be queried.
How it was found
- A user calls totalAmountClaimable with a token that was recently removed as a reward token.
- The function reverts because it checks isRewardToken rather than isHistoricalRewardToken.
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 which tokens count as rewards. When a token is removed from that list, users can still claim what they earned, but a read-only function that reports the total owed now refuses to answer because it only checks the current list. The fix is to check the list of tokens that were ever rewards, not just the current ones.
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.