Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow remove stake below nom minimum #454

Closed
camfairchild opened this issue May 22, 2024 · 2 comments
Closed

Allow remove stake below nom minimum #454

camfairchild opened this issue May 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@camfairchild
Copy link
Contributor

camfairchild commented May 22, 2024

Describe the bug

Currently, if you unstake to a balance below the minimum nomination stake threshold, but not exactly all your stake, it fails your SubtensorModule.remove_stake call.

However, I would expect that the stake balance should be sweep fully instead, or perhaps provide a call to allow "death" from the stake entry.

To Reproduce

  1. add_stake above threshold to a delegate (e.g. 0.101 TAO)
  2. remove_stake (after rate limit period) your stake so it would be below the threshold, but not 0 (e.g. 0.0011 TAO, 0.0001 TAO above)
  3. FAIL! remove_stake is rejected.

Expected behavior

I would expect something more like this:

  1. add_stake above threshold to a delegate (e.g. 0.101 TAO)
  2. remove_stake (after rate limit period) your stake so it would be below the threshold, but not 0 (e.g. 0.0011 TAO, 0.0001 TAO above)
  3. Success! (but Stake Map entry is removed, and you remove all 0.101 TAO stake)

or

  1. add_stake above threshold to a delegate (e.g. 0.101 TAO)
  2. remove_stake_allow_death(0.0011) (after rate limit period)
  3. Success! (Stake Map entry is removed, and you remove all 0.101 TAO stake)

Screenshots

No response

Environment

OS: NA. Chain Spec: 149

Additional context

No response

@camfairchild camfairchild added the bug Something isn't working label May 22, 2024
@camfairchild camfairchild changed the title Wipe stake on remove stake below minimum Allow remove stake below nom minimum May 22, 2024
@camfairchild
Copy link
Contributor Author

camfairchild commented May 23, 2024

Should be fixed by #383
edit: Seems to be undone by #366 here

@camfairchild
Copy link
Contributor Author

Is fixed by #462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant