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

Changing add stake operation #3196

Draft
wants to merge 3 commits into
base: albatross
Choose a base branch
from
Draft

Conversation

ii-cruz
Copy link
Member

@ii-cruz ii-cruz commented Dec 13, 2024

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

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

@ii-cruz ii-cruz added the bug Something isn't working label Dec 13, 2024
@ii-cruz ii-cruz self-assigned this Dec 13, 2024
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

Successfully merging this pull request may close these issues.

1 participant