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] Dispatch tokens and verify safe transfer lib #321

Merged
merged 10 commits into from
Aug 17, 2023

Conversation

QGarchery
Copy link
Contributor

@QGarchery QGarchery commented Aug 16, 2023

This PR defines the tokens ERC20Good and ERC20USDT that should behave correctly when setting up a new market, and defines a buggy token ERC20Bad. It also uses those to verify that the summary of the transfer is valid for the tokens that behave correctly.

@QGarchery QGarchery added the verif Modifies the formal verification label Aug 16, 2023
@QGarchery QGarchery self-assigned this Aug 16, 2023
@QGarchery QGarchery changed the base branch from main to certora/dev August 16, 2023 13:17
@QGarchery QGarchery marked this pull request as ready for review August 16, 2023 20:51
Copy link
Contributor

@jhoenicke jhoenicke left a comment

Choose a reason for hiding this comment

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

I also wonder if we want some small unit tests, like:

  • safeTransfer and safeTransferFrom revert if balance not enough.
  • safeTransferFrom reverts if not authorized.
  • safeTransfer does not revert if balance is enough.

certora/specs/BlueTransferSummary.spec Outdated Show resolved Hide resolved
certora/scripts/verifyBlueTransferSummary.sh Outdated Show resolved Hide resolved
Co-authored-by: Jochen Hoenicke <hoenicke@gmail.com>
Signed-off-by: Quentin Garchery <QGarchery@users.noreply.github.com>
@QGarchery
Copy link
Contributor Author

Merging this and adding your suggestions as a new issue #342

@QGarchery QGarchery merged commit 12e2261 into certora/dev Aug 17, 2023
9 checks passed
@QGarchery QGarchery deleted the certora/dispatch-tokens branch August 17, 2023 09:17
@QGarchery QGarchery mentioned this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verif Modifies the formal verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants