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

[Feature]: AMM auction uncrossing performance #11726

Closed
wwestgarth opened this issue Oct 1, 2024 · 0 comments · Fixed by #11727
Closed

[Feature]: AMM auction uncrossing performance #11726

wwestgarth opened this issue Oct 1, 2024 · 0 comments · Fixed by #11727
Assignees
Labels

Comments

@wwestgarth
Copy link
Contributor

wwestgarth commented Oct 1, 2024

Feature Overview

When a market enters an auction, we expand all AMM's into discrete orders in the crossed region. This allows us to use the existing code in the orderbook for finding the volume maximising range and an uncrossing price.

Currently, when we uncross the book we will take those expanded AMM orders and shoot them against the other side of the book one buy one. Given that the number of expanded orders could be in the 1000s for each AMM this adds a lot of churn, and also a lot of order and trade events.

What we really only require here is for the AMM to trade the combined volume of all those expanded orders for it to ended up uncrossed. So we should stick the orders all together into one big order and uncross with just that and shift the AMM's position in one go. The price of the combined order doesn't really matter, because after uncrossing all trades are priced at pre-calculate uncrossing price.

Specs

  • Link to spec or section within a spec

Tasks

A checklist of the tasks that are needed to develop the feature and meet the acceptance criteria and feature test scenarios.

  • [ ]
  • [ ]

Feature test scenarios

Detailed scenarios that can be executed as feature tests to verify that the feature has been implemented as expected.

GIVEN (setup/context)
WHEN (action)
THEN (assertion) For example...
See here for more format information and examples.

Additional Details (optional)

Any additional information that provides context or gives information that will help us develop the feature.

@wwestgarth wwestgarth added performance feature new feature to be developed hybrid-liquidity labels Oct 1, 2024
@wwestgarth wwestgarth self-assigned this Oct 1, 2024
@vega-issues vega-issues moved this to Waiting Review in Core Kanban Oct 1, 2024
@vega-issues vega-issues moved this from Waiting Review to Approved in Core Kanban Oct 1, 2024
@github-project-automation github-project-automation bot moved this from Approved to Merged in Core Kanban Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant