Skip to content
Business logic Audit finding Intermediate

The requestcommisionclaim function can only claim commission on tokens that are currently reward tokens

The requestCommissionClaim function only allows validators to claim commission on tokens that are currently configured as reward tokens. If a token is removed from the reward token list, any unclaimed commission for that token becomes permanently inaccessible to the validator.

Plume Network

Originally disclosed on Immunefi

52944 sc high the requestcommisionclaim function can only claim commission on tokens that are currently reward tokens

Description

Brief / Intro

In the ValidatorFacet contract, the requestCommissionClaim function only allows validators to claim commission on tokens that are currently configured as reward tokens. If a token is removed from the reward token list, any unclaimed commission for that token becomes permanently inaccessible to the validator. This results in a direct loss of earned commission for validators whenever a reward token is removed.

Vulnerability Details

The requestCommissionClaim function includes a check that requires the token to be an active reward token before a commission claim can be made:

Solidity
function requestCommissionClaim(
    uint16 validatorId,
    address token
)
    external
    onlyValidatorAdmin(validatorId)
    nonReentrant
    _validateValidatorExists(validatorId)
    _validateIsToken(token) // <-- Only allows currently active reward tokens
{
    ...
}

The _validateIsToken(token) modifier enforces that the token must still be present in the isRewardToken mapping. If a token is removed from the reward token list, this check fails, and the validator cannot claim any accrued commission for that token. As a result, any commission earned but not yet claimed for removed tokens is lost, and there is no mechanism for recovery.

Impact Details

  • Validators lose access to their accrued commission for any token that is removed from the reward token list.
  • This can result in significant financial loss for validators, especially if tokens are removed unexpectedly or without warning.
  • There is no workaround for affected validators except for a contract upgrade or manual intervention.

Proof of Concept

{% stepper %} {% step %}

Deploy the protocol and add a validator

  • Deploy the staking protocol contracts.
  • Add a validator (Validator1) to the system. {% endstep %}

{% step %}

Add multiple tokens as reward tokens and accrue commission

  • Set TokenA and TokenB as reward tokens (isRewardToken[TokenA] = true, isRewardToken[TokenB] = true).
  • Users stake and generate rewards, causing Validator1 to accrue commission in both TokenA and TokenB. {% endstep %}

{% step %}

Remove TokenA from the reward token list

  • Call the function to remove TokenA as a reward token (isRewardToken[TokenA] = false).
  • TokenB remains an active reward token. {% endstep %}

{% step %}

Validator attempts to claim commission for both tokens

  • Validator1 calls requestCommissionClaim(validatorId, TokenA).
    • The call reverts due to the _validateIsToken(token) check, since TokenA is no longer a reward token.
    • The accrued commission for TokenA is now permanently inaccessible.
  • Validator1 calls requestCommissionClaim(validatorId, TokenB).
    • The call succeeds, and Validator1 receives the accrued commission for TokenB. {% endstep %}

{% step %}

Result

  • Validator1 can only claim commission for tokens that are still active reward tokens.
  • Any commission accrued in TokenA before its removal is lost and cannot be claimed, while commission for TokenB (still active) can be claimed as expected. {% endstep %} {% endstepper %}

References

The original report as published on Immunefi. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Plume Network is a staking protocol whose validator logic lives in a facet contract, ValidatorFacet.sol, in the plume/src/facets/ directory of the contracts repository. One of the responsibilities of that facet is letting a validator collect the commission it has earned: the function requestCommissionClaim(uint16 validatorId, address token) is the entry point a validator admin calls to claim accrued commission for a given token.

The report targets that function directly. The claim is that the function is too restrictive: it will only pay out commission for tokens that are currently configured as reward tokens, so commission accrued on a token that has since been removed from the reward token list can never be claimed. The stated impact category is permanent freezing of funds, rated High.

Setup

The scenario needs a deployed staking protocol with at least one validator registered in it, and at least two tokens configured as reward tokens. The validator accrues commission in those tokens as users stake and rewards are generated. The relevant state is the isRewardToken mapping held in PlumeStakingStorage.layout(), which the report references at plume/src/lib/PlumeStakingStorage.sol#L64. The vulnerable function is referenced at plume/src/facets/ValidatorFacet.sol#L500.

No specific tooling, versions or accounts beyond a validator admin are described.

Finding it

The researcher looked at the modifiers applied to requestCommissionClaim and noticed that one of them, _validateIsToken(token), gates the claim on the token still being an active reward token. The function signature and modifiers as shown in the report are:

Solidity
function requestCommissionClaim(
    uint16 validatorId,
    address token
)
    external
    onlyValidatorAdmin(validatorId)
    nonReentrant
    _validateValidatorExists(validatorId)
    _validateIsToken(token) // <-- Only allows currently active reward tokens
{
    ...
}

The other guards are unremarkable: onlyValidatorAdmin(validatorId) restricts the call to the validator's admin, nonReentrant prevents reentrancy, and _validateValidatorExists(validatorId) ensures the validator exists. The problem is the last one. _validateIsToken(token) enforces that the token is still present in the isRewardToken mapping. Commission, however, is earned over time while a token is a reward token, and the claim happens later. If the token is removed from the reward token list in between, the check fails and the validator cannot claim any accrued commission for that token. The report states there is no mechanism for recovery.

Exploitation

The proof of concept is a sequence of protocol states rather than a request/response exchange. It shows that the loss is a consequence of ordinary administrative actions, not of an attacker manipulating anything.

Step 1: Deploy the protocol and add a validator

Deploy the staking protocol contracts and add a validator, referred to as Validator1, to the system.

Step 2: Add multiple tokens as reward tokens and accrue commission

Set TokenA and TokenB as reward tokens:

Solidity
isRewardToken[TokenA] = true
isRewardToken[TokenB] = true

Users then stake and generate rewards, which causes Validator1 to accrue commission in both TokenA and TokenB.

Step 3: Remove TokenA from the reward token list

Call the function that removes TokenA as a reward token:

Solidity
isRewardToken[TokenA] = false

TokenB remains an active reward token.

Step 4: Validator attempts to claim commission for both tokens

Validator1 calls requestCommissionClaim(validatorId, TokenA). The call reverts because of the _validateIsToken(token) check, since TokenA is no longer a reward token. The accrued commission for TokenA is now permanently inaccessible.

Validator1 then calls requestCommissionClaim(validatorId, TokenB). That call succeeds, and Validator1 receives the accrued commission for TokenB.

Step 5: Result

Validator1 can only claim commission for tokens that are still active reward tokens. Any commission accrued in TokenA before its removal is lost and cannot be claimed, while commission for TokenB, which is still active, can be claimed as expected.

Root cause

The claim path validates the token against current configuration rather than against the commission the validator has actually accrued. _validateIsToken(token) consults the isRewardToken mapping, which reflects the present reward token set, not the history of tokens on which commission was earned. Once a token is removed from that set, the modifier rejects every claim for it, and the report states there is no alternative path to recover the balance.

The other modifiers do not help here: they correctly restrict who may call and ensure the validator exists, but none of them provides a way to claim commission for a token that is no longer a reward token.

Impact

Validators lose access to accrued commission for any token removed from the reward token list. The report notes this can be a significant financial loss, particularly if tokens are removed unexpectedly or without warning. The only remedies it names are a contract upgrade or manual intervention; there is no workaround available to the affected validator through the contract itself. The impact is classified as permanent freezing of funds.

The condition is specific: commission must have accrued on a token, and that token must subsequently be removed from the reward token list before the validator claims. Commission on tokens that remain reward tokens is unaffected.

Fix

The report does not describe a fix or a change that was made.

Variants to test

  1. Other claim and withdrawal functions gated on current configuration. Look for functions that pay out accrued balances but validate the asset against a current allowlist, registry or mapping. A positive result is a function where removing an asset from the registry makes an already accrued balance unclaimable.
  2. Reward token removal paths. Check whether the removal function itself checks for outstanding commission or forces a claim first. A positive result is a removal that succeeds while unclaimed commission exists for that token.
  3. Validator or pool deregistration. The same pattern can appear when a validator, pool or market is deactivated: any accrued but unclaimed balance tied to it may become unreachable. A positive result is a deactivation that leaves balances stranded.
  4. Paused or delisted assets in lending and staking contracts. Test whether repayments, withdrawals or claims for a paused or delisted asset revert on a status check rather than on the balance. A positive result is a revert that persists after the asset is restored to the list only through an upgrade or admin action.

Hunting notes

This kind of bug hides in access control and validation modifiers on payout functions. During review, list every function that moves value out of a contract and note which of its checks depend on mutable configuration rather than on the caller's recorded entitlement. Modifiers named like _validateIsToken, onlyActiveMarket, onlyListed or whenNotPaused on a claim or withdrawal path are the signal.

The second signal is the administrative side: find the functions that remove tokens, markets or validators from their registries and check whether they settle outstanding balances first. If removal is a single flag flip with no settlement, accrued value can be stranded.

The proof of concept walks the protocol through a sequence of operations and shows that one token's commission reverts while another's succeeds. That contrast, a working claim next to a reverting one under the same conditions, is what makes the freezing concrete rather than theoretical.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A staking protocol called Plume Network lets people lock up digital tokens and earn rewards. Validators are the operators who run part of that system, and they earn a cut of the rewards, called a commission. The protocol keeps a list of which tokens count as reward tokens. A validator can ask for its commission using a function called requestCommissionClaim.

The problem is that this function only pays out commission for tokens that are on the reward token list right now. If a token is taken off the list, any commission the validator earned in that token before it was removed can never be collected. The money is stuck. The report rates this High severity and calls the impact permanent freezing of funds.

To follow the rest of this article you only need a browser and some patience. No programming experience is assumed. Every technical word is explained where it first appears, and there is a glossary at the end.

Background concepts, from zero

Before the details, here are the ideas the report relies on.

  • Blockchain and smart contracts. A blockchain is a shared record book that many computers keep copies of, so nobody can quietly change the past. A smart contract is a small program stored on that blockchain. It runs automatically when someone calls it, and its rules cannot be edited after it is deployed, except through a deliberate upgrade.
  • Tokens. A token is a digital unit of value recorded on the blockchain. Think of it like a foreign currency: each token has its own name and its own balance.
  • Staking. Staking means locking tokens into a contract for a while. In return the protocol pays rewards, a bit like a savings account paying interest.
  • Validators. A validator is an operator that helps run the staking system. Validators earn a commission, which is a percentage of the rewards that flow through them. That commission builds up over time and is paid out when the validator asks for it.
  • Reward tokens. The protocol decides which tokens are allowed to be used for staking and rewards. It keeps this decision in a list, technically a mapping called isRewardToken. A mapping is like a table with two columns: a token address on the left and true or false on the right. If a token is in the list, its value is true.
  • Function. A function is a named action inside a smart contract. Calling it is like pressing a button: you supply some inputs and the contract does something.
  • Modifier. A modifier is a small guard attached to a function. Before the function body runs, each modifier checks a condition. If a check fails, the whole call is rejected. This rejection is called a revert: the transaction is undone and any tokens sent with it are returned.
  • Address. An address is the identifier of an account or a token on the blockchain, a long string of characters, similar to a bank account number.
  • Access control. Access control means deciding who is allowed to do what. Here, only the validator's admin, the person in charge of that validator, may claim its commission.
  • Reentrancy. Reentrancy is a classic bug where a contract calls out to another contract, which calls back into the first one before it has finished, letting the second call exploit a half-updated state. The nonReentrant guard blocks this.
  • Permanent freezing of funds. This is a category of impact meaning value is locked in a contract with no way for its owner to retrieve it. It is not theft; the money is simply unreachable.

The product and the feature

Plume Network is a staking protocol. Its validator logic lives in a file called ValidatorFacet.sol, inside the plume/src/facets/ folder of the contracts repository. A facet is a module of a larger contract system: one file that handles one area of behaviour. This facet handles validator actions, and one of those actions is collecting commission.

The entry point for that is the function requestCommissionClaim(uint16 validatorId, address token). A validator admin calls it, saying which validator and which token the commission is for. The report targets this function directly and argues it is too strict.

Finding it

The researcher read the function and looked at the guards attached to it. Here is the function as shown in the report:

Solidity
function requestCommissionClaim(
    uint16 validatorId,
    address token
)
    external
    onlyValidatorAdmin(validatorId)
    nonReentrant
    _validateValidatorExists(validatorId)
    _validateIsToken(token) // <-- Only allows currently active reward tokens
{
    ...
}

Line by line, in plain words:

  1. function requestCommissionClaim( starts the definition of the claim function.
  2. uint16 validatorId, is the first input: a number identifying the validator. uint16 means an unsigned whole number that fits in 16 bits, so it cannot be negative.
  3. address token is the second input: the address of the token whose commission is being claimed.
  4. ) closes the input list.
  5. external means the function can be called from outside the contract, by a user or another contract.
  6. onlyValidatorAdmin(validatorId) is a guard: only the admin of that validator may proceed.
  7. nonReentrant is a guard that stops the function being re-entered while it is still running, which blocks reentrancy attacks.
  8. _validateValidatorExists(validatorId) is a guard that the validator actually exists.
  9. _validateIsToken(token) is the guard at the heart of the report. The comment next to it says it only allows currently active reward tokens. It checks the isRewardToken mapping and reverts if the token is not currently listed.
  10. { ... } is the body of the function, omitted in the report.

The first three guards are ordinary and correct. The fourth is the problem. Commission is earned over time while a token is a reward token, but the claim happens later. If the token is removed from the list in between, the guard fails and the validator cannot collect anything for that token. The report states there is no mechanism for recovery.

Proof of concept

The proof of concept is not a single attack request. It is a walk through a sequence of normal administrative actions, showing that the loss happens without any attacker doing anything clever. Each step below explains why it is taken.

Step 1: Deploy the protocol and add a validator

Deploy the staking protocol contracts and add a validator, called Validator1, to the system. This sets up a realistic starting point: a working protocol with one operator earning commission.

Step 2: Add multiple tokens as reward tokens and accrue commission

Set TokenA and TokenB as reward tokens:

Solidity
isRewardToken[TokenA] = true
isRewardToken[TokenB] = true

Line by line:

  1. isRewardToken[TokenA] = true puts TokenA into the reward token table with the value true, meaning it is now an accepted reward token.
  2. isRewardToken[TokenB] = true does the same for TokenB.

Two tokens are used so that later one can be removed while the other stays, which makes the contrast visible. Users then stake and generate rewards, and Validator1 accrues commission in both TokenA and TokenB. The commission is now earned but not yet claimed.

Step 3: Remove TokenA from the reward token list

Call the function that removes TokenA as a reward token:

Solidity
isRewardToken[TokenA] = false

Line by line:

  1. isRewardToken[TokenA] = false flips TokenA's entry in the table to false, so it is no longer a reward token.

TokenB remains an active reward token. This step is an ordinary administrative action: the protocol decides to stop using TokenA for rewards. Nothing malicious happens.

Step 4: Validator attempts to claim commission for both tokens

Validator1 calls requestCommissionClaim(validatorId, TokenA). The call reverts because of the _validateIsToken(token) guard, since TokenA is no longer a reward token. The accrued commission for TokenA is now permanently inaccessible.

Validator1 then calls requestCommissionClaim(validatorId, TokenB). That call succeeds, and Validator1 receives the accrued commission for TokenB.

This step is the heart of the proof. The same validator, the same function, the same conditions, but one call fails and the other works. The only difference is whether the token is still on the list.

Step 5: Result

Validator1 can only claim commission for tokens that are still active reward tokens. Any commission accrued in TokenA before its removal is lost and cannot be claimed, while commission for TokenB, which is still active, can be claimed as expected.

Root cause

The claim path checks the token against the current configuration rather than against what the validator has actually earned. _validateIsToken(token) consults the isRewardToken mapping, which reflects the present reward token set, not the history of tokens on which commission was earned. Once a token is removed from that set, the guard rejects every claim for it, and the report states there is no alternative path to recover the balance.

The other guards do not help: they correctly restrict who may call and ensure the validator exists, but none of them provides a way to claim commission for a token that is no longer a reward token.

Impact

Validators lose access to accrued commission for any token removed from the reward token list. The report notes this can be a significant financial loss, particularly if tokens are removed unexpectedly or without warning. The only remedies it names are a contract upgrade or manual intervention; there is no workaround available to the affected validator through the contract itself. The impact is classified as permanent freezing of funds.

The condition is specific: commission must have accrued on a token, and that token must subsequently be removed from the reward token list before the validator claims. Commission on tokens that remain reward tokens is unaffected.

Fix

The report does not describe a fix or a change that was made.

Variants to test

These are related patterns worth checking in the same codebase or in similar protocols.

  1. Other claim and withdrawal functions gated on current configuration. Look for functions that pay out accrued balances but validate the asset against a current allowlist, registry or mapping. A positive result is a function where removing an asset from the registry makes an already accrued balance unclaimable.
  2. Reward token removal paths. Check whether the removal function itself checks for outstanding commission or forces a claim first. A positive result is a removal that succeeds while unclaimed commission exists for that token.
  3. Validator or pool deregistration. The same pattern can appear when a validator, pool or market is deactivated: any accrued but unclaimed balance tied to it may become unreachable. A positive result is a deactivation that leaves balances stranded.
  4. Paused or delisted assets in lending and staking contracts. Test whether repayments, withdrawals or claims for a paused or delisted asset revert on a status check rather than on the balance. A positive result is a revert that persists after the asset is restored to the list only through an upgrade or admin action.

Hunting notes

This kind of bug hides in access control and validation guards on payout functions. During review, list every function that moves value out of a contract and note which of its checks depend on mutable configuration rather than on the caller's recorded entitlement. Guards named like _validateIsToken, onlyActiveMarket, onlyListed or whenNotPaused on a claim or withdrawal path are the signal.

The second signal is the administrative side: find the functions that remove tokens, markets or validators from their registries and check whether they settle outstanding balances first. If removal is a single flag flip with no settlement, accrued value can be stranded.

The proof of concept walks the protocol through a sequence of operations and shows that one token's commission reverts while another's succeeds. That contrast, a working claim next to a reverting one under the same conditions, is what makes the freezing concrete rather than theoretical.

Glossary

  • Address: the identifier of an account or token on the blockchain, a long string of characters.
  • Blockchain: a shared record book kept by many computers, so past entries cannot be quietly changed.
  • Commission: the share of staking rewards that a validator earns for running part of the system.
  • Contract upgrade: a deliberate change to a deployed smart contract, usually through a special mechanism, since normal contracts cannot be edited.
  • Deploy: to publish a smart contract onto the blockchain so it can be used.
  • Facet: a module of a larger contract system, one file handling one area of behaviour.
  • Function: a named action inside a smart contract that runs when called.
  • Mapping: a two-column table inside a contract, pairing a key such as a token address with a value such as true or false.
  • Modifier: a guard attached to a function that checks a condition before the function body runs.
  • NonReentrant: a guard that prevents a function being re-entered while it is still running, blocking reentrancy attacks.
  • Permanent freezing of funds: an impact category where value is locked in a contract with no way for its owner to retrieve it.
  • Reentrancy: a bug where a contract calls out to another contract, which calls back in before the first has finished, exploiting a half-updated state.
  • Revert: a rejection of a transaction by the contract, undoing all its effects and returning any tokens sent with it.
  • Reward token: a token the protocol currently accepts for staking and rewards, recorded in the isRewardToken mapping.
  • Smart contract: a small program stored on a blockchain that runs automatically when called.
  • Staking: locking tokens in a contract for a period in return for rewards, similar to a savings account paying interest.
  • Token: a digital unit of value recorded on the blockchain, each with its own name and balance.
  • Validator: an operator that helps run the staking system and earns a commission on rewards.
  • Validator admin: the person authorised to act on behalf of a validator, for example to claim its commission.

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.