cowprotocol / cowprotocol/services

chore: Drop support for market orders in `solvers` crate

Open
#2,611 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

Background

Dependent on https://github.com/cowprotocol/services/issues/2543

Remove class::Market order class variant and remove Fee::Protocol variant from the solvers crate domain.

Details

Since we dropped the support for legacy market orders, once we make sure

  1. All solvers are moved to use solvers api directly (dropped support for "legacy" solvers)
  2. All solvers use limit orders for quotes

we can safely remove class::Market type of orders since those are not used anymore. Also, handling the fee could be simplified by removing the Fee::Protocol variant.

This task does not capture making these changes to the solvers API. This can be a separate PR since API changes should be kept plain and simple so we can revert them if needed.

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 the solvers crate by checking issue #2543 and confirming that all solvers use the solvers API directly and limit orders for quotes. Search for class::Market and Fee::Protocol and trace their usages before removing the variants and updating affected code. Done means the legacy order and protocol-fee variants are gone without changing the solvers API.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.