Aligning the solver competition with the goals of the CoW DAO

Note: This is an informal post aiming to describe at a high level the key challenges we are facing with the design of the solver competition, and how the main goals of the CoW DAO should guide us in this design. The views/statements made in this are personal, and are NOT meant to be taken as a protocol-wide statement or anything like that.

Goals of CoW Protocol

At a high level, CoW Protocol strives to achieve the following:

  1. Competitiveness. Provide the best possible prices for its users, and in particular, prices that are at least as good as the users can find in any DEX.

  2. Fairness. Provide uniform exchange rates for all orders trading the same token pair.

  3. Decentralization. Provide such prices in a decentralized way.

  4. Protocol viability. Ensure the long-term viability of the protocol and its token.

To achieve the above goals, CoW Protocol is using Batch Auctions. A batch is simply a set of orders that is grouped together such that all orders within the batch are considered “simultaneously” for execution, i.e., whichever orders are picked will be executed at the same Ethereum block, using a uniform clearing prices mechanism (one price per token). This already addresses goal (II).

In order to ensure best possible prices for the user orders within each batch, an optimization problem needs to be solved in order to identify the orders that are to be executed. This optimization problem is a maximization problem that, roughly speaking, asks to maximize the user utility as well as the protocol’s so-called economic viability (i.e., fees collected minus costs incurred). Pinpointing the set of constraints and the objective function in this optimization problem is a highly non-trivial task, and it has to be carefully designed so as to ensure that the aforementioned goals are achieved.

Moreover, in order to address goal (III), as well as (I) and (IV), the protocol has set up a Solver Competition acting as a decentralized price-finding mechanism. In this competition, decentralized entities, known as Solvers, compete against each other in order to provide the best possible execution for the trades within each batch. More precisely, each Solver proposes a solution to the optimization problem, and the best solution (i.e., highest objective value) is selected as the winner of the batch. Such a competition poses even more challenges, as Solvers need to be incentivized to participate in the competition, to provide their best possible solutions while ensuring that no solver misbehaves or intentionally manipulates the competition in their favor.

Designing the Solver Competition

The Solver Competition must be set up in such a way so that it can address the goals mentioned above. We highlight a few key issues:

  1. Solver diversity. In order to provide the users with the best prices, it is crucial to have multiple solvers that explore the available liquidity. This will allow the protocol to have access to an ever expanding collection of onchain liquidity and as a result, provide its users with the best prices. Moreover, it is in the DAO’s best interest to properly incentivize solvers to continuously work for the protocol, regardless of network conditions, as this will ensure reliability of service. Designing the rewards structure so that this is achieved is one of the major challenges.

  2. Taking full advantage of batching. Solvers should be incentivized to take advantage of batching as much as possible so as to both achieve price improvements via CoWs as well as reduce execution costs.

  3. Truthful reporting of best possible solutions. In order to maintain a fair and robust competition, as well as ensure that solvers will consistently be providing the best possible solutions, rules should be set in place so that the solvers’ best strategy would be to compute and truthfully report the best solution for the users, and provide mechanisms so that solvers are punished if they misreport their solutions on purpose, or attempt to manipulate the competition.

  4. Reporting the “correct market prices” (this can be viewed as an extension of point (3) above). By using batch auctions, the protocol allows for orders to be settled peer-to-peer, without the need for external liquidity (e.g., AMMs). This means that external price information might not exist in certain solutions submitted by solvers. In such cases, mechanisms must be set in place so as to prevent solvers from reporting prices that are not accurately representing the correct market price of a token.

  5. Balance between fees, costs and rewards. As stated in goal (IV), there should be a long-term plan of viability and profitability for the DAO. The Solver Competition is directly related to this, as the Solver rewards, as of now, are paid in COW. Roughly speaking, the goal should be to encourage solvers to find viable solutions (i.e., not overspending), as well as invest sufficient amounts of tokens strategically so as to increase market share, and then aim to maintain a reasonable balance between fees and rewards, so that all 3 main players are content: users, solvers and the DAO.