这是indexloc提供的服务,不要输入任何密码
Skip to content

Add restriction on Unlock as per MIN_COINS_ON_SHARES_POOL #135

@sjoshisupra

Description

@sjoshisupra

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions