CoW Swap seeks to solve the MEV problem in decentralized trading

Using batch auctions in CoW Swap, users sign “trade intent” in an off-chain message that sets a limit price

article-image

Alena Demidyuk/Shutterstock modified by Blockworks

share

A coincidence of wants, Felix Leupold explains, is “an economic phenomenon where one party would like to purchase an asset that another party wants to sell, and the other party wants to buy another asset that the first party wants to sell.”

Enter the creation of the CoW protocol, built on the notion of two parties with opposite interests. 

The advantage is that the trading parties can forgo the complications of trading into another medium of exchange, like money, and instead trade directly.

Leupold, the technical lead at CoW Swap, explains the trading mechanism’s advantages on the 0xResearch podcast (Spotify/Apple), allowing for more efficient trading and, according to Leupold, mitigating the problem of MEV.

Due to the “Cambrian explosion” of a vast variety of tokens in the DeFi space, market liquidity is highly fragmented, Leupold says. To create liquidity between the wide variety of token pairs, market makers need to “step in and provide liquidity,” he says. 

If instead, a “holistic approach” can look at the “entire preference expression of the world” once per block, Leupold says, “you can re-aggregate that fragmented liquidity space and find those coincidences of wants.”

Importantly, such an arrangement cuts down on MEV — or maximum extractable value — attacks, where traders incur losses by being “sandwiched” or front-run by opportunistic bots. “Traditionally, if you want to trade token A for token B on Ethereum, you go directly to an [automated market maker] interface or a DEX aggregator,” he says. 

“The algorithm will find you the best on-chain route for your trade,” he says, and “give you back a transaction that you, with your MetaMask account, will submit to the blockchain to execute that trade.”

The problem takes place because of an “asynchronous aspect,” Leupold says, as time passes between receiving the “optimal route from whatever API you’re using” and the transaction being sent to the public mempool to be mined.

“During that time,” he explains, “prices can change,” and MEV actors can extract profit at the expense of traders. 

Batch auctions

Using batch auctions in CoW Swap, the user instead signs “trade intent” in an off-chain message that sets a limit, Leupold explains. “I want to sell token A for token B, and here’s my limit price. But I don’t care exactly how it is executed.”

The user then hands off the intent to “solvers,” Leupold says, a “decentralized network of matching engines.” They compete to find the best execution path at the time that the order is being made valid, he says.

As opposed to individual trades, orders are aggregated into batches, Leupold says. “All the trades that are placed into the API, within a 30-second window roughly, are placed into the same batch.” The solvers that find the optimal trade solution then receive the right to execute the batch.

“All these risks, these complexities of managing your own transaction,” Leupold says, “are now taken care of by a professional entity.” 

Podcast host Dan Smith observes that the solution sounds a lot like MEV-Boost, where builders work to solve transactions for proposers, but Leupold says the process is exactly the opposite in effect.

“If there are two people trading the same asset in the same batch,” he explains, “then the protocol enforces that there is only one price per token per batch.”

The two trades would be cleared “at exactly the same price,” Leupold says. “There’s no concept of first come, first serve or some kind of ordering, fair ordering. There’s just uniform price clearing, one price per token per batch.” This method removes “all kinds of MEV,” according to Leupold.

On CoW Swap, he says, “if there’s two people trading the same asset, you actually need to have a uniform price clearing, so [there’s] no difference between buy and ask.”

Unsophisticated users who don’t know how to “boost” their way to priority over others in the public mempool can be protected by the CoW Swap mechanism, Leupold says, and “not have to worry about all these games that are being played in the Dark Forest.”


Get the news in your inbox. Explore Blockworks newsletters:

  • Blockworks Daily: The newsletter that helps thousands of investors understand crypto and the markets, by Byron Gilliam.
  • Empire: Start your morning with the top news and analysis to inform your day in crypto.
  • Forward Guidance: Reporting and analysis on the growing intersection of crypto and macroeconomics, policy and finance.
  • 0xResearch: Alpha directly in your inbox. Market highlights, data, degen trade ideas, governance updates, token performance and more.
  • Lightspeed: Built for Solana investors, developers and community members. The latest from one of crypto’s hottest networks.
  • The Drop: For crypto collectors and traders, covering apps, games, memes and more.
Tags

Upcoming Events

Industry City | Brooklyn, NY

TUES - THURS, JUNE 24 - 26, 2025

Permissionless IV serves as the definitive gathering for crypto’s technical founders, developers, and builders to come together and create the future.If you’re ready to shape the future of crypto, Permissionless IV is where it happens.

Old Billingsgate

Mon - Wed, October 13 - 15, 2025

Blockworks’ Digital Asset Summit (DAS) will feature conversations between the builders, allocators, and legislators who will shape the trajectory of the digital asset ecosystem in the US and abroad.

recent research

Research

article-image

Luke Barwikowski took to Twitter to raise awareness about the threats against him and his family

article-image

David Chaum’s ecash in the 90s offers insights into balancing priorities in DeFi today

article-image

The forthcoming stablecoin was praised by BitGo’s Mike Bleshe as an advancement in “institutional-ready digital assets”

article-image

Chronicle’s Niklas Kunkel talked to Blockworks about the raise and why he’s prioritizing research

article-image

Sponsored

DESK isn’t just another trading platform — it’s redefining what’s possible in on-chain trading

article-image

The real strength of tailored AMMs might lie in their capacity to cultivate deeper loyalty and engagement within niche communities