Skip to content

Withdrawable amount calculation doesn't take tokens being unstaked into account #309

@bbenligiray

Description

@bbenligiray

User report:

Had ~4k withdrawable tokens. Initiated an unstake. Withdrawable went to 0?

Here, the total funds of the user takes staked and unstaked tokens into account. However, there is also a third state (being unstaked). Since this is not taken into account, the contract treats the user as if they have less tokens than they actually do. The tokens will become withdrawable again once the unstaking is executed.

The users are recommended to withdraw (if they want) before starting to unstake. This issue will not be addressed because it's not critical and the contract is already deployed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions