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] Delegation invariant #102

Merged
merged 26 commits into from
Dec 6, 2024
Merged

Conversation

colin-morpho
Copy link
Contributor

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

This PR adds the specification for more desired invariants.
These are assumed in other rules so it's good to have them proved to hold.
It uses specification technique suggested by the Certora team. The technique is a bit sophisticated as it involves exhaustively specifying many intermediate properties and using quantificators.

TODO:

  • update README;
  • ensure the verification succeeds;
  • documents the specification.

@colin-morpho colin-morpho added the verif Formal Verification label Nov 28, 2024
@colin-morpho colin-morpho self-assigned this Nov 28, 2024
@colin-morpho colin-morpho changed the base branch from feat/delegation to colin@verif/delegation November 28, 2024 18:18
@colin-morpho colin-morpho marked this pull request as draft November 28, 2024 18:29
@colin-morpho colin-morpho marked this pull request as ready for review November 29, 2024 11:06
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.

I think it's missing a couple of things to be usable:

  • remove the require that sumOfBalances is greater than an account balance
  • use the new sumOfBalance definition to show that it's greater than the sum of balances of n accounts (with n = 1 or 2)

@colin-morpho colin-morpho mentioned this pull request Dec 2, 2024
5 tasks
colin-morpho and others added 3 commits December 4, 2024 16:04
chore: fix formatting

Co-authored-by: Quentin Garchery <garchery.quentin@gmail.com>
Signed-off-by: Colin | Morpho 🦋 <colin@morpho.xyz>
@colin-morpho colin-morpho dismissed QGarchery’s stale review December 4, 2024 16:59

The base branch was changed.

QGarchery
QGarchery previously approved these changes Dec 4, 2024
Co-authored-by: MathisGD <74971347+MathisGD@users.noreply.github.com>
Signed-off-by: Colin | Morpho 🦋 <colin@morpho.xyz>
QGarchery
QGarchery previously approved these changes Dec 5, 2024
Copy link
Contributor

@MathisGD MathisGD left a comment

Choose a reason for hiding this comment

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

impressive work!

MathisGD
MathisGD previously approved these changes Dec 6, 2024
QGarchery
QGarchery previously approved these changes Dec 6, 2024
Co-authored-by: Quentin Garchery <garchery.quentin@gmail.com>
Signed-off-by: Colin | Morpho 🦋 <colin@morpho.xyz>
@colin-morpho colin-morpho dismissed stale reviews from QGarchery and MathisGD via 226a313 December 6, 2024 14:42
Co-authored-by: Quentin Garchery <garchery.quentin@gmail.com>
Signed-off-by: Colin | Morpho 🦋 <colin@morpho.xyz>
@colin-morpho colin-morpho merged commit 82c9c5c into main Dec 6, 2024
10 checks passed
@colin-morpho colin-morpho deleted the colin@verif/delegation-invariants branch December 6, 2024 15:37
@QGarchery QGarchery mentioned this pull request Dec 10, 2024
3 tasks
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