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

[Certora] Verify delegation correctness #92

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

colin-morpho
Copy link
Contributor

@colin-morpho colin-morpho commented Nov 8, 2024

The verification ensures that delegation of voting power accounting is correct.

Replaces #85

TODO:

  • README is updated;
  • verification succeed;
  • CI is updated.

@colin-morpho colin-morpho changed the title feat: verify delegation correctness [Certora] Verify delegation correctness Nov 8, 2024
@colin-morpho colin-morpho self-assigned this Nov 8, 2024
@colin-morpho colin-morpho added the verif Formal Verification label Nov 8, 2024
@colin-morpho colin-morpho marked this pull request as ready for review November 8, 2024 20:40
Copy link
Contributor

@QGarchery QGarchery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, this is starting to be very clean !

certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/README.md Outdated Show resolved Hide resolved
certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/README.md Outdated Show resolved Hide resolved
certora/applyMunging.patch Show resolved Hide resolved
Base automatically changed from colin@verif/erc20 to main November 19, 2024 09:07
certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/specs/Delegation.spec Outdated Show resolved Hide resolved
QGarchery
QGarchery previously approved these changes Nov 20, 2024
Comment on lines +22 to +24
// Safe requires because the proxy contract should be initialized right after construction.
require totalSupply() == 0;
require sumOfVotingPower == 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the comment nor why it's ok to require this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We expect the contract to be used behind a proxy, and the proxy to call initialize when it is constructed. The comment explains that, and highlights the fact that no calls to the contract are made in between construction and initialization

Copy link
Contributor Author

@colin-morpho colin-morpho Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let @QGarchery change this comment, if need be, as he's the original author.

certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/specs/Delegation.spec Outdated Show resolved Hide resolved
certora/specs/Delegation.spec Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verif Formal Verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants