UniswapX is suspected of plagiarism, is CowSwap the future form of Intent’s DEX?

Produced by: DODO Research

Editor: Lisa

Author: xiaoyu

Dan, with all respect. The game was changed long ago by @1inch when they first did high-quality aggregation and @CoWSwap when they pioneered the solver model.

It’s good stuff, but you are not really the first or the second.

—— @Curve Finance

UniswapX was once a sensation but also faced controversy. The most sharp accusation against UniswapX was whether it copied CoWSwap and 1inch. Curve Finance tweeted, “The game was changed long ago by @1inch when they first did high-quality aggregation and @CoWSwap when they pioneered the solver model. UniswapX is good stuff, but it’s not really the first or the second.”

CoWSwap directly pointed out its status as a pioneer of Intent Based Trading. So, what exactly is CoWSwap? What are the differences between CoWSwap and UniswapX? Why do market voices accuse UniswapX of “copying” CoWSwap instead of 1inch fusion?

With the spirit of exploring CoWSwap from its background, mechanism interpretation, data performance, and the 9 product differences with UniswapX and 1inch fusion, let’s investigate what CoWSwap is, how it works, and address the “copying” controversy.

“Thieves” of DeFi Users: MEV Attacks

DeFi users have always been victims of MEV attacks, such as front-running, back-running, and sandwich attacks. The CoWSwap protocol provides MEV protection to minimize users’ MEV losses. Before diving in, let’s briefly understand what MEV attacks are.

Imagine this scenario: You’ve been waiting, and finally, you have the perfect trading opportunity! You open Uniswap, and as the pending transaction completes, you realize that the tokens you received in your wallet are significantly less than expected. You open the block explorer and find out that someone manipulated the price before you bought and quickly sold after you bought, profiting from the price difference. Yes, you have fallen victim to an MEV attack.

MEV attacks occur due to the “asynchronous” nature of submitting transactions to the blockchain. When a user submits a transaction on Ethereum, it is not immediately added to the next block. Instead, it first enters the “mempool,” which is a collection of all pending transactions. Then, validators extract transactions from the mempool and include them in the next block during the construction process. Because the mempool is public, searchers have the opportunity to pay fees to validators to order transactions in a specific way and extract value from users through prioritization.

Image Source: CoWSwap Docs

The Guide of the Dark Forest: CoWSwap’s MEV Protection

Better than the best price. —— CoWSwap

The name “CoWSwap” may seem related to “cow,” but here “CoW” stands for “Coincidence of Wants,” referring to a special way of matching transactions. Specifically, “coincidence of wants” is an economic phenomenon where two people hold something that the other person needs, allowing them to trade directly without a medium of exchange.

In the CoWSwap protocol, users do not need to send a transaction to submit a trade, but rather they need to send a signed order (or transaction intent). This order specifies the maximum and minimum outputs they are willing to receive in the trade within a specific time period. Users do not care about and do not need to know how it is executed. Then, the signed order is given to solvers, who compete to find the best execution path when the order becomes effective. The winning solver will have the right to execute the batch. This also means that the gas required to execute the order is borne by the solver, and users do not need to pay gas in the event of a failed transaction (e.g., if a path satisfying the committed price is not found before the deadline).

The MEV protection of CoWSwap can be summarized as follows:

1. Batch Auctions

When two (or more) traders exchange cryptocurrencies without using on-chain liquidity, a “coincidence of wants” occurs. CoW enables orders to be packaged together in a batch, resulting in efficiency improvements. Specifically, this eliminates on-chain costs such as LP fees, gas fees, and avoids slippage and potential MEV attacks that can occur on-chain using a peer-to-peer off-chain approach.

Leupold, the CTO of CoWSwap, stated that due to the “Cambrian explosion” of various tokens in the DeFi space, market liquidity is highly fragmented. In order to create liquidity between various token pairs, liquidity providers need to “intervene and provide liquidity.” If a coincidence of wants can be found in each block, the fragmented liquidity space can be reaggregated.

2. Off-Chain Solving

By having a third party handle trade orders on behalf of users, the visibility of the mempool is hidden, and all the risks of MEV are borne by the third party. If the third party finds a better execution path, the order will be fulfilled at a better price; otherwise, it will be fulfilled at the worst price as signed. All the risks and complexities of managing trades are handled by professional solvers.

Users only need to express their “transaction intent” and do not need to worry about the execution process. Inexperienced users who do not know how to “boost” their priority in the public mempool are protected by this mechanism of CoWSwap. They do not have to worry about being in the “dark forest.”

3. Unified Clearing Price

If two people trade the same asset in the same batch, the protocol will require that each batch of tokens have only one price. The two transactions will be settled at a “completely identical price”, without the concept of first come first serve. Even if a block has multiple transactions with the same token pair, each transaction will receive a different price depending on the transaction order with the pool. However, the CoWSwap protocol requires a unified clearing price, so reordering is meaningless. According to Leupold, this method eliminates “various MEV”.

The mechanism of CoWSwap is quite novel. It roughly meets the requirements of DEX under the concept of Intent before the concept of Intent was proposed. Various research reports also highly appreciate this architecture. However, it is obvious that CoWSwap is not well-known. When people mention aggregators, they think more about 1inch, etc. Why is that?

We have summarized the disadvantages of CoWSwap, which are reflected in the following three points:

1. Not suitable for inactive tokens

In theory, this mechanism can present better prices to users, but it may also result in users’ losses. For actively traded tokens, the order can probably find “demand coincidence” to optimize the price in the batch. For inactive tokens in trading (assuming ETH here), Solver may complete the transaction with the maximum allowable slippage, even exceeding the slippage caused by a single source of liquidity.

2. Additional protocol fees

For small trades with sufficient liquidity, Cow’s protocol revenue may result in losses for users.

3. Not supporting all tokens

CoWSwap does not support the exchange of all tokens, only those that comply with the ERC-20 standard. Moreover, although some tokens have implemented the typical ERC20 interface, the actual amount received by the recipient when calling the transfer and transferFrom methods will be less than the specified amount to be sent. This can cause problems with CoWSwap’s settlement logic, and $Unibot does not support trading on CoWSwap.

Seeing the Essence through Data: A Closer Look at CoWSwap’s Market Performance

Ideals are always lofty, but reality is bone and blood. Through data, we can explore the market performance of CoWSwap. Combining the advantages of CoWSwap, we will explore the market performance of CoWSwap from the perspectives of MEV resistance, trading volume, market share, and more.

1. MEV Resistance

Compared to sandwich attacks on Uniswap and Curve, the number of attacked transactions routed through CoWSwap is significantly reduced. Compared to 1inch and Matcha, CoWSwap has the fewest sandwich attacks and the lowest proportion of trading volume in 2022.

Research report from on-chain MEV analysis team @EigenPhi.

2. Trading Volume and Market Share

Comparison in the aggregator field. CoWSwap ranks fourth in terms of trading volume, ninth in terms of user count, and fifth in terms of average transaction size. Among them, 1inch ranks first.

https://dune.com/murathan/uniswap-protocol-and-aggregators

Comparison of market share among aggregators. 1inch dominates the market share due to its large user count, accounting for about 70%, followed by CoWSwap with a market share of about 10%. Then comes 0xAPI, Match, and LianGuairaswap. CoWSwap’s market share is growing.

https://dune.com/murathan/uniswap-protocol-and-aggregators

CoWSwap’s monthly trading volume fluctuates greatly. As of September 1st, the total trading volume reached $27.4 billion.

https://dune.com/cowprotocol/cowswap

3. DAO Adoption

1/3 of DAOs’ trading volume occurs on CoWSwap. Because DAOs often need large-scale, MEV-resistant transactions, platforms that can meet the special order requirements of DAOs, such as limit orders and TWAP, Milkman (on July 10th, Milkman was used by AAVEDAO to monitor a slippage of 326.88 wETH and $1,397,184 worth of $BAL into B-80BAL-20WETH). This ratio is still growing, and in August, CoWSwap even accounted for more than half (54%).

https://dune.com/queries/2338370/3828396

4. Balancer Incentives

On March 24th, Balancer proposed [BIP-295] to provide ~50-75% fee discounts for CoWSwap solvers. CoW routing ranks third in terms of trading volume, second only to Uniswap and Curve.

https://dune.com/sixdegree/dex-aggregators-comLianGuairision

“Plagiarism” Controversy

“CoW Swap is the first DEX Aggregator offering some protection against MEV”

—— CoWSwap About

CoWSwap, formerly known as Gnosis Protocol V1, was launched in 2020. It was the first DEX to provide circular trading through batch auctions. UniswapX and 1inch fusion adopted the same architecture as CoWSwap: sign Order – outsource transaction creation to a third party – (incentivize the third party to return MEV to users through competition). When UniswapX was launched, it was accused of plagiarizing CoWSwap. 1inch, when launched, was jokingly referred to as a modified version of CoWSwap.

Today, let’s explore the differences among the three, summarized in nine aspects.

1. Third Party Names

  • UniswapX: filler
  • CoWSwap: solver
  • 1inch fusion: resolver

Responsibilities: Provide solutions for the orders signed by users and package them into a transaction in a block.

2. Execution Process

  • UniswapX: The winning filler of the quote has the priority to execute within a certain period of time, and then conducts a Dutch auction.
  • CoWSwap: Submit all the solutions of the solvers to the Driver for ranking. Once the bidding is over, all the solutions have been submitted and ranked, and the ranking information is announced to notify the top-ranked solution for execution.
  • 1inch fusion: Increase the number of resolvers over time while the price decays.

1inch fusion had only 1 resolver in the first minute, and it was criticized for “resolvers will wait for the price to decrease before executing”. The waiting time for users is extended.

Note: The proposal has been approved, and the number of resolvers has been increased to 10

3. Batch Formation

“Leopold contends that CoW Swap’s design still offers better pricing because it batches trades rather than processes them individually like UniswapX. Batching many different trade requests together provides better MEV resistance, he said.” —— CowSwap CTO

  • CoWSwap: Pack all the outstanding orders on the chain into a batch for a Dutch auction, and combine order matching with CoW.
  • UniswapX: Fillers pick one or more orders for processing through API.

Due to the complexity of orders, CoWSwap needs to pack all outstanding orders into a batch. It is difficult to determine whether the optimal solution can be found within one block time, or even if it exists.

4. Degree of Order Parameterization

  • UniswapX: Users have more freedom (which may bring more complexity) to define parameters, including the decay function of the auction, the initial Dutch order price, etc.
  • CoWSwap and 1inch fusion: Users only need to provide the exchange tokens and slippage. CoWSwap can also set the duration of the order.

5. Different sources of liquidity from third parties

  • UniswapX: Allows any filler to access liquidity sources that are available, including private liquidity.
  • CoWSwap: CoW and external liquidity sources.
  • 1inch fusion: Usually large market makers.

CoWSwap focuses more on finding counterparties at the same time, while 1inch market makers act as resolvers and can choose to execute trades directly. UniswapX also allows professional market makers to participate, potentially solving the criticism that “1inch waits for the price to drop before executing the resolver” and capturing market share from 1inch.

6. Degree of decentralization

  • UniswapX: Completely permissionless, anyone can access unsettled orders through APIs and compete with Reactor and other fillers (unless a specific filler is specified by the user).
  • CoWSwap: Either listed on the whitelist by creating a $1M USDC/COW pool, or listed on the Cow DAO whitelist according to DAO standards.
  • 1inch fusion: The top ten addresses are selected as resolvers based on the amount of $1INCH tokens staked and weighted staking duration. Registration and KYC process are required, and sufficient balance must be maintained to pay for order fees.

Note: CoWSwap is currently in phase 1 authorized by Cow project team; phase 2 requires token staking and DAO voting approval; phase 3 allows anyone to become a solver.

7. Different sources of quotes

  • UniswapX: Allows fillers to provide quotes (RFQ), allowing fillers to initialize the initial price of the Dutch auction.
  • CoWSwap, 1inch fusion: API quotes.

8. UniswapX uses RFQ and considers using a reputation system

  • UniswapX: Allows orders to specify a filler to execute the order within a certain period of time (followed by a Dutch auction), thereby incentivizing fillers to provide quotes to the RFQ system. To limit the abuse of this exclusive right by fillers, a corresponding reputation or penalty system may be introduced.
  • CoWSwap: Rewards the solver with the highest completion rate once a week.

9. Uniswap X introduces cross-chain aggregation functionality (not yet implemented)

  • UniswapX: Can expand to support cross-chain transactions, where exchange and cross-chain are merged into a single action, without the need for the trader to directly interact with the bridge to exchange assets held on the original chain for assets required on the target chain.
  • CoWSwap, 1inch fusion: Still under discussion.

In conclusion

Overall, CoWSwap is an interesting project. Outsourcing orders to third-party solvers for off-chain execution while settling and verifying on-chain aligns with the philosophy of L2 scalability. CoWSwap cleverly enables trading to become a large barter economy, addressing the fragmentation of liquidity and utilizing on-chain liquidity for transactions that cannot be fulfilled by peer-to-peer trading.

One of the requirements for the implementation of Intent is that anyone can act as a Solver to improve efficiency in competition. The architecture of CoWSwap undoubtedly aligns with this. All the risks and complexities of managing transactions are handled by professional solvers. Protected by the CoWSwap mechanism, users don’t have to worry about “walking” in the dark forest. This is consistent with the philosophy of DODO V3, where the funds of liquidity providers are managed by a professional market-making team, without the need to personally consider strategies.

CoWSwap has made good progress in addressing the MEV problem and has also seen an increasing market share under the narrative of Intent. At the same time, it has encountered resistance from protocol fees and lack of support for all tokens in large-scale applications. As pioneers of the solver model, the mechanisms of UniswapX and 1inch fusion are more like innovations based on it. 1inch releases resolvers one by one to connect with professional market makers, while Uniswap’s RFQ system allows users to specify a filler before proposing a solution. We look forward to seeing more innovations in the field of decentralized trading aggregators driven by the CoWSwap framework and expect CoWSwap to have significant and remarkable development.

References

https://ld-capital.medium.com/the-future-of-mev-is-the-future-of-the-crypto-has-the-importance-of-the-mev-track-been-76bb36caf9f4

https://app.aave.com/governance/proposal/?proposalId=267

https://eigenphi.substack.com/p/sandwich-mevs-imLianGuaict-on-cow-swap

https://snapshot.org/#/balancer.eth/proposal/0xd991e9f3c6edd148bd37c600d7ada3d28db1758e3cfd703c02d290f502906f05

https://blog.cow.fi/what-are-cows-on-cow-swap-e72baaa4678a

https://blockworks.co/news/cow-swap-mev-problem

https://swap.cow.fi/#/about

Like what you're reading? Subscribe to our top stories.

We will continue to update Gambling Chain; if you have any questions or suggestions, please contact us!

Follow us on Twitter, Facebook, YouTube, and TikTok.

Share:

Was this article helpful?

93 out of 132 found this helpful

Gambling Chain Logo
Industry
Digital Asset Investment
Location
Real world, Metaverse and Network.
Goals
Build Daos that bring Decentralized finance to more and more persons Who love Web3.
Type
Website and other Media Daos

Products used

GC Wallet

Send targeted currencies to the right people at the right time.