cowprotocol / cowprotocol/services

chore: Store fee policies for all proposed orders

Open Beginner friendly
#4,789 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

team:solvers
Dominant language
Rust
Stars
318
Forks
189
Avg merge
2d 2h
Merged PRs (30d)
121

Description

Background

The autopilot currently does not store fee policies for each order which is proposed for execution by solvers. This makes it difficult to exactly replicate the filtering and winner selection logic. Storing all fee policies for orders with at least one solution would resolve this.

Details

The post processing of auctions involves a step where fee policies are stored.

https://github.com/cowprotocol/services/blob/72d5cf4689d7b436c07224b4ad4813a6d29d9993/crates/autopilot/src/run_loop.rs#L552-L565

The code restricts to orders in ranked solutions, i.e. solutions which were not filtered out. I think that changing the implementation to use all() instead of ranked() could resolve this problem. This would make it consistent with how solutions themselves are stored.

Acceptance criteria
  • store fee policies for all orders which are part of at least one proposed solution, for each auction
  • update db docs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in crates/autopilot/src/run_loop.rs around lines 552-565 and inspect the auction post-processing step that stores fee policies. Compare the order selection used there with the solution storage path, then run the relevant autopilot or database tests. Done means fee policies are stored for every order in at least one proposed solution for each auction and the database documentation is updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, database
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.