-
Notifications
You must be signed in to change notification settings - Fork 33
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
Potential issue with testPathIndependenceForSwaps
test from part 3/4
#15
Comments
The test doesn't concern the fees taken by uniswap, which is |
Thank you for your response, I stand corrected. About 3%, was this precision loss defined? Just empirically? About the corpus, I actually changed a bunch of stuff on the tests, so maybe this won't work out of the box. I'll try to repro on this repo and will send it here if I'm able to do it. |
Yeah the precision loss is defined empirically. I'm not sure if there's any specification that could detail the potential precision loss, but I think 3% is a generous bound given that only a |
Hello,
I am fuzzing Uniswap v2 and I believe I have found a potential issue with the
testPathIndependenceForSwaps
test from part 3/4.When running echidna with
testLimit
equals to 100k and 4 workers, the test breaks:I believe this is caused by a wrong assumption that swapping back and forth only costs 3% in fees.
Instead, each swap takes 3%, so the back-and-forth maximum loss should be
100% - (100%-3%)*(100%-3%) = 5.91%
The text was updated successfully, but these errors were encountered: