Skip to content
Business logic Audit finding Intermediate

Bypass of maxvalidatorpercentage allows a validator to exceed the decentralisation cap

The staking contract checks a validator's share of total stake using the post-stake total, and only during staking, so an attacker can temporarily inflate the total with a dummy stake to another validator, pass the check, then unstake the dummy amount. This leaves the target validator's share above the configured maximum, breaking the decentralisation guarantee.

Rhaydden Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

51510 sc low bypass of maxvalidatorpercentage allows a validator to exceed the decentralisation cap

Submitted on Aug 3rd 2025 at 14:14:53 UTC by @Rhaydden for Attackathon | Plume Network

Description

Brief/Intro

StakingFacet::_validateValidatorPercentage is meant to stop any single validator from controlling more than maxValidatorPercentage of total stake. Because the check is calculated against the post-stake totalStaked and is only executed on staking, an attacker can momentarily inflate the denominator with a dummy stake to another validator, pass the check, then remove the dummy stake. The target validator’s share subsequently exceeds the cap without any further validation, breaking Plume's decentralisation guarantee.

Vulnerability Details

Relevant code:

Solidity
uint256 previousTotalStaked = $.totalStaked - stakeAmount;          // correct pre-stake total (unused)

if (previousTotalStaked > 0 && $.maxValidatorPercentage > 0) {
    uint256 newDelegatedAmount = $.validators[validatorId].delegatedAmount;  // already includes stake
    uint256 validatorPercentage = (newDelegatedAmount * 10_000) / $.totalStaked; // **post-stake** total
    if (validatorPercentage > $.maxValidatorPercentage) {
        revert ValidatorPercentageExceeded();
    }
}

validatorPercentage is computed using the post-stake $.totalStaked rather than the intended previousTotalStaked. Percentage enforcement runs only in staking / restaking paths. No check is done on unstake, withdraw, or slashing.

Because unstaking decreases $.totalStaked without rechecking percentages, an attacker can:

  • stake a large temporary amount to another validator (inflate denominator),
  • stake additional funds to the target validator (check passes),
  • immediately unstake the temporary amount (denominator shrinks), causing the target validator’s share to silently exceed maxValidatorPercentage.

Impact Details

Low — Contract fails to deliver promised decentralisation guarantees (a single validator can exceed the configured limit), but no direct loss of protocol value. Users delegating to that validator face higher correlated risk (slashing/downtime).

Fix

Two suggested fixes (either is acceptable):

  • Call _validateValidatorPercentage whenever $.totalStaked decreases (e.g., inside _updateUnstakeAmounts, _removeParkedAmounts, slash handlers, etc.) to ensure the invariant always holds.

OR

  • Make the check monotonic by using the pre-stake total:
Solidity
uint256 validatorPercentage =
    (newDelegatedAmount * 10_000) / previousTotalStaked;  // use pre-stake total

References

https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/facets/StakingFacet.sol#L156-L162

Proof of Concept

Assume maxValidatorPercentage = 3 000 bp (30 %).

{% stepper %} {% step %}

Initial state

  • Validator A has 30 PLUME delegated
  • totalStaked = 100 PLUME
  • Validator A share = 30 % {% endstep %}

{% step %}

Inflate denominator

  • Attacker stakes 100 PLUME to Validator B.
  • totalStaked = 200 PLUME
  • Validator A share = 15 % {% endstep %}

{% step %}

Stake to target validator

  • Attacker stakes 30 PLUME to Validator A.
  • The contract check uses post-stake total (230 PLUME) -> Validator A = 26.1 % (< 30 %), the stake passes. {% endstep %}

{% step %}

Remove temporary stake

  • Attacker immediately unstakes the 100 PLUME from Validator B.
  • totalStaked = 130 PLUME
  • Validator A now has 60 PLUME -> 46.2 % (> 30 %) {% endstep %}

{% step %}

Result

No validation is triggered by the unstake. The cap is permanently violated until protocol intervention. {% endstep %} {% endstepper %}

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

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

Likely the percentage check uses the post-stake total instead of the pre-stake total and is only enforced on staking, not on unstaking or slashing.

Impact

A single validator can exceed the configured maximum share, breaking the decentralisation guarantee, though no direct loss of protocol value occurs; users delegating to that validator face higher correlated risk.

What the attacker needed

Ability to stake and unstake tokens; a target validator near the cap

The fix

The check should either run whenever total stake decreases or use the pre-stake total so the invariant always holds.

How it was found

  1. Start with validator A holding 30% of total stake, at the 30% cap.
  2. Stake a large temporary amount to validator B to inflate the total stake.
  3. Stake to validator A; the check uses the inflated total and passes.
  4. Immediately unstake the temporary amount from validator B.
  5. Validator A's share now exceeds the cap and no validation runs on unstake.

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 tries to stop any one validator from holding too large a share of all staked tokens. The check compares the validator's stake to the total after the new stake is added, and it only runs when someone stakes. An attacker can add a large temporary stake to a different validator to make the total look bigger, stake to the target validator so the check passes, then remove the temporary stake. The target validator's share is now above the limit, and nothing rechecks it.

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.

More by Rhaydden

View all

36 more disclosed reports, best first.

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.