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: Attach quoting solver to the order #2813

Closed
fleupold opened this issue Jul 15, 2024 · 3 comments
Closed

chore: Attach quoting solver to the order #2813

fleupold opened this issue Jul 15, 2024 · 3 comments
Assignees
Labels
E:6.2 Time to Happy Moo See https://github.com/cowprotocol/pm/issues/77 for details

Comments

@fleupold
Copy link
Contributor

Background

I have seen for a bunch of "slow to solve" orders that they were quoted by a Gnosis solvers (e.g. 1Inch) which later on didn't attempt to settle them thus making them expire or take a long time to settle.

Details

Single order solvers sort orders in the auction instance by "likelihood" of being executed based on the external price vector that is part of the auction file. They then try to settle as many orders as possible based off that list until time runs out or the upstream API starts rate limiting them

It is a known fact that the external price vector tends to be inaccurate. Yet the orderbook is quite large, which may lead to bad prioritisation.

In particular, if a solver just quoted an order a couple of seconds earlier it should prioritise re-solving for that oder as it's likely going to be solvable given the same route that was obtained in the quote.

Acceptance criteria

  • Attach information about the winning quoter on each order
  • Inside the single order solver, keep sorting orders by likelihood but also put orders that were quoted in the last couple of minutes by the current solver ahead of the queue, as they are likely going to execute.
@fleupold fleupold added the E:6.2 Time to Happy Moo See https://github.com/cowprotocol/pm/issues/77 for details label Jul 15, 2024
@fleupold
Copy link
Contributor Author

https://explorer.cow.fi/orders/0xd916d75dbe461f52e5a757c3d343030fc08b40e2ad71347baeef28a0b1c5d3f2a4c39bc895e380e0b54f9b1c952c3bc151cf6fb266a0c77e?tab=overview is an example for which 1Inch quoted a route that was executable for the entire time of the order (7 minutes).

In the first auction that the order was valid (9177561) no solutions were proposed so it could have easily been settled. The 1Inch solver never tried to match this order.

@squadgazzz
Copy link
Contributor

that were quoted in the last couple of minutes

Just to make sure I didn't miss anything. This requirement implies adding a creation timestamp column to the quotes table, and the same timestamp should be reflected in the order_quotes table(to avoid adding quote_id and SQL joins), correct?

@fleupold
Copy link
Contributor Author

No, I think we should use the order creation timestamp to decide on recency (quotes are only valid for a very short time anyways).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:6.2 Time to Happy Moo See https://github.com/cowprotocol/pm/issues/77 for details
Projects
None yet
Development

No branches or pull requests

2 participants