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: Reject solution with violated solution quality #2713

Closed
sunce86 opened this issue May 9, 2024 · 5 comments
Closed

feat: Reject solution with violated solution quality #2713

sunce86 opened this issue May 9, 2024 · 5 comments
Labels
E:7.1 Ext. solvers operating driver See https://github.com/cowprotocol/pm/issues/57 for details

Comments

@sunce86
Copy link
Contributor

sunce86 commented May 9, 2024

Problem

Inspired by #2712, we should also check if the reported winning score (part of the /solve response) is equal to score calculated from winning calldata (part of the /reveal response).

This is to make sure that solvers are not reporting one score for competition and then intending to settle other score. This is a direct violation of competition rules and solver should not be allowed to settle.

The same checks should be added for reported trades and clearing prices.

Suggested solution

Implement check at the competition time and reuse decoded settlement from #2712.

Alternatives considered

The check could be implemented in the postprocessing as well, but early rejection during competition makes more sense to me, as it can catch bugs with driver score calculation early and avoid circuit breaking a solver because of score violation.

Acceptance criteria

If scores are different, solution should be rejected.
If orders are different, solution should be rejected.
If clearing prices are different, solution should be rejected.

@sunce86 sunce86 added the E:7.1 Ext. solvers operating driver See https://github.com/cowprotocol/pm/issues/57 for details label May 9, 2024
@sunce86 sunce86 changed the title feat: Reject solution with violated score feat: Reject solution with violated solution quality May 9, 2024
@fleupold
Copy link
Contributor

nit: I think larger score should still be allowed (as long as each order was filled at least as good as promised).

@sunce86
Copy link
Contributor Author

sunce86 commented May 13, 2024

With the new plan, where we want to completely remove /reveal endpoint and also score field from /solve response, this issue makes no sense anymore.

However, since /reveal might not be removed just yet (since solver team still uses uninternalized call data), will keep this issue around as we still might want to make sure /reveal response is of same quality as /solve response.

Copy link

This issue has been marked as stale because it has been inactive a while. Please update this issue or it will be automatically closed.

@github-actions github-actions bot added the stale label Jul 13, 2024
@sunce86 sunce86 removed the stale label Jul 15, 2024
Copy link

This issue has been marked as stale because it has been inactive a while. Please update this issue or it will be automatically closed.

@github-actions github-actions bot added the stale label Sep 14, 2024
@sunce86 sunce86 removed the stale label Sep 15, 2024
Copy link

This issue has been marked as stale because it has been inactive a while. Please update this issue or it will be automatically closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:7.1 Ext. solvers operating driver See https://github.com/cowprotocol/pm/issues/57 for details
Projects
None yet
Development

No branches or pull requests

2 participants