Towards Fairer DEXs on Ethereum
This article is a summary of the talk @fleupold_ presented at Devcon VI.
- DeFi has been plagued from the start by Maximal Extractable Value (MEV), which causes great harm, as traders lose large sums daily due to a lack of safe, fair, and efficient markets
- Many are unaware of the issue as they use AMMs without noticing the toxic MEV happening behind the scenes
- A fair market should protect from the dangers of MEV — but, currently, decentralized exchanges are not fair to their users because they settle multiple transactions in the same block at different prices
- In order for DeFi to reach its full potential, we must fix MEV. We can start by designing DEXs that enforce the principal of “one price per token per block”
Towards Fairer DEXs on Ethereum
DeFi has experienced immense growth since the launch of Uniswap V1 in 2018, yet Decentralized Exchanges (DEXs) only make up 0.03% of the Global Forex market.
DeFi has a lot of room to grow, but in order to achieve its full potential, it must first ensure its markets are fair — which means fixing MEV.
The art of designing markets
Alvin Roth, a world-renowned academic who won a Nobel prize in economics for his work on matching methods, has proposed that any market requires at least three things to function correctly:
- Thickness — a large enough number of buyers and sellers need to be brought together;
- Safety — participants should be incentivized to truthfully reveal their preferences;
- The ability to overcome congestion — market participants should have the means to make satisfactory choices when faced with a variety of options
While DEXs can rely on Ethereum scaling as a way to overcome congestion, protocols can help increase market thickness and safety. Market participants must honestly express their trading preferences to ensure a safe market.
Building safety on top of AMMs
A market is not able to succeed if it is not perceived as fair. Safe markets are fairer to the least sophisticated participants because they are simple and more efficient.
The current issue with DEXs is that they are susceptible to MEV, and therefore inherently unsafe. When a user submits a transaction on Uniswap, they need to add a discount on the fair market price called slippage tolerance. This communicates how much volatility a user is willing to accept for a given trade — set it too little and your trade will not go through (which in turn costs ETH), set it too high and your trade will be vulnerable to an MEV attack.
The root cause of MEV on Ethereum is that one asset can have many different prices in the same block. Let’s take, for example, block 14673043, where a whopping 11 trades of the ETH/USD pair were performed in a single block with eight different prices. When prices depend on intra-block ordering, the market can become unsafe.
Providing one price per token per block is the solution to ensure fairness in the market. Instead of executing the transactions sequentially one after another, batching transactions together ensures a uniform clearing price so each block has a consistent price. The root cause of the majority of MEV in the market is that a single asset can have many different prices, one price per token per block solves this. It is a crucial principle that must exist, for a safe market to function effectively and reduce the overall MEV captured back to its users.
How do CoW Swap batch auctions work?
With CoW Swap, traders do not send raw Ethereum transactions to be settled directly on-chain. Just like on Uniswap, a user shows intent to trade a token pair but on CoW Swap this is done without submitting a transaction to the mempool. Instead, a trader provides a signature to show the intent of trading a token pair. Trader intentions are combined with on-chain liquidity such as AMMs and RFQs. This ensures the thickness of the market and that there is sufficient liquidity for trading.
CoW Protocol aims to find the uniform clearing price and the best execution path where demand equals supply. Batch builders are required to find the best path for the batch by optimizing for maximum user surplus. A permissionless competition allows for distributed solving based on different heuristics and algorithms. The best solution for a given batch is then rewarded in the form of $COW.
For example, the traders below (Figure 5) are exchanging $FOLD for $USDC, and vice versa. A Coincidence of Wants (COW) is formed because the users can directly trade against one another. The remainder of the trade is swapped on Sushiswap and Uniswap. By matching COWs together the overall saving for the batch was $2300 ($800 from reduced LP fees and $1500 in reduced price impact as the majority of the trade was not routed through a DEX).
The future of DEXs on Ethereum
DEXs on Ethereum have evolved at an immense pace, but there is still a long way to go. Market safety is a key component in making DEXs fairer for everyone.
CoW Protocol along with batch builders can create a liquid and safe market for the average crypto user. Traditional finance models do not work in a decentralized world and the crypto community needs to work together to encourage MEV minimization.
The current market share of the global trading volume is tiny in comparison to what is possible. It is mutually beneficial for everyone in the Ethereum ecosystem to work together and grow the Ethereum TVL and take a higher market share in the global trading volume.
To find out more about the future of DEXs, watch Felix Leupold’s talk from DevCon VI.
About CoW DAO
CoW DAO is an open organization of developers, traders, market makers and many more community members aligned with its vision. CoW DAO is focused on fair and decentralized trading systems — in particular, building, maintaining and advancing the CoW Protocol. CoW Protocol technology powers a network of traders and solvers, enabling trustless and efficient peer-to-peer trading. Leveraging batch auctions as a key concept uniquely positions CoW Protocol as native trading infrastructure for discrete-time settlement layers like Ethereum and enables fair and accessible trading to its users.
Check out our website https://cow.fi/
🐦 Twitter| 📒 Documentation| 💬 Discord | 📊 Analytics | 📸 Snapshot