cowprotocol / cowprotocol/services

chore: Switch to computed scores across the autopilot

Open
#3,415 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tech-debt track:maintenance
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 Solution struct
  • Use a single field for the score (currently, we have both Solution.score and Solution.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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.