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

dex_utils: the xyk solver sometimes returns negative solutions #2516

Open
Tracked by #1724
erwanor opened this issue May 9, 2023 · 1 comment
Open
Tracked by #1724

dex_utils: the xyk solver sometimes returns negative solutions #2516

erwanor opened this issue May 9, 2023 · 1 comment
Assignees
Labels
_P-low Priority: low

Comments

@erwanor
Copy link
Member

erwanor commented May 9, 2023

dex_utils::xyk::solve computes the individual pool invariants of the x*y=k curve, it sometimes returns negative solutions which are nonsensical in this context. Instead, of failing when we encounter negative solutions, we should bake in the solver that we expect positive solutions, fail early if we detect a system to be non-convergent, or proceed otherwise.

@erwanor erwanor self-assigned this May 9, 2023
@erwanor erwanor moved this to In Progress in Testnets May 10, 2023
@plaidfinch plaidfinch moved this from In Progress to Next in Testnets May 12, 2023
@plaidfinch plaidfinch moved this from Next to Testnet 53: Himalia in Testnets May 12, 2023
@erwanor erwanor moved this from Testnet 53: Himalia to Next in Testnets May 19, 2023
@erwanor erwanor moved this from Next to Testnet 53: Himalia in Testnets May 31, 2023
@redshiftzero redshiftzero moved this from Testnet 53: Himalia to Next in Testnets Jun 1, 2023
@conorsch conorsch moved this from Next to Future in Testnets Oct 18, 2023
@aubrika aubrika added this to Penumbra Oct 30, 2023
@github-project-automation github-project-automation bot moved this to 🗄️ Backlog in Penumbra Oct 30, 2023
@hdevalence hdevalence added the _P-low Priority: low label Feb 8, 2024
@erwanor erwanor moved this from Backlog to In progress in Penumbra Jul 1, 2024
@erwanor
Copy link
Member Author

erwanor commented Jul 1, 2024

This can be sidestepped entirely during solving, which we will have to do as part of doing bounded liquidity for #4112. We're going to try using NNLS and see how far we can get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_P-low Priority: low
Projects
Status: In progress
Status: Future
Development

No branches or pull requests

2 participants