> For the complete documentation index, see [llms.txt](https://reports.immunefi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://reports.immunefi.com/plume-or-attackathon/53059-sc-low-reward-rate-checkpoints-are-used-but-are-never-set.md).

# 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**](https://immunefi.com/audit-competition/plume-network-attackathon)

* **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:

```solidity
if (index >= $.rewardRateCheckpoints[token].length) {
    revert InvalidRewardRateCheckpoint(token, index);
}
```

Since `rewardRateCheckpoints[token].length` is always `0`, this is effectively:

```solidity
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 `0` for 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 `rewardRateCheckpoints` and 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

1. Call `getRewardRateCheckpoint()` for a token and any index.

Result: the call reverts due to the check against an always-zero length.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://reports.immunefi.com/plume-or-attackathon/53059-sc-low-reward-rate-checkpoints-are-used-but-are-never-set.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
