Skip to content

certora: remove munging - #125

Merged
MathisGD merged 3 commits into
mainfrom
devin/1795111196-remove-munging
Nov 20, 2026
Merged

MathisGD merged 3 commits into
mainfrom
devin/1795111196-remove-munging

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Certora now verifies src/ directly, so the munging step is gone. Before this PR, the only thing the munge did was add a _zeroVirtualVotingPower variable (the voting power of address zero) to the token contracts.

A CVL ghost now does that job. zeroVirtualVotingPower[x] is the partial sum, over accounts < x, of the balances of accounts whose delegatee is address(0). The existing _balances and _delegatee Sstore hooks in ERC20Invariants.spec keep it updated. The specs read zeroVirtualVotingPower[2^160] wherever they used to read currentContract._zeroVirtualVotingPower.

New invariants zeroVirtualVotingPowerStartsAtZero, zeroVirtualVotingPowerGrowsCorrectly and zeroVirtualVotingPowerMonotone prove that the ghost is consistent and nonnegative. totalSupplyIsSumOfVirtualVotingPower relies on them, and also on the already-proven zeroAddressNoVotingPower, totalSupplyIsSumOfBalances and balancesLTEqTotalSupply in its initialize preserved block.

Removed: certora/Makefile, applyMunging.patch, the munging CI step, the .gitignore entry and the README mention. Harnesses now import from src/. src/ itself is unchanged.

All 8 affected confs pass with rule_sanity: basic, run locally: DelegationEthereum, DelegationOptimism, MintBurnEthereum, MintBurnOptimism, ERC20InvariantsEthereum, ERC20InvariantsOptimism, ERC20Ethereum, ERC20Optimism.

Link to Devin session: https://app.devin.ai/sessions/23d117fa4e4342efa198c5b4e90e403e
Open in Devin Desktop: https://app.devin.ai/desktop/session/23d117fa4e4342efa198c5b4e90e403e?variant=devin


🟢 Devin Review found nothing to fix · View findings

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Comment thread certora/specs/ERC20Invariants.spec Resolved
MathisGD
MathisGD previously approved these changes Nov 19, 2026
Comment thread certora/README.md Resolved
Comment thread certora/specs/ERC20Invariants.spec Resolved
Comment thread certora/specs/Delegation.spec Resolved
QGarchery
QGarchery previously approved these changes Nov 20, 2026
Comment thread certora/README.md Resolved
@MathisGD
MathisGD merged commit 7ec09bb into main Nov 20, 2026
18 checks passed
@MathisGD
MathisGD deleted the devin/1795111196-remove-munging branch November 20, 2026 08:51
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.

2 participants