-
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
Unsound "safe" require delegatedLTEqDelegateeVP #107
Comments
Is it though, for instance in
sender = 0 then it reverts, so implicitly we check our hypothesis A != 0 . Also, this is why it's not assumed, as we want to check it. The other assumption is only to avoid overflows related to computing the _zerorVirtualVotingPower . I'm not convinced that there's a real issue here.
|
I don't think so, because if the sender=0 then you make an assumption with In general I think we should be very careful with |
Ok, so approximation is not really unsound. This is because of the rule |
Nice ! So as a default we can add the exact formula that is proven, and then refine later and add proofs as you did |
The invariant
delegatedLTEqDelegateeVP
proves that:forall A, A != 0 => balanceOf(A) <= delegatedVotingPower(delegatee(A))
Notice the clause
A != 0
, which comes from:morpho-token/certora/specs/ERC20Invariants.spec
Line 13 in d828ef0
However, it seems like it is used without this clause:
morpho-token/certora/specs/RevertsERC20.spec
Lines 17 to 18 in d828ef0
morpho-token/certora/specs/RevertsERC20.spec
Lines 33 to 34 in d828ef0
morpho-token/certora/specs/RevertsMintBurnEthereum.spec
Lines 35 to 36 in d828ef0
morpho-token/certora/specs/RevertsMintBurnOptimism.spec
Lines 33 to 34 in d828ef0
The text was updated successfully, but these errors were encountered: