Commission claims fail for removed reward tokens
Validators cannot request commission claims for a reward token after it has been removed from the contract, because the claim function checks that the token is still an active reward token. This leaves accrued commissions for removed tokens permanently inaccessible to validators.
- Disclosed after under an hour
51946 sc high commission claims fail for removed reward tokens
Submitted on Aug 6th 2025 at 19:23:49 UTC by @aksoy for Attackathon | Plume Network
- Report ID: #51946
- Report Type: Smart Contract
- Report severity: High
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/plume/src/facets/ValidatorFacet.sol
- Impacts:
- Temporary freezing of funds for at least 24 hours
Description
Brief/Intro
Validators are unable to request their accrued commissions if a reward token is removed from the contract. Although stakers can still claim their pending rewards for removed tokens, validators are blocked by a missing logic path, leading to unrecoverable commissions.
Vulnerability Details
The requestCommissionClaim function enforces a _validateIsToken modifier that reverts if the provided token is not marked as an active reward token in isRewardToken. Once a token is removed via removeRewardToken, its isRewardToken[token] mapping is set to false, causing any future commission claims to revert with TokenDoesNotExist(token). Validators cannot request commission claims because of the strict token validation enforced.
modifier _validateIsToken(
address token
) {
if (!PlumeStakingStorage.layout().isRewardToken[token]) {
revert TokenDoesNotExist(token);
}
_;
}
function requestCommissionClaim(
uint16 validatorId,
address token
)
external
onlyValidatorAdmin(validatorId)
nonReentrant
_validateValidatorExists(validatorId)
_validateIsToken(token)
{
...
}
Impact Details
Validators may permanently lose access to their accrued commissions for any token that gets removed.
While stakers can still claim removed tokens’ rewards due to historical checkpointing, validators lack such an alternative path.
References
Proof of Concept
Add test to file :: plume/test/PlumeStakingDiamond.t.sol
function testRemovedTokenRequestCommmission() public {
uint16 validatorId = DEFAULT_VALIDATOR_ID;
address token = address(pUSD);
// address recipient = validatorAdmin; // Not used by name
// Set up commission
vm.startPrank(validatorAdmin);
ValidatorFacet(address(diamondProxy)).setValidatorCommission(
validatorId,
10e16
); // 10%
vm.stopPrank();
// Set reward rate and fund treasury
vm.startPrank(admin);
address[] memory tokensToSet = new address[](1); // Renamed
tokensToSet[0] = token;
uint256[] memory ratesToSet = new uint256[](1); // Renamed
ratesToSet[0] = 1e18; // 1 PUSD per second
RewardsFacet(address(diamondProxy)).setRewardRates(
tokensToSet,
ratesToSet
);
// pUSD.transfer(address(treasury), 2000 ether); // Ensure enough funds
pUSD.transfer(address(treasury), 10e24); // Increased funding
vm.stopPrank();
// Stake to accrue commission
vm.startPrank(user1);
StakingFacet(address(diamondProxy)).stake{value: 10 ether}(validatorId);
vm.stopPrank();
// Advance time to accrue commission
vm.warp(block.timestamp + 1 days);
vm.startPrank(admin);
RewardsFacet(address(diamondProxy)).removeRewardToken(token);
vm.stopPrank();
// Request commission claim
vm.startPrank(validatorAdmin);
uint256 tsBeforeRequest = block.timestamp; // Capture timestamp BEFORE request
vm.expectRevert(
abi.encodeWithSelector(TokenDoesNotExist.selector, token)
);
ValidatorFacet(address(diamondProxy)).requestCommissionClaim(
validatorId,
token
);
}
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 commission claim function requires the token to still be an active reward token, so removing a token blocks all future commission claims for it.
Impact
Validators may permanently lose access to their accrued commissions for any token that gets removed.
What the attacker needed
Validator has accrued commission; reward token is removed
How it was found
- Set up a validator with a commission rate and fund the treasury with the reward token.
- Stake tokens to accrue commission over time.
- Remove the reward token from the contract.
- Attempt to request a commission claim for the removed token, which reverts with TokenDoesNotExist.
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.
In a staking system, validators earn a commission in various tokens. If the system later removes one of those tokens from its list of supported rewards, the validator's earned commission for that token becomes stuck because the claim function refuses to process tokens that are no longer on the list. Stakers can still claim their rewards for removed tokens, but validators cannot.
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.