-
Notifications
You must be signed in to change notification settings - Fork 48
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
Solver fails with large range of values (real world reserve sizes) #5
Comments
As I understand there are 2 answers. First is to use their julia code. Which supposed to work. |
Second, try other engine. Afaik default was ECOS, which seems not great. I think of SCIP(compiled with GMP/Boost MP), but for prove try proprietary engine. We got same error, I thought it was our modification so, until I got there. |
Also option is to scale down assets against USD or to smallerrange of floats (each assets to its reserves). |
also can try tune tolerances. |
some failure exists on julia too bcc-research/CFMMRouter.jl#12 |
works for me with this #9 |
@dzmitry-lahoda Hello, Sir. I have raised an issue Numerical Stability Challenges in Uniswap V3 and Curve Pools on the numeric scale problem. Looking for your kind reply. |
When attempting to apply the code to real reserve sizes it has become apparent that the distribution of these values presents a significant problem for the underlying numerical solver, namely that the values tend to deviate by several orders of magnitude and thus cannot be normalised by an overall factor to produce a set of O(1) values. This is causing the solver to fail, although it works very well for the example numbers in the code files.
Has the code been used / tested with real world reserve values over a sizable selection of markets or is it considered more of a theoretical / reference implementation?
Is there a recommended normalisation to be used when using real reserve values that may deviate by many orders of magnitude?
Many thanks
The text was updated successfully, but these errors were encountered: