Skip to content

[certora] verify ERC4626 round-trip properties - #953

Merged
MathisGD merged 5 commits into
mainfrom
claude/certora-erc4626-roundtrip
Aug 21, 2026
Merged

[certora] verify ERC4626 round-trip properties#953
MathisGD merged 5 commits into
mainfrom
claude/certora-erc4626-roundtrip

Conversation

@claude

@claude claude Bot commented Jul 28, 2026

Copy link
Copy Markdown

Requested by Mathis GD · Slack thread

Adds a Certora spec proving the ERC4626 round-trip properties (a16z erc4626-tests ERC4626.prop.sol L244-318) hold for VaultV2 — no deposit→redeem, mint→withdraw, or reverse round trip lets a user extract more than they put in.

It proves the eight round-trip inequalities plus two conversion lemmas at fixed vault totals, summarizing accrueInterestView() to arbitrary-but-fixed totals (a sound over-approximation that removes the adapter loop and interest/fee accrual), leaving MathLib's mulDiv to the solver.

Mirror of morpho-org/metamorpho#465. Note it's not currently a tracked item in the wish list (#137).


Generated by Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CfzVWCYX7Nrnu4P6h4EuP9
Comment thread certora/specs/ERC4626.spec Outdated
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CfzVWCYX7Nrnu4P6h4EuP9
@MathisGD MathisGD self-assigned this Jul 29, 2026
@claude
claude Bot marked this pull request as ready for review July 29, 2026 10:15
Comment thread certora/specs/RoundTrip.spec
Comment thread certora/specs/RoundTrip.spec Outdated
Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com>
@MathisGD MathisGD changed the title Certora: verify ERC4626 round-trip properties [certora] verify ERC4626 round-trip properties Aug 3, 2026

@jhoenicke jhoenicke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me.

A few rules are identical (e.g.. roundTripRedeemMint and roundTripMintRedeem), but it's easier to see that all cases are covered by duplicating them.

@MathisGD
MathisGD merged commit bec4dd8 into main Aug 21, 2026
54 checks passed
@MathisGD
MathisGD deleted the claude/certora-erc4626-roundtrip branch August 21, 2026 08:27
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