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: Simulate settlements with current block timestamp + 12s #2174

Closed
fleupold opened this issue Dec 15, 2023 · 0 comments · Fixed by #2185
Closed

chore: Simulate settlements with current block timestamp + 12s #2174

fleupold opened this issue Dec 15, 2023 · 0 comments · Fixed by #2185
Assignees
Labels
E:3.1 Driver Colocation See https://github.com/cowprotocol/pm/issues/14 for details

Comments

@fleupold
Copy link
Contributor

Background

We sometimes see solution candidates that simulate well on the last slot of the current block and thus win the competition, but immediately fail in the first slot of the next block and therefore become invalid and never settle.

This can cause settlement delays if a solver keeps submitting solutions that only work on current but never on next.

Details

Examples for this are pool math involving block.timestamp, e.g.

Image

Here is an example simulation

  1. passing in last slot of current (phalcon)
  2. failing in first slot of next (phalcon)

The only thing that changes between the two is block.timestamp. We should therefore use the timestamp of the next block when simulating solution candidates.

Acceptance criteria

Solutions that won't simulate successfully at the top of the next block get filtered out in the driver.

@fleupold fleupold added the E:3.1 Driver Colocation See https://github.com/cowprotocol/pm/issues/14 for details label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:3.1 Driver Colocation See https://github.com/cowprotocol/pm/issues/14 for details
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants