Open
Conversation
… for loss accounts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a comprehensive invariant testing suite under
test/integration/recon-end-to-end/using the Recon/Chimera framework. The suite deploys the full Hub + Spoke stack on-chain and uses Echidna (assertion mode) to explore multi-step call sequences that could violate protocol guarantees.29 new files, ~10,200 lines covering 131 properties across vault operations, ERC-7540 compliance, deposit/redeem lifecycle, share accounting, escrow balance integrity, and authorization.
Also adds root-level config:
echidna.yaml,medusa.json,foundry.tomlremappings, andlib/setup-helperssubmodule.What This Tests
The fuzzer calls target functions in random order with random inputs, then checks that protocol invariants still hold. Properties are organized into categories:
Full table:
test/integration/recon-end-to-end/properties-table.mdSuite README:
test/integration/recon-end-to-end/README.mdEchidna Results
128 of 131 properties pass. The 3 failures are acknowledged false positives, not protocol bugs:
property_authorizationBypassupdateBalanceSheetManager— unrealistic operational mistakevault_maxWithdrawbalanceSheet.issue()call outside normal manager flow — admin workflow violationproperty_availableGtQueuedDetails:
.claude/docs/recon/13-acknowledged-risks.mdNot Covered (Future Work)
The suite tests the core deposit/redeem lifecycle end-to-end but does not yet cover:
Potential follow-ups based on Echidna findings:
deposit(maxDeposit)can leavemaxMint > 0due to shares↔assets conversion precision loss. Protocol recommendsmint(maxMint)for full consumption. Consider documenting this for integrators.property_authorizationBypassfinding suggests deployment tooling should enforceupdateBalanceSheetManageris always called. Worth a defensive check or deployment script assertion.How to Run