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: Balances of CoW AMMs in batch auction json #2715

Closed
harisang opened this issue May 10, 2024 · 8 comments
Closed

feat: Balances of CoW AMMs in batch auction json #2715

harisang opened this issue May 10, 2024 · 8 comments
Labels
stale team:solvers Issues / PRs scoped to solvers

Comments

@harisang
Copy link
Contributor

A solver team asked whether it would be possible to include up-to-date balances of (some curated list of) CoW AMMs in the auctions the autopilot sends out. Would that be easy to do, or should we leave it up to the solvers to do that?

@harisang harisang added the team:solvers Issues / PRs scoped to solvers label May 10, 2024
@harisang harisang changed the title feat: Balances of CoW AMMs in auction jsons feat: Balances of CoW AMMs in batch auction json May 10, 2024
@fleupold
Copy link
Contributor

It would be easy but prone to race conditions and I don't think we should put it in the autopilot. If at all it could be considered part of the liquidity fetching in the driver, but I'm not sure we want to invest ressources for that (solver teams are welcome to contribute a PR)

@marcovc
Copy link
Contributor

marcovc commented May 18, 2024

Question: if the driver is not providing the cow amms, I suppose it is also not providing the external prices for those cow amms. If that is the case, how is the surplus for cow orders computed?

@fleupold
Copy link
Contributor

@harisang correct me if I'm wrong, but I think plan is to provide a list of contract addresses that represent CoW AMMs and make sure that there are external prices for their assets in the auction.

@marcovc
Copy link
Contributor

marcovc commented May 25, 2024

You mean this list of addresses is going to be part of the instance json, or is it somehow implicit what the list is, and the driver will make sure its traded tokens are listed there?

@fleupold
Copy link
Contributor

cc @Mateo-mro since you worked on this. How do solvers know which addresses are allowed to have surplus capturing JIT created by them?

m-lord-renkse added a commit that referenced this issue May 29, 2024
# Description
The solvers would need to know the JIT-order surplus capturing addresses
(see e.g.
#2715 (comment)).
For that the owner addresses are propagated to the solvers in the
auction json.


# Changes
Propagate the list of surplus capturing JIT-order owners to the solvers
in the auction json.

## How to test
1. Regression tests
@m-lord-renkse
Copy link
Contributor

cc @Mateo-mro since you worked on this. How do solvers know which addresses are allowed to have surplus capturing JIT created by them?

@fleupold @marcovc I added the propagation of the addresses to the solvers, see https://github.com/cowprotocol/services/blob/main/crates/solvers/openapi.yml#L662

@marcovc
Copy link
Contributor

marcovc commented May 31, 2024

Great, thank you!

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
stale team:solvers Issues / PRs scoped to solvers
Projects
None yet
Development

No branches or pull requests

4 participants