Submitted by eighty
Some rewards for free floating shares users could become unclaimable if the user is not careful when unstaking from a knot.
When staking on a given knot, the protocol prevents staking amounts fewer than 1 gwei. Additionally, when unstaking, theres a check against unstaking amounts greater than the amounts allowed (at 263), but theres no check on the remaining amount. Thus, this leaves open scenarios where the user may leave less than 1 gwei on a knot. In such cases, the user cannot claim additional earnings due to the following calls: 679 - 693 - 370.
The user could restake his position on a knot, but theres a (short) limit of 12 eth that could be filled by anyone.
A Knot could become inactive, making future rewards forever inaccessible.
The user could recover the smalls staked amounts, but hell not be compensated by accrued earnings.
Property violated.
Rule issue2_unstakingLeavesSmallAmountsBehind in M002.spec, regarding the possibility of small stakes.
Rule issue2_ifTheUserHasClaimableAmountsHeShouldBeAbleToClaimIt in M002.spec regarding the rewards unclaimable.
Prevent unstaking shares when the amount remaining is less than 1 gwei.
vince0656 (Blockswap) commented:
teryanarmen (Certora) commented:
