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: Store surplus capturing jit order owners in solver_competitions table #2793

Closed
MartinquaXD opened this issue Jul 1, 2024 · 2 comments · Fixed by #2796
Closed

chore: Store surplus capturing jit order owners in solver_competitions table #2793

MartinquaXD opened this issue Jul 1, 2024 · 2 comments · Fixed by #2796
Assignees

Comments

@MartinquaXD
Copy link
Contributor

Background

The external circuit breaker implementation relies on the solver competitions table to function correctly.
One of the checks is that the score promised by the solver and the score delivered onchain should be the same.
Since cow amm orders can be created just in time we need to store for each auction which jit order owners were considered to be surplus capturing for a given auction.

@harisang
Copy link
Contributor

harisang commented Jul 1, 2024

Definitely needed, and i would also argue that it is also the right thing to do so that we can have a complete description of an auction instance.

@sunce86
Copy link
Contributor

sunce86 commented Jul 12, 2024

Edit: nevermind, dont read, I see it's handled in the driver.

Do you think we should enforce finished indexing (indexing to the latest known blockchain block) on each autopilot restart, before entering the auction loops? Otherwise, there could be a racing between autopilot and driver, where autopilot is lagging and not all cow amm owners are saved to db while driver could settle those non-existent ones, which would again lead to skipping some cow amms for surplus/score?

The same question remains for external prices. If autopilot is restarted and cow amm cache not fully populated, external prices might be missing for some cow amm orders settled by driver (if driver is ahead of autopilot with indexing cow amms).

This is very related to storing of this data. I wondered how this data is supposed to be saved to be restart resistant and cumulative on each block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants