-
Notifications
You must be signed in to change notification settings - Fork 8
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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] Delegation tweaks
// Safe requires because the proxy contract should be initialized right after construction. | ||
require totalSupply() == 0; | ||
require sumOfVotingPower == 0; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
The verification ensures that delegation of voting power accounting is correct.
Replaces #85
TODO: