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] Check underflow and overflows. #97

Open
colin-morpho opened this issue Nov 13, 2024 · 4 comments · May be fixed by #105
Open

[Certora] Check underflow and overflows. #97

colin-morpho opened this issue Nov 13, 2024 · 4 comments · May be fixed by #105
Assignees
Labels
stuck verif Formal Verification

Comments

@colin-morpho
Copy link
Contributor

The ERC20 specification is patched to take support the possible (in practice impossible) overflows.
We should prove that these operations are safe.

@colin-morpho colin-morpho added the verif Formal Verification label Nov 13, 2024
@QGarchery
Copy link
Contributor

QGarchery commented Nov 13, 2024

Related comments:

@colin-morpho
Copy link
Contributor Author

As of today, proving properties w.r.t delegatee's voting power with Certora seem really difficult. Instead, in a61550f we assume them to be true and prove that there are no overflows under these hypothesis. Closing this issue as we see no way to prove the required properties.

@colin-morpho
Copy link
Contributor Author

colin-morpho commented Dec 10, 2024

In #102 #104 we have managed to prove these invariants, they are now used in ERC20 and MintBurn specs instead of require-statements. I think this issue can be closed now, w.d.y.t. @QGarchery ?

@colin-morpho colin-morpho self-assigned this Dec 10, 2024
@QGarchery
Copy link
Contributor

It would be best if we could only add "safe requires" and not change the spec of overflows because of the delegation feature.
For example, here we have the condition holderVotingPowerBefore < amount. But I think this could be replaced by something like require holderBalanceHefore <= holderVotingPowerBefore, which would be added before the "check outcome" comment

@colin-morpho colin-morpho linked a pull request Dec 16, 2024 that will close this issue
@colin-morpho colin-morpho linked a pull request Dec 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stuck verif Formal Verification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants