-
Notifications
You must be signed in to change notification settings - Fork 47
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
Discrepancy in WETH9 Invariant Test #6
Comments
I recreated the sequence that caused the failure and did a deeper dive. The problem appears to be that there is no sanitization of actor/msg.sender to ensure the actors are not the handler and weth contracts. Here's what happens: Sequence of Events:
The balances will not add up properly as a result. I think that adding address sanitization to the invariant test suite will resolve this issue. |
Changing the
|
PR: |
I copied the deployed bytecode for WETH9 from Ethereum mainnet and used vm.etch to point the invariant test suite at the live implementation. I cranked up the number of runs to 500 and depth to 500, and then allowed a deep exploration of WETH9 against your invariants. It ran fine for several explorations (about 10 minutes per exploration), but eventually I encountered a case where an invariant condition was broken.
I'm assuming there may be a small problem in the invariant test suite that is causing this.
The following are the modifications I made to target mainnet WETH9.
The text was updated successfully, but these errors were encountered: