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

feat: Allow multiple solution submissions for one auction #2830

Closed
fleupold opened this issue Jul 24, 2024 · 5 comments
Closed

feat: Allow multiple solution submissions for one auction #2830

fleupold opened this issue Jul 24, 2024 · 5 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

Problem

We frequently see competing solutions in which some orders are matched in the first and some other orders are matched in the other solution. Currently we chose the single best solution from all candidate, potentially leaving order that had been matched unsettled. This can cause delay and increase the user's "time to happy moo"

Suggested solution

Allow mutually exclusive solutions (ie solutions that don't overlap in any order) to be settled in the same auction.

Additional context

This will have non-trivial impact on other parts of the protocol (e.g. solver payouts) so we should proceed with a lot of care. Maybe we can first experiment with this in sepolia to see which parts of the existing backend system would break and then coordinate with the remaining teams to see if there are issues with also enabling this in prod.

Acceptance criteria

There should be a way to configure the maximum number of solutions that can be settled per auction (default to 1 like today). If set to more than one, the top n solvers should receive a settle call.
Settlement indexing and all other post trade features (fetching trades, solutions, etc) should be working no n>1 as it is today.

@fleupold fleupold added the E:6.2 Time to Happy Moo See https://github.com/cowprotocol/pm/issues/77 for details label Jul 24, 2024
@sunce86 sunce86 self-assigned this Sep 12, 2024
@fleupold
Copy link
Contributor Author

fleupold commented Sep 13, 2024

As for scope creep, can we agree that for the speed initiative we still want solvers to combine solutions as much as possible (that is each solver will only receive one settle call). I think this reduces scope and in the absence of the new fairness rule (which may disqualify batched bids) I don't think this is needed.

@fleupold
Copy link
Contributor Author

I think the main thing I'm missing from a design perspective is how we are going to match solution candidates with settlement observations?
Will there be some aspect about the solution (like the orders that were promised, prices or similar) or some form of solutions id that needs to get encoded (similar to auction id) or will we match on msg.sender of the transaction?

If we told 3 solvers to settle and observe 2 settlements later on chain, how do we know which one is which?

@sunce86
Copy link
Contributor

sunce86 commented Sep 16, 2024

We can match on orders since no common tokens are allowed to exist among winning solutions.

sunce86 added a commit that referenced this issue Oct 14, 2024
# Description
A breaking change of SolverCompetitionAPI, which now potentially returns
more than 1 transaction associated with the competition (will notify all
teams on slack soon).

Resolves one of the points from
#2830 (comment)

# Changes
<!-- List of detailed changes (how the change is accomplished) -->

- [ ] SolverCompetitionAPI now returns `Vec<TransactionHash>`, instead
of `Option<TransactionHash>`

## How to test
Refactored unit test to prove it works and that no regression issues
were introduced.
Existing e2e test for solver competition proves that competition is
properly returned.
@sunce86
Copy link
Contributor

sunce86 commented Oct 23, 2024

Closing as implemented.

@sunce86 sunce86 closed this as completed Oct 23, 2024
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