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

fix: an AMM waiting for a data source cannot be set to reduce only #11749

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

wwestgarth
Copy link
Contributor

Fix for a panic on the overnight market-sims. If someone amends their AMM to use a data-source, and the old base is out of range of the new lower/upper bounds, the AMM gets kicked into a pending state. If that person then wants to cancel the AMM into a reduce only mode, we can't, because there are no AMM curves yet until a data source price comes in.

We previously set the AMM status to reduce only and then would panic when an order come in to trade against empty curves.

@wwestgarth wwestgarth self-assigned this Oct 25, 2024
@wwestgarth wwestgarth requested a review from a team as a code owner October 25, 2024 08:26
@jeremyletang jeremyletang merged commit e2230d9 into develop Oct 25, 2024
14 checks passed
@jeremyletang jeremyletang deleted the amm-reduce-only-pending branch October 25, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants