Contract fails to deliver promised returns, but doesn't lose value
Description
Brief/Intro
The unstake method in StakingFacet for unstaking a particular amount does not check if the remaining stake is still above the minimum stake. A staker can thus leave a dust stake amount with a validator.
Vulnerability Details
Most places in StakingFacet confirm that the user stake is above minStakeAmount, but unstaking with a specific amount does not do this:
Anyone can go below the minimum stake parameter with this method. Financial incentives for this are not immediately clear, but this does lead to storage bloat.
References
See plume/src/facets/StakingFacet.sol
Proof of Concept
PoC — apply diff and run failing test
The PoC below demonstrates how a user can end up with having just 1 wei staked, below the minimum stake.
Save the diff below to poc.diff then run git apply poc.diff. Run like this: