Validator percentage cap does not work properly
The validator percentage cap check only prevents new stakes from exceeding the limit and does not rebalance validators who already exceeded the cap before it was introduced. This allows a validator to keep an oversized share of the total stake, and if the cap is raised to 100%, a single validator could hold almost all stake.
Originally disclosed on Immunefi
- Disclosed after under an hour
50783 sc low validator percentage cap does not work properly
Submitted on Jul 28th 2025 at 14:39:50 UTC by @holydevoti0n for Attackathon | Plume Network
- Report ID: #50783
- Report Type: Smart Contract
- Report severity: Low
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/plume/src/facets/StakingFacet.sol
- Impacts: Contract fails to deliver promised returns, but doesn't lose value
Description
Brief / Intro
The maxValidatorPercentage enforcement is unfair because it doesn't rebalance existing validators who exceeded the cap before it was introduced. Additionally, if the cap is raised to 100%, a single validator can hold 99.9% of the stake, since the cap is calculated based on totalStaked.
Vulnerability Details
Validation of the validator percentage in StakingFacet.sol:_validateValidatorPercentage():
function _validateValidatorPercentage(
uint16 validatorId, uint256 stakeAmount
) internal view {
PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();
uint256 previousTotalStaked = $.totalStaked - stakeAmount;
// Check if exceeding validator percentage limit
if (previousTotalStaked > 0 && $.maxValidatorPercentage > 0) {
uint256 newDelegatedAmount = $.validators[validatorId].delegatedAmount;
@> uint256 validatorPercentage = (newDelegatedAmount * 10_000) / $.totalStaked;
@> if (validatorPercentage > $.maxValidatorPercentage) {
revert ValidatorPercentageExceeded();
}
}
}
- The check only prevents new stakes that would exceed the limit, but doesn't address existing validators who already exceed the percentage cap.
- Example scenario: System starts with
maxValidatorPercentage = 0, Validator A accumulates 70% of total stake, then admin setsmaxValidatorPercentage = 50%. Validator A remains at 70% while new validators can grow up to 50%, creating asymmetric percentages (70 + 50 = 120%).
Impact Details
- Validators that exceeded the cap before enforcement can keep their oversized stake, giving them an unfair long-term advantage.
- Validators below the cap can still grow up to the cap, resulting in an asymmetric total where multiple validators can exceed 100% combined when some were grandfathered above the cap.
Proof of Concept
{% stepper %} {% step %}
Initial state
- System starts with
maxValidatorPercentage = 0. - Validator A accumulates 70% of total stake. {% endstep %}
{% step %}
After admin changes cap
- Admin sets
maxValidatorPercentage = 50%. - Validator A remains at 70% (no rebalance).
- Validator B (at 10%) can grow to 50%.
- Resulting effective percentages can sum to more than 100% (e.g., 70% + 50% = 120%). {% endstep %} {% endstepper %}
References
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
Impact
Validators that exceeded the cap before enforcement keep an unfair long-term advantage, and multiple validators can collectively exceed 100% of the stake when some are grandfathered above the cap.
What the attacker needed
MaxValidatorPercentage initially set to 0; a validator accumulates stake above the future cap; admin later sets a lower cap
The fix
The contract should rebalance or prevent existing validators from exceeding the cap when the cap is changed, and should not allow a single validator to hold nearly all stake even if the cap is set to 100%.
How it was found
- System starts with maxValidatorPercentage set to 0.
- Validator A accumulates 70% of the total stake.
- Admin sets maxValidatorPercentage to 50%.
- Validator A remains at 70% because there is no rebalance.
- Validator B, currently at 10%, can grow up to 50%.
- The combined effective percentages can exceed 100% (e.g., 70% + 50% = 120%).
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 staking contract has a rule that no single validator should hold more than a set percentage of all staked tokens. The rule is only checked when someone adds new stake, so a validator that already held too much before the rule was turned on is never forced to reduce its share. This means the limit can be bypassed by simply staking before the limit is set.
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.