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

chore: Extend quote verification for quoting with limit orders #3028

Open
MartinquaXD opened this issue Oct 1, 2024 · 0 comments
Open

chore: Extend quote verification for quoting with limit orders #3028

MartinquaXD opened this issue Oct 1, 2024 · 0 comments

Comments

@MartinquaXD
Copy link
Contributor

Background

#3027 updates the /quote response to return enough data to quote with resting limit orders or JIT orders.
The next step is to use the new data in the quote verification logic to check that whatever the solver proposes would actually work onchain.

Details

This requires the ExternalTradeFinder to parse the new data (pre-interactions, JIT orders) from the JSON response and pass it to the simulation logic via the Trade struct. trade_verifier::encode_settlement() would also have to encode the new interactions and orders. AFAIK the underlying simulation logic would not have to be adjusted since it's using the actual settlement contract under the hood so it should automatically do the right thing with the new interactions and orders.

Acceptance criteria

e2e test verifying that a cow amm can be used to provide a quote.
This requires:

  • setting up the cow amm
  • using the mock solver to return a hardcoded solution with it (example here)
  • producing the required native prices somehow. With Native Price Cache: Load prices from auction during startup time #3009 the easiest way is probably to store the necessary auction_prices in the DB before starting the autopilot
  • assert that the generate quote has verified: true
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

1 participant