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

Add new try-state check invariant for nomination-pools (points >= stake) #5448

Closed
gpestana opened this issue Aug 23, 2024 · 0 comments · Fixed by #5465
Closed

Add new try-state check invariant for nomination-pools (points >= stake) #5448

gpestana opened this issue Aug 23, 2024 · 0 comments · Fixed by #5465
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. T2-pallets This PR/Issue is related to a particular pallet.

Comments

@gpestana
Copy link
Contributor

gpestana commented Aug 23, 2024

Given the design of points to stake in nomination pools, there's a known invariant that is easy to check in the nomination pallet's try-state checks which is:

  • A pool's points can never be lower than the stake in the same pool.

Add a check for this invariant in the try-state checks of the nomination pools pallet.

@gpestana gpestana added the T2-pallets This PR/Issue is related to a particular pallet. label Aug 23, 2024
@Ank4n Ank4n added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. labels Aug 23, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 29, 2024
…ke) (#5465)

closes #5448

---------

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. T2-pallets This PR/Issue is related to a particular pallet.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants