Skip to content
Business logic Audit finding Beginner

Bypass of minimum stake enforcement via partial unstake

The staking contract checks the minimum stake amount only when tokens are staked, not when they are partially withdrawn. A user can stake exactly the minimum and then unstake part of it, leaving an active stake below the required minimum.

light279 Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

50914 sc low bypass of minimum stake enforcement via partial unstake

Submitted on Jul 29th 2025 at 17:00:55 UTC by @light279 for Attackathon | Plume Network

Description

Brief/Intro

The Plume staking contract enforces a minimum stake amount $.minStakeAmount during the staking process to ensure that users contribute a meaningful amount of tokens. However, the same constraint is not enforced during partial unstakes. As a result, users can bypass the minimum stake requirement and remain staked with less than the required minimum.

Vulnerability Details

The StakingFacet::stake function correctly enforces a check ensuring that the amount being staked is not less than $.minStakeAmount:

JavaScript
function _validateStakeAmount(uint256 amount) internal view {
        PlumeStakingStorage.Layout storage $ = PlumeStakingStorage.layout();
        if (amount == 0) {
            revert InvalidAmount(0);
        }
@>        if (amount < $.minStakeAmount) {
            revert StakeAmountTooSmall(amount, $.minStakeAmount);
        }
    }

{% stepper %} {% step %}

How the bypass works

  • Stake exactly the minimum amount (passes validation).
  • Call StakingFacet::unstake(uint16 validatorId, uint256 amount) with a partial unstake less than the staked amount.
  • The remaining stake falls below the minimum threshold because the unstake flow does not re-validate the user's remaining stake against $.minStakeAmount. {% endstep %} {% endstepper %}

There is no constraint such as:

JavaScript
if (newStakeAmount != 0 && newStakeAmount < $.minStakeAmount) {
    revert RemainingStakeBelowMinimum();
}

Thus, users can keep an active stake that is less than what the protocol originally intended to allow.

Impact Details

This bug undermines the protocol's invariant that users should always have at least the minimum stake amount. Possible consequences include:

  • Inconsistent enforcement of staking rules across staking vs unstaking flows.
  • Degraded validator staking metrics, since total staked values and user counts may reflect sub-minimum stake participants.

References

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

Proof of Concept

{% stepper %} {% step %}

  1. Assume $.minStakeAmount = 1 ether.
  2. Alice calls stake(validatorId) with exactly 1 ether. This passes validation.
  3. Alice calls unstake(validatorId, 0.1 ether).
  4. Now, Alice has 0.9 ether staked (below the minStakeAmount).
  5. Alice remains in the system with an invalid partial stake that could:
    • Still earn rewards,
    • Be counted in validator's staker list,
    • Trigger edge cases elsewhere in the protocol. {% endstep %} {% endstepper %}

The original report as published on Immunefi, by light279. 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 partial unstake path never re-checks the remaining stake against the minimum stake amount, unlike the stake path.

Impact

The protocol's rule that every staker holds at least the minimum is broken, which could let sub-minimum stakes still earn rewards and skew validator staking metrics; the report does not show a direct loss of funds.

What the attacker needed

A staked position at the minimum amount

The fix

The unstake flow should reject a partial unstake that would leave a non-zero remaining stake below the minimum stake amount.

How it was found

  1. Stake exactly the minimum amount, which passes validation.
  2. Call the unstake function with an amount smaller than the full stake.
  3. The remaining stake is now below the minimum and stays active.

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 lets people lock tokens and earn rewards, and it sets a smallest allowed amount so each staker counts for something. The contract checks that amount when someone stakes, but not when they take part of it back, so a person can end up staked with less than the smallest allowed amount.

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 light279

View all

8 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.