Comments (3)
The test doesn't concern the fees taken by uniswap, which is 0.30%
, not 3%
. The test attempts to test the invariant "swapping X for Y and back should leave the user with X tokens" (bar some precision loss, currently set to 3%). So I believe the test is correct, although it's interesting you found an edge case where this doesn't hold. Could you zip and send your corpus? This might have to do with the pool conditions being strange (it seems there's low and imbalanced liquditity judging from the call sequence, but I'm not 100% sure)
from echidna-streaming-series.
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.
from echidna-streaming-series.
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 0.3%
fee is taken from each swap. I also think this is a good number to use because it's generally the recommended slippage tolerance
from echidna-streaming-series.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from echidna-streaming-series.