A commission rate checkpoint is not created when adding a validator, despite the commission rate being set leading to loss of validator commission.
When a validator is added with a nonzero commission rate, no commission rate checkpoint is created, so the validator's commission history is empty and the rate is treated as zero. The validator therefore accrues no commission on rewards distributed before the first explicit commission change, and those funds are permanently lost.
Plume Network
Originally disclosed on Immunefi
52955 sc high a commission rate checkpoint is not created when adding a validator despite the commission rate being set leading to loss of validator commission
- Submitted on: Aug 14th 2025 at 13:32:59 UTC by @frolic for Attackathon | Plume Network
- Report ID: #52955
- Report Type: Smart Contract
- Severity: High
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/plume/src/facets/ValidatorFacet.sol
- Impact summary: Permanent freezing/loss of validator commission
Brief / Intro
When adding a new validator via the addValidator function in ValidatorFacet, reward rate checkpoints are created for each reward token but no commission rate checkpoint is created even when a nonzero commission is set on the validator. This causes the validator's commission history to be empty from inception, resulting in zero commission being applied until the first explicit commission change — leading to lost commission funds.
Vulnerability Details
In addValidator, reward rate checkpoints are initialized for each reward token using the current global rate:
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);
}
However, there is no corresponding call to createCommissionRateCheckpoint to record the validator's starting commission. The validator struct does set the commission value:
validator.validatorId = validatorId;
@> validator.commission = commission; // <--- validator commission
validator.delegatedAmount = 0;
Because no commission checkpoint is created at initialization, the checkpoint array for the validator is empty. Commission calculations use checkpointed history; an empty checkpoint history effectively results in a zero commission rate for the initial period. Thus the validator accrues no commission until a later explicit commission update creates a checkpoint.
Additionally, setValidatorCommission has an early return when the new commission equals the old commission, preventing creation of a checkpoint if one does not already exist but the desired starting commission equals the stored value:
function setValidatorCommission(
uint16 validatorId,
uint256 newCommission
) external onlyValidatorAdmin(validatorId) {
PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();
PlumeStakingStorage.ValidatorInfo storage validator = $.validators[validatorId];
//...................
// If the commission rate is the same, there's nothing to do.
if (oldCommission == newCommission) {
return;
}
This means a validator whose commission was set at creation cannot force the creation of the missing checkpoint by calling setValidatorCommission if they attempt to set the same value — the function will return early and leave the checkpoint array empty.
Impact Details
- No commission checkpoint at validator initialization causes the validator's commission rate to be treated as zero for the initial period.
- Validator accrues no commission on rewards distributed before the first commission change that creates a checkpoint.
- Commission that should have been accrued during this period is permanently lost.
- Protocol commission accounting is incorrect from inception for affected validators until corrected.
Proof of Concept
{% stepper %} {% step %}
Step: Deploy and add validator
- Deploy the protocol and call
addValidatorwith a nonzero commission rate (e.g., 10%). - Observation: reward rate checkpoints are created, but no commission rate checkpoint is created for the validator. {% endstep %}
{% step %}
Step: Users stake and earn rewards
- Multiple users stake tokens delegated to the new validator.
- Rewards are distributed over several blocks; stakers accrue rewards as expected. {% endstep %}
{% step %}
Step: Validator attempts to claim commission
- The validator calls
requestCommissionClaimfor a reward token. - The contract settles commission, but because no commission checkpoint exists for the initial period, the commission rate defaults to zero.
- Result: validator's accrued commission is zero despite user rewards. {% endstep %}
{% step %}
Step: Claim reverts
- The call to
requestCommissionClaimreverts withInvalidAmount(0)because the validator has no accrued commission to claim. - Outcome: validator receives no commission for the entire period before the first explicit commission rate change — commission funds effectively lost. {% endstep %} {% endstepper %}
References
- ValidatorFacet.sol - addValidator function: https://github.com/plumenetwork/contracts/blob/fe67a98fa4344520c5ff2ac9293f5d9601963983/plume/src/facets/ValidatorFacet.sol#L147
- PlumeRewardLogic.sol - createCommissionRateCheckpoint: https://github.com/plumenetwork/contracts/blob/fe67a98fa4344520c5ff2ac9293f5d9601963983/plume/src/lib/PlumeRewardLogic.sol#L757
Context
Plume Network is a staking protocol whose validator logic lives in a set of facets, one of which is ValidatorFacet. The facet exposes addValidator, the entry point used to register a new validator, and setValidatorCommission, used by a validator admin to change the commission rate. Commission is not stored as a single live number that is read at claim time: the protocol keeps a history of commission rate checkpoints, and commission calculations are performed against that checkpointed history. The same checkpoint pattern is used for reward rates, which are recorded per reward token when a validator is created.
The report targets ValidatorFacet.sol in the Attackathon Plume Network repository, and its impact summary is permanent freezing or loss of validator commission.
Setup
The report does not describe any accounts, tooling, versions or environment beyond the contract under review. The proof of concept is a sequence of protocol interactions rather than a scripted exploit: deploy the protocol, add a validator, have users stake, distribute rewards, then have the validator claim commission. The precondition that matters is that the validator is created with a nonzero commission rate, for example 10%.
Finding it
The researcher compared the two things addValidator does at creation time. For every reward token it records a starting point in the reward rate history, but it never records a starting point in the commission rate history, even though the commission value itself is written into the validator struct. Since commission is computed from checkpoints, a validator whose checkpoint array is empty has no commission history to read from, and the effective rate for the initial period is zero.
The second observation was about the obvious workaround. A validator admin might expect to call setValidatorCommission with the same value that was set at creation in order to force a checkpoint into existence. The function returns early when the new commission equals the old one, so that call does nothing and the checkpoint array stays empty.
Exploitation
Step 1: Deploy and add validator
Deploy the protocol and call addValidator with a nonzero commission rate (for example 10%). Reward rate checkpoints are created, but no commission rate checkpoint is created for the validator.
In addValidator, the reward side is initialised per token using the current global rate:
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);
}
There is no corresponding call to createCommissionRateCheckpoint. The commission value is nevertheless stored on the validator:
validator.validatorId = validatorId;
@> validator.commission = commission; // <--- validator commission
validator.delegatedAmount = 0;
So the struct says the validator earns commission, while the history that commission calculations actually consult is empty.
Step 2: Users stake and earn rewards
Multiple users stake tokens delegated to the new validator. Rewards are distributed over several blocks, and stakers accrue rewards as expected. During this window the validator is accruing nothing, because the commission rate resolved from an empty checkpoint history is zero.
Step 3: Validator attempts to claim commission
The validator calls requestCommissionClaim for a reward token. The contract settles commission, but because no commission checkpoint exists for the initial period, the commission rate defaults to zero. The validator's accrued commission is zero despite the user rewards that were distributed.
Step 4: Claim reverts
The call to requestCommissionClaim reverts with InvalidAmount(0), because the validator has no accrued commission to claim. The validator receives no commission for the entire period before the first explicit commission rate change, and those funds are effectively lost.
The early return in setValidatorCommission closes the simple recovery path:
function setValidatorCommission(
uint16 validatorId,
uint256 newCommission
) external onlyValidatorAdmin(validatorId) {
PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();
PlumeStakingStorage.ValidatorInfo storage validator = $.validators[validatorId];
//...................
// If the commission rate is the same, there's nothing to do.
if (oldCommission == newCommission) {
return;
}
A validator whose commission was set at creation cannot force the missing checkpoint into existence by re-submitting the same value: the function returns before any checkpoint is written, and the array remains empty.
Root cause
addValidator initialises the reward rate history but omits the commission rate history. Commission calculations read from checkpoints, so an empty checkpoint array resolves to a zero rate for the initial period rather than to the commission stored in the validator struct. The stored validator.commission value and the checkpointed history are two separate sources of truth, and only one of them is populated at creation.
The design of setValidatorCommission makes this worse rather than containing it. The equality check is a sensible no-op optimisation in normal operation, but it assumes a checkpoint already exists for the current value. For a validator created without one, the guard prevents the only straightforward way an admin could repair the state. The report does not describe any other validation or migration path that would create the missing checkpoint.
Impact
For any validator added with a nonzero commission, the commission rate is treated as zero until the first explicit commission change that actually creates a checkpoint. Commission on rewards distributed before that change is never accrued and is permanently lost, and the protocol's commission accounting is incorrect from inception for the affected validator until it is corrected. The loss covers the rewards distributed before the first commission change that creates a checkpoint, and it requires the validator to have been created with a nonzero commission; the report does not quantify amounts.
Fix
Variants to test
- Other initialisation paths that write a value into a struct but rely on a separate history for calculations. A positive result is a getter or calculation that returns zero or a default while the struct field holds a nonzero value.
- Any setter with an equality short-circuit, such as
if (old == new) return;. A positive result is a state that cannot be repaired by re-submitting the current value because the write is skipped. - Reward and commission style checkpoint pairs elsewhere in the same codebase. A positive result is one side of the pair being initialised at creation and the other not.
- Claim functions that revert on a zero amount. A positive result is a revert such as
InvalidAmount(0)on a legitimate claim, which shows the accrual never happened rather than that the claim logic is broken.
Hunting notes
This class of bug hides in initialisation code, where several parallel pieces of state must be set up and one is easy to forget. The signal during review is asymmetry: a loop that creates checkpoints for reward tokens with no matching call for commission, or more generally a struct field that is written at creation while its history is not. Grep for create...Checkpoint calls and check that every value that is later read from history has an entry written at creation.
The second signal is guard clauses in setters. Any early return based on equality should be checked against the possibility that the stored value exists but the derived state does not.
The researcher demonstrated impact by walking the full lifecycle rather than pointing at the missing call: create the validator with a nonzero commission, let users stake and rewards accrue, then show that the claim reverts with InvalidAmount(0). That turns a code observation into a concrete, permanent loss of commission for the validator.
What happened, in plain words
Plume Network is a staking protocol. People lock up tokens there, and the protocol hands out rewards for doing so. Validators are the operators who run this staking service, and they take a cut of the rewards, called a commission. Think of a shop assistant who keeps a small percentage of every sale: the commission is their pay.
This report is about a bug in the code that registers a new validator. When a validator is added, the protocol is supposed to write down the commission rate in a permanent record, a kind of ledger of "what the rate was and from when". The code writes the rate into one place but forgets to write it into the ledger that the payout maths actually reads. The result is that the protocol behaves as if the commission were zero, so the validator earns nothing until someone later changes the rate. The money that should have been paid during that time is gone for good.
A second problem makes it worse. The obvious way to repair the situation, calling the function that changes the commission with the same value as before, does nothing at all, because the function stops early when the new value equals the old one. So the validator cannot easily force the missing ledger entry into existence.
Below I walk through the code, what each part does, and the four steps that show the loss happening.
Background you need first
A few ideas come up again and again, so here they are from scratch.
- Smart contract: a program that lives on a blockchain. It runs automatically and nobody can quietly change its behaviour after it is deployed. Plume's staking rules are smart contracts.
- Facet: a smart contract split into pieces, where each piece handles one area of functionality.
ValidatorFacetis the piece that deals with validators: adding them, changing their settings, and paying their commission. - Function: a named block of code you can call, like a button on a machine.
addValidatoris the button for registering a validator;setValidatorCommissionis the button for changing its commission rate;requestCommissionClaimis the button for asking to be paid the commission owed. - Struct: a bundle of related values stored together, like a paper form with several fields. The validator's form holds its ID, its commission rate and how much is delegated to it.
- Checkpoint: a dated entry in a history book. Instead of storing one current number, the protocol stores a list of "from this moment, the value was X". To find the value at any past moment, you look up the most recent entry before it. This matters because rewards and commissions are calculated over time, and the rate can change partway through.
- Reward token: the token in which staking rewards are paid. A validator can have several.
- Revert: when a smart contract refuses to complete an action and undoes everything, like a cashier refusing a payment and handing your card back. A revert usually carries a short reason, here
InvalidAmount(0). - Proof of concept (PoC): a set of steps that demonstrates a bug really happens, rather than just arguing that it might.
The setup
The report does not describe any particular accounts, tools, software versions or test environment. The proof of concept is not a script or an attack tool: it is a sequence of ordinary interactions with the protocol. Deploy the protocol, add a validator, let users stake, distribute rewards, then have the validator try to claim its commission.
The one condition that has to hold is that the validator is created with a commission rate above zero, for example 10%.
Finding it
The researcher compared the two things that happen when a validator is created. For every reward token, the code records a starting point in the reward rate history. For the commission rate, it records nothing, even though the commission value itself is saved on the validator's form. Since commission is worked out from the history book, a validator with an empty history book has nothing to read, and the rate used for the first period comes out as zero.
The second observation was about the obvious workaround. A validator admin might think: I will just call setValidatorCommission with the same value I set at creation, and that will force an entry into the history. But the function stops early when the new commission equals the old one, so the call does nothing and the history stays empty.
Exploitation
Step 1: Deploy and add validator
Deploy the protocol and call addValidator with a commission rate above zero, for example 10%. Reward rate checkpoints get created, but no commission rate checkpoint is created for the validator.
Inside addValidator, the reward side is set up token by token, using the current global rate:
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);
}
Line by line:
for (uint256 i = 0; i < rewardTokens.length; i++) {starts a loop that runs once for each reward token.iis a counter starting at zero; the loop keeps going whileiis smaller than the number of tokens, adding one each time. It is like going through a list of items one by one.address token = rewardTokens[i];picks the token at positionifrom the list and gives it the short nametoken. Anaddressis a blockchain identifier, roughly like an account number.$.validatorLastUpdateTimes[validatorId][token] = block.timestamp;records the current time (block.timestamp, the time of the current block) as the last update time for this validator and this token. It is a "last checked" stamp.uint256 currentGlobalRate = $.rewardRates[token];reads the protocol-wide reward rate for this token into a variable.uint256means a whole number that cannot be negative.PlumeRewardLogic.createRewardRateCheckpoint($, token, validatorId, currentGlobalRate);writes a dated entry into the reward rate history: from now on, this validator's reward rate for this token is the current global rate. This is the history book entry for rewards.}closes the loop.
So every reward token gets a starting entry. There is no matching call to createCommissionRateCheckpoint anywhere in this function. The commission value is nevertheless saved on the validator's form:
validator.validatorId = validatorId;
@> validator.commission = commission; // <--- validator commission
validator.delegatedAmount = 0;
Line by line:
validator.validatorId = validatorId;stores the validator's ID on its form.@> validator.commission = commission; // <--- validator commissionstores the commission rate on the form. The@>marker and the comment are the researcher's way of pointing at the important line.validator.delegatedAmount = 0;sets the amount delegated to this validator to zero, because it is brand new and nobody has staked with it yet.
So the form says the validator earns commission, while the history book that the payout maths actually reads is empty. Two places hold the same idea, and only one of them was filled in.
Step 2: Users stake and earn rewards
Several users stake tokens with the new validator. Rewards are distributed over several blocks, and the stakers build up rewards as expected. During this window the validator builds up nothing, because the commission rate read from an empty history book is zero.
Step 3: Validator attempts to claim commission
The validator calls requestCommissionClaim for a reward token. The contract works out the commission, but because there is no commission checkpoint for the first period, the rate falls back to zero. The validator's earned commission is zero, even though user rewards were paid out.
Step 4: Claim reverts
The call to requestCommissionClaim reverts with InvalidAmount(0), because the validator has nothing to claim. The validator gets no commission for the whole period before the first real commission change, and that money is effectively lost.
The early return in setValidatorCommission closes the simple way to recover:
function setValidatorCommission(
uint16 validatorId,
uint256 newCommission
) external onlyValidatorAdmin(validatorId) {
PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();
PlumeStakingStorage.ValidatorInfo storage validator = $.validators[validatorId];
//...................
// If the commission rate is the same, there's nothing to do.
if (oldCommission == newCommission) {
return;
}
Line by line:
function setValidatorCommission(begins the definition of the function that changes a validator's commission rate.uint16 validatorId,is the first input: the validator's ID, a small whole number (uint16).uint256 newCommissionis the second input: the new commission rate.) external onlyValidatorAdmin(validatorId) {means the function can be called from outside, but only by the admin of that validator. TheonlyValidatorAdmincheck is like a door that only opens for the right key.PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();fetches the protocol's main storage area and gives it the short name$.storagemeans it points at the real saved data, not a copy.PlumeStakingStorage.ValidatorInfo storage validator = $.validators[validatorId];fetches this validator's form from storage and names itvalidator.//...................is a comment standing in for code the report leaves out.// If the commission rate is the same, there's nothing to do.is a comment explaining the check that follows.if (oldCommission == newCommission) {compares the current rate with the requested one.return;stops the function immediately if they are equal, without writing anything.}closes the check.
A validator whose commission was set at creation cannot force the missing history entry into existence by sending the same value again: the function returns before any checkpoint is written, and the history stays empty.
Root cause
addValidator sets up the reward rate history but leaves out the commission rate history. Commission maths reads from checkpoints, so an empty history resolves to a zero rate for the first period, rather than to the commission saved on the validator's form. The saved validator.commission value and the checkpointed history are two separate sources of truth, and only one of them is filled in at creation.
The design of setValidatorCommission makes this worse instead of containing it. The equality check is a sensible shortcut in normal operation, but it assumes a checkpoint already exists for the current value. For a validator created without one, the guard blocks the only straightforward way an admin could repair the state. The report does not describe any other validation or migration path that would create the missing checkpoint.
Impact
For any validator added with a commission above zero, the commission rate is treated as zero until the first real commission change that actually creates a checkpoint. Commission on rewards distributed before that change is never earned and is permanently lost, and the protocol's commission accounting is wrong from the start for the affected validator until it is corrected. The loss covers the rewards distributed before the first commission change that creates a checkpoint, and it requires the validator to have been created with a commission above zero.
Fix
Variants to test
- Other setup paths that write a value onto a form but rely on a separate history for calculations. A positive result is a getter or calculation that returns zero or a default while the form field holds a nonzero value.
- Any setter with an equality shortcut, such as
if (old == new) return;. A positive result is a state that cannot be repaired by re-sending the current value, because the write is skipped. - Reward and commission style checkpoint pairs elsewhere in the same codebase. A positive result is one side of the pair being set up at creation and the other not.
- Claim functions that revert on a zero amount. A positive result is a revert such as
InvalidAmount(0)on a legitimate claim, which shows the earning never happened rather than that the claim logic is broken.
Hunting notes
This kind of bug hides in setup code, where several parallel pieces of state must be prepared and one is easy to forget. The signal during review is asymmetry: a loop that creates checkpoints for reward tokens with no matching call for commission, or more generally a form field that is written at creation while its history is not. Search for create...Checkpoint calls and check that every value later read from history has an entry written at creation.
The second signal is guard clauses in setters. Any early return based on equality should be checked against the possibility that the stored value exists but the derived state does not.
The researcher showed impact by walking the full lifecycle rather than pointing at the missing call: create the validator with a commission above zero, let users stake and rewards build up, then show that the claim reverts with InvalidAmount(0). That turns a code observation into a concrete, permanent loss of commission for the validator.
Glossary
- Smart contract: a program on a blockchain that runs automatically and cannot be quietly changed after deployment.
- Blockchain: a shared, tamper-resistant record of transactions maintained by many computers.
- Facet: one piece of a smart contract that has been split into modules, each handling a specific area of functionality.
- Function: a named block of code that can be called to perform an action.
- Struct: a bundle of related values stored together, like the fields on a form.
- Checkpoint: a dated entry in a history of values, used to work out what a value was at a given moment.
- Commission: the share of staking rewards that a validator keeps for running the service.
- Validator: an operator who runs staking infrastructure and earns commission.
- Staking: locking up tokens with a validator to earn rewards.
- Delegation: assigning your staked tokens to a validator so it can use them.
- Revert: when a smart contract refuses an action and undoes it, usually with a short reason.
InvalidAmount(0): the revert reason in this report, meaning the amount involved was zero.- Storage: the part of a smart contract where data is permanently saved.
uint16/uint256: whole-number types in Solidity;uint16is small,uint256is large, and neither can be negative.address: a blockchain identifier, roughly like an account number.block.timestamp: the time attached to the current block, used as "now" by contracts.- Global rate: the protocol-wide reward rate for a token, before any per-validator adjustment.
- Getter: a function that reads and returns a value.
- Setter: a function that changes a stored value.
- Guard clause / early return: a check at the start of a function that stops it before the main work is done.
- Proof of concept (PoC): a set of steps that demonstrates a bug really happens.
- Severity: the rating given to a bug, here High, reflecting how serious its impact is.