-
Notifications
You must be signed in to change notification settings - Fork 9
Description
As of now, to avoid larger loss to the user, it is enforced that both in active and pending_inactive pools, a user has at least MIN_COINS_ON_SHARES_POOL.
Therefore, if an unlock from a user is for an amount less than MIN_COINS_ON_SHARES_POOL, a larger amount is unlocked to ensure the above invariant. This, however, results in a surprise for the user.
Also see if same restriction need to be applied to add_stake, and whether this can cause any restriction on reward distribution/ restaking and any other flows except the ones triggered by the user.
We should add an assert that checks that unlock requested is always above MIN_COINS_ON_SHARES_POOL. This would always result in the amount being unlocked either exactly same as the amount requested or lesser by 1 quant (due to conversion from amount to shares and then back to amount).