-
Notifications
You must be signed in to change notification settings - Fork 82
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: Enable quoting with JIT orders liquidity #3082
Comments
nit: The new quote struct should have the uniform clearing prices instead of |
Ah, right. Updated the example.
Thanks, it was a typo, replaced with a |
# Description Closes task n1 from #3082. Introduces a new version of the driver's `/quote` response in the API schema in order to support a gradual migration to the quote with jit orders making the changes backward compatible. The driver changes are expected in the future PRs. # Changes > Update the driver's OpenAPI schema quote object with an enum with the old and new versions. Trade verifier returns error in case a new version is received. ## How to test Existing tests. I was thinking about how to test it properly, but it still requires e2e tests. So, it should be implemented in the next PRs.
Background
From #3027:
Details
Previous attempts to implement it(#3033 and #3038) showed that this is a more involved change than anticipated, which also requires breaking API changes.
Currently, JIT orders get simulated on limit prices which means they will not get any surplus. Any surplus that can be generated by using a CoW AMM would, therefore, go to the user quote. In reality, the user order that comes out of the quote would be settled at a worse price because if it gets settled against a CoW AMM order surplus will have to be shared. So, the solvers should be able to tell us at which price things should get settled so that we can reason about distributing surplus even in quotes.
To fix that we should allow solvers to return pre-interactions, JIT orders and uniform clearing prices with their quote. That way solvers could quote with CoW AMMs (require JIT orders, pre-interactions and UCP). They could also index the orderbook and return resting limit orders as JIT orders.
Tasks
Example
driver
crate and start sending the new quote version. Implement e2e tests.The text was updated successfully, but these errors were encountered: