Skip to content
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

Open
Granger7 opened this issue May 23, 2022 · 6 comments
Open

Comments

@Granger7
Copy link

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

@dzmitry-lahoda
Copy link

As I understand there are 2 answers. First is to use their julia code. Which supposed to work.

@dzmitry-lahoda
Copy link

dzmitry-lahoda commented Jan 18, 2024

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.

@dzmitry-lahoda
Copy link

dzmitry-lahoda commented Jan 21, 2024

Also option is to scale down assets against USD or to smallerrange of floats (each assets to its reserves).

@dzmitry-lahoda
Copy link

also can try tune tolerances.

@dzmitry-lahoda
Copy link

some failure exists on julia too bcc-research/CFMMRouter.jl#12

@dzmitry-lahoda
Copy link

works for me with this #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants