User can bypass minStakeAmount checking.
The staking contract enforces a minimum stake amount when staking but does not check the remaining balance after a partial unstake. A user can unstake most of their stake and leave a balance below the minimum, breaking the protocol's invariant.
Originally disclosed on Immunefi
- Disclosed after under an hour
50225 sc low user can bypass minstakeamount checking
Submitted on Jul 22nd 2025 at 18:24:34 UTC by @New5paceXyz for Attackathon | Plume Network
- Report ID: #50225
- 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
User can unstake partially which allows the user to end up with a remaining staked balance that is less than minStakeAmount because the code does not check that the remaining staked amount stays >= minStakeAmount.
Vulnerability Details
- On staking, the protocol validates the stake amount against
minStakeAmountvia:- User ->
stake->_performStakeSetup->_validateStaking->_validateStakeAmount - Reference: https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/facets/StakingFacet.sol#L112-L114
- User ->
- Users can
unstakea specific amount. The unstake flow updates$.stakeInfo[user].stakedby decreasing the requestedamountin_updateUnstakeAmounts:- References:
- The unstake logic reduces the staked amount but does not validate that the remaining staked amount remains >=
minStakeAmount. - As a result, a user can have a staked balance that is less than
minStakeAmount, breaking the intended invariant that all staked balances must be at leastminStakeAmount. - Mitigation suggestion (high level): When processing an unstake, check the resulting remaining staked amount; if it would be below
minStakeAmount, require the user to unstake the full remaining amount (or disallow the partial unstake), so no account remains with a staked amount <minStakeAmount.
Impact Details
User can end up with a staked balance below minStakeAmount, which breaks the design invariant that every active stake be >= minStakeAmount. This affects protocol assumptions about minimum effective stakes but does not directly drain funds.
References
<details> <summary>Relevant source lines</summary>- Stake validation:
https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/facets/StakingFacet.sol#L112-L114 - Unstake and update logic:
https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/facets/StakingFacet.sol#L353-L358\\ https://github.com/immunefi-team/attackathon-plume-network/blob/580cc6d61b08a728bd98f11b9a2140b84f41c802/plume/src/facets/StakingFacet.sol#L366-L390
Proof of Concept
{% stepper %} {% step %}
- User stakes an amount greater than
minStakeAmount, e.g.minStakeAmount + 1. {% endstep %}
{% step %}
2. User partially unstakes minStakeAmount.
{% endstep %}
{% step %}
Result: The user now has 1 remaining staked (or generally a remainder < minStakeAmount), demonstrating the protocol allows a staked balance below minStakeAmount.
{% endstep %}
{% endstepper %}
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
A user can end up with a staked balance below minStakeAmount, breaking the design invariant that every active stake be at least minStakeAmount, but this does not directly drain funds.
What the attacker needed
A staked balance above minStakeAmount
The fix
When processing an unstake, check the resulting remaining staked amount; if it would be below minStakeAmount, require the user to unstake the full remaining amount or disallow the partial unstake.
How it was found
- Stake an amount greater than minStakeAmount, for example minStakeAmount + 1.
- Partially unstake minStakeAmount.
- Observe that the remaining staked balance is 1, which is below minStakeAmount.
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 smart contract lets people lock tokens (stake) and requires at least a certain amount to be locked. When someone takes tokens back (unstake), the contract does not check that what is left is still above that minimum. So a person can end up with a tiny stake that the rules say should not exist.
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.