cowprotocol / cowprotocol/services
chore: Switch to computed scores across the autopilot
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 318
- Forks
- 189
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 121
Description
Background
The recent combinatorial auction implementation highlighted the need to stop relying on scores provided by solvers and to start using our computed scores instead. While the combinatorial auction logic already relies solely on computed scores, other parts of the autopilot—such as the legacy MaxScore implementation and database storage—still use solver-provided scores.
Once the combinatorial auction cutover (#3387) is complete, we should fully transition to computed scores:
- Compute the score during construction of the
Solutionstruct - Use a single field for the score (currently, we have both
Solution.scoreandSolution.computed_score) - Remove the score from the solver API, so solvers no longer need to provide it
- Store the computed score in the database
Ref: https://github.com/cowprotocol/services/pull/3397#discussion_r2105811873
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing construction of the Solution struct, then inspect the solver API and database storage paths described in the issue. The work is done when the autopilot uses one computed score throughout, solvers no longer provide a score, and the computed value is stored in the database.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend, database
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100