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

refactor(StakeManager): extract interfaces and rename variables to merge functionalty with StakingRewardStreamer #150

Merged
merged 13 commits into from
Nov 15, 2024

Conversation

3esmit
Copy link
Collaborator

@3esmit 3esmit commented Oct 12, 2024

Description

Describe the changes made in your pull request here.

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Added natspec comments?
  • Ran pnpm adorno?
  • Ran pnpm verify?

0x-r4bbit and others added 5 commits November 7, 2024 10:50
change

The rule is failing since we've removed the `lockUntil > 0` check in
`stake` and `processAccount` is no longer used in `stake()`.
The rule requires `lockUntil > 0` so it will always fail there and can't
find a non-reverting cases (which makes the rule pass).

The reason it hasn't happened before was because:

The rule required account.lockUntil > 0
Stake required lockUntil > 0 || account balance == 0

Also this commit adds an invariant:

add invariant that account balance == 0 => accountMP == 0
This invariant failed as the prover started making wrong assumptions
about the relationship between anyone's account's `totalMP` and its
`balance`, as well as an account's `bonusMP` and its `balance`.

This commit fixes it by adding the necessary invariants to proof the
property.
@3esmit 3esmit force-pushed the stake-manager-interface branch from 083c986 to 9be84c7 Compare November 8, 2024 04:05
@3esmit
Copy link
Collaborator Author

3esmit commented Nov 13, 2024

fixes #147

@3esmit 3esmit merged commit 99c73be into develop Nov 15, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants