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: Enable jit orders for CoW AMMs #2607

Closed
harisang opened this issue Apr 10, 2024 · 5 comments
Closed

feat: Enable jit orders for CoW AMMs #2607

harisang opened this issue Apr 10, 2024 · 5 comments
Labels
team:solvers Issues / PRs scoped to solvers

Comments

@harisang
Copy link
Contributor

harisang commented Apr 10, 2024

In order to realize the potential of CoW AMMs, solvers need to be able to post jit orders to the CoW AMM. A special property of these orders is that they are eligible for surplus, that should be accounted for when computing the score of a solution. This requires that the autopilot and the default driver are aware that these orders can accumulate surplus.

Copy-pasting an important observation from the first comment below.

Also, those orders require to execute a pre interaction (to commit the AMM to a unique order id and prevent replay attacks). JIT orders and high level solutions currently don't have a way of specifying pre/post interactions. This should be added as well (not entirely sure if on the JIT order level or solution struct, my hunch would be the latter for more flexibility).

@harisang harisang added the team:solvers Issues / PRs scoped to solvers label Apr 10, 2024
@fleupold
Copy link
Contributor

The list for those can probably be hardcoded initially (and should be similar to the list of addresses that are exempt from protocol fees).

Also, those orders require to execute a pre interaction (to commit the AMM to a unique order id and prevent replay attacks). JIT orders and high level solutions currently don't have a way of specifying pre/post interactions. This should be added as well (not entirely sure if on the JIT order level or solution struct, my hunch would be the latter for more flexibility).

@squadgazzz
Copy link
Contributor

Split the issue into #2635 and #2636. This ticket can be used for the wiring up.

@squadgazzz squadgazzz removed their assignment Apr 19, 2024
@fleupold
Copy link
Contributor

While not strictly required, it would probably be good to complete #2215 before implementing this issue as otherwise we have to add the logic to encode clearing prices for JIT orders that accrue surplus in the legacy encoder (which may be a bit hairy)

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 Jun 20, 2024
@MartinquaXD
Copy link
Contributor

Last bit for submitting cow amm JIT orders was implemented in #2764

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:solvers Issues / PRs scoped to solvers
Projects
None yet
Development

No branches or pull requests

4 participants