core-rs-albatross icon indicating copy to clipboard operation
core-rs-albatross copied to clipboard

Changing add stake operation

Open ii-cruz opened this issue 2 months ago • 0 comments

What's in this pull request?

  • Adds the Minimum stake to the add_stake operation. Add stake transactions have an intrinsic check for its value => min_stake and thus are rejected before they can break the invariant.
  • The idea is that this minimum prevents indefinite small value add_stake transactions from hindering the retirement or withdrawal.
  • add_stake assumes that the staker wants to have auto-staking as long as there is active stake. Once no active stake exists, the funds are added to whatever is the biggest balance between inactive and retired.
  • The idea is to prevent residual amounts of funds on the staking contract.
  • Adapts and adds more unit tests

Pull request checklist

  • [x] All tests pass. The project builds and runs.
  • [x] I have resolved any merge conflicts.
  • [x] I have resolved all clippy and rustfmt warnings.

ii-cruz avatar Dec 13 '24 17:12 ii-cruz