cowprotocol / cowprotocol/services

feat: Remove uniform clearing prices

Open
#3,396 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tech-debt
Dominant language
Rust
Stars
318
Forks
189
Avg merge
2d 2h
Merged PRs (30d)
121

Description

Problem

With the new mechanism described in CIP-67, uniform clearing prices are removed from the mechanism. But these clearing prices are currently still required on APIs and they are post-processed with derived values stored in the data base (e.g. executed fee amounts).

Suggested solution

Uniform clearing should be removed from the code base.

Additional context

Uniform clearing prices do appear in a few places and it is not obvious how easy it is to remove them.

  • They appear in the autopilot<>driver API. Removing them would be a breaking change but should be easy to handle.
  • They appear in the driver<>solvre API. Removing them would be a breaking change and a bit more difficult to handle.
  • Fee amounts are currently used in the solver accounting.
  • There is at least one external dependence in the form of the front end using derived fee amounts to show to users.
  • They might appear in other places as well. Generally, though, it should be safe to work with executed amounts instead of clearing prices for
Acceptance criteria
  • Uniform clearing should be removed from the autopilot.
  • Uniform clearing prices should ideally also be removed from the reference driver. But that has lower priority.

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 uniform clearing prices through the autopilot<driver API and the driver<solvre API, then inspect solver accounting and the derived fee amounts consumed by the frontend. Map each occurrence to executed amounts and check the CIP-67 mechanism before changing the interfaces. Done means uniform clearing is removed from the autopilot, with the reference driver addressed if feasible and affected consumers accounted for.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.