Coder Social home page Coder Social logo

Comments (3)

technovision99 avatar technovision99 commented on June 11, 2024

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.

aviggiano avatar aviggiano commented on June 11, 2024

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.

technovision99 avatar technovision99 commented on June 11, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.