Reward rate checkpoints are used but are never set
The reward rate checkpoint accessor functions read from a mapping that is never populated for tokens, so the stored array length is always zero. As a result, the count function always returns zero and the checkpoint getter always reverts, meaning the contract fails to deliver the promised return information.
- Disclosed after under an hour
53059 sc low reward rate checkpoints are used but are never set
Submitted on Aug 14th 2025 at 18:30:04 UTC by @a16 for Attackathon | Plume Network
- Report ID: #53059
- Report Type: Smart Contract
- Report severity: Low
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/plume/src/facets/RewardsFacet.sol
- Impacts: Contract fails to deliver promised returns, but doesn't lose value
Description
Brief / Intro
Several functions use the rewardRateCheckpoints[] mapping, but checkpoints are never set for a specific token — only for a token/validator pair.
Vulnerability Details
Functions like getRewardRateCheckpoint() and getRewardRateCheckpointCount() use rewardRateCheckpoints[token], but rewardRateCheckpoints[token].length is always 0 as it is never set.
Example snippets from the codebase that demonstrate the issue:
if (index >= $.rewardRateCheckpoints[token].length) {
revert InvalidRewardRateCheckpoint(token, index);
}
Since rewardRateCheckpoints[token].length is always 0, this is effectively:
if (index >= 0) {
revert InvalidRewardRateCheckpoint(token, index);
}
So getRewardRateCheckpointCount() will always return 0, and getRewardRateCheckpoint() will always revert.
Impact Details
- Users calling these functions will either receive
0for checkpoint counts or encounter a revert when attempting to read a checkpoint. - This results in functions failing to deliver the promised returns information (or related behavior) but does not directly cause loss of funds or contract value.
Suggestions
rewardRateCheckpoints[] appears to be vestigial (unused) or misused. Consider one of the following:
- Remove
rewardRateCheckpointsand all references to it if it is truly unused. - Or, if intended, ensure checkpoints are populated for tokens (not only token/validator pairs) and update the accessors to reference the correct storage structure.
Proof of Concept
{% stepper %} {% step %}
Reproduce
- Call
getRewardRateCheckpoint()for a token and any index.
Result: the call reverts due to the check against an always-zero length. {% endstep %} {% endstepper %}
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 checkpoint mapping is keyed by token alone in the accessors, while checkpoints are only ever written for a token/validator pair, leaving the token-keyed array permanently empty.
Impact
Users calling these functions either get a zero count or a revert, so the contract fails to deliver the promised return information, but no funds or contract value are lost.
What the attacker needed
None
The fix
The mapping should either be removed along with all references if it is unused, or populated for tokens and the accessors updated to reference the correct storage structure.
How it was found
- Call getRewardRateCheckpoint() for a token and any index.
- Observe the call reverts because the length check is against an always-zero array.
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 past 'reward rate' values so people can look them up later. The code that reads this list looks in a place that is never filled in, so the list is always empty. Anyone asking for a past value gets an error instead of an answer, though no money is lost.
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.