Skip to content

Conversation

@jberthold
Copy link
Member

Overflow checks in the property proofs are converted to using x.checked_add(y) instead of a custom predicate u64::MAX - y < x to ensure the SMT solver can handle them without having to add simplification lemmas.

Some of the proofs rely on the assumption that the total supply of tokens is bound by u64 and cannot be exceeded by any transfer or other operation moving tokens from one account to another. Cases where this would lead to overflow are skipped. This is protected by the assumptions feature flag in the code.

This makes a number of proofs pass that previously exhibited assert_failed and overflow errors.

Copy link
Collaborator

@dkcumming dkcumming left a comment

Choose a reason for hiding this comment

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

Nice!

@jberthold jberthold merged commit 8a508d9 into proofs Nov 26, 2025
1 check passed
@jberthold jberthold deleted the jb/process-transfer-debug branch November 26, 2025 06:16
automergerpr-permission-manager bot added a commit that referenced this pull request Dec 2, 2025
Co-authored-by: Jost Berthold <jost.berthold@gmail.com>
Co-authored-by: automergerpr-permission-manager[bot] <190534181+automergerpr-permission-manager[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants