Skip to content

Allow remove stake below nom minimum #454

@camfairchild

Description

@camfairchild

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions