Do CoWs slip-age less?
In this article we use on-chain data to compare slippage on 1inch, 0x, and CoW Protocol.
Background: What is slippage?
Did you know that almost 50% of trades you make on a DEX or DEX Aggregator don’t get settled at the price you see in the UI? This, my friends, is because of slippage!!
Slippage can be defined as the difference between the quoted price and the execution price [Ref]. Prices are always fluctuating on DEXs — and if a DEX cannot fulfill your trade at the price it originally quoted, slippage tolerance allows it to submit your trade within a range of prices that you’ve pre-approved. This way your trade doesn’t get reverted just because the price changed by a small margin.
Trading fairly on AMMs is a difficult challenge to solve, even for aggregators. They don’t want to offer you prices they can’t achieve, but they also want to show the best price possible in order to get you to trade with them.
But what if you claim, “I have the quickest finger in the metaverse, I’ll execute my quotes as soon as I see them”? Unfortunately, this does not save you.
The biggest cause of slippage is when two people want to exchange the same token pair at the same time. Because of the way AMMs work, the person who trades first will always get a better price than the person who trades second [Ref].
And that’s where slippage tolerance comes into play. All DEXes have it, and you can usually find it in the settings. It is a parameter the trader can use to set a price range they would be satisfied with when making a trade, as can be seen in Figure 2.
Slippage can be classified into three types:
- Negative slippage → when the user receives a worse price than that quoted
- Positive slippage → when the user receives a better price than that quoted
- Zero slippage → when the user receives the same amount as the quoted price
If you’re trading 0.1 ETH for 192.7 DAI with a 0.50% slippage tolerance, you’re saying you would be willing to accept almost $1 less for your 0.1 ETH, i.e. a minimum of 191.8 DAI, almost $1 less for your 0.1 ETH. This case is categorized under negative slippage.
Another important thing to consider when setting your slippage tolerance, is the presence of bad actors whose sole purpose is to exploit your slippage tolerance. Once you sign a transaction and it’s placed in the public mempool, you and your DEX have no control over it. At that point, an MEV attacker can instantly place a trade right before yours that pushes the price to your maximum slippage tolerance, so that your trade can still go through, but at a much worse price than you were quoted.
These types of actions are referred to as MEV attacks. I won’t go into detail here about what they are, how they work and what different types of attacks there are, but let’s just move on with the knowledge that it’s possible for others to exploit your slippage tolerance and gain profit from it. If you want to know more about MEV, refer to the Ethereum Foundation documentation on MEV.
Visual exploration
Slippage frequency
When analyzing slippage across DEX aggregators, the first natural question is: how frequently does slippage occur? As you can see, the majority of trades across aggregators are settled with zero slippage, while the remainder of trades vary by aggregator.
For 0x, we can see that the remainder is dominated by negative slippage trades, with 33% of the trades being negative slippage and 17% being positive slippage trades.
In the middle, you can see 1inch, which differs greatly from the others in two aspects:
- It has more trades settled with zero slippage than the others at roughly 68%.
- The remainder is mostly negative slippage trades (at 31%), with only around 1% of positive slippage trades for users.
The reason why 1inch differs so greatly from the other two is due to their business model. By direct vote of their governance system, all positive slippage generated on 1inch is distributed to both the 1inch Network Treasury and user referral rewards. As a result, their positive slippage is turned into zero slippage for their users.
CoW Swap, on the other hand, offers the most positive slippage out of the three with 36% being positive slippage, while just 15% is negative. Reasons for this increase of positive slippage could be longer wait times to settle orders and Coincidence of Wants (also known as CoWs).
Slippage tolerance
Another intriguing aspect of our research is how the previously mentioned slippage tolerance values are chosen by users on their preferred aggregators. Because these values are usually round, we’ve divided them into five categories: 3%, 2%, 1%, 0.5%, and others.
The default slippage tolerance values for each platform are:
- 0x — 1% (previously 3%) [Matcha — 0.5%]
- 1inch — 1%
- CoW Swap — 0.5%
Users rarely modify the default slippage on a given platform, as evidenced by 0x, where the majority of trades had a slippage tolerance of 3% (the default slippage for that platform). The majority of remaining 0x traders used a slippage of 1% or 0.5%. These trades are mainly coming from Matcha, a UI controlled by 0x, which had 1% and 0.5% default slippage values throughout 2021. It is worth mentioning that 0x has since adjusted its default slippage value to 1%.
The default slippage tolerance on 1inch can also be clearly understood from the most popular category: 1%. However, traders there appear to be the most likely to change their slippage tolerance, as seen from the “others” category, which increases to 32% for 1inch.
It is clear that CoW Swap’s default slippage value is 0.5%, with nearly 74% of trades being settled that way. A more intriguing finding, however, is that CoW Swap users appear to deviate from the default 0.5% slippage tolerance value more frequently than 0x users, as the “others” category increases from 7% to 21%. It’s also worth noting that CoW Swap has no 3% slippage tolerance trades at all.
Users that set a low slippage tolerance risk having their trades reverted in the hope that they will get a better price — and reverted transactions can be quite costly. This is not an issue for traders using CoW Swap, however. That’s because CoW Swap users don’t sign and execute trades immediately on the blockchain — instead, they declare their trade intent through a signed message and are not charged if the transaction fails.
Slippage distribution
From the previous sections we are able to observe how slippage frequency and slippage tolerance have an impact on other components of this exploration as well. More specifically, if we start looking at the slippage histogram between -10% and 10%, we can see that depending on the default slippage tolerance of each aggregator, the main part of the distribution stops at the default value from the settings.
For 0x, the distribution is almost evenly distributed on both sides, with a slightly larger increase on the negative slippage side. This is reasonable considering the prevalence of negative slippage trades compared to positive slippage trades, as seen previously.
On the other hand, because of their heavy negative and zero slippage percentages, the distribution of 1inch is skewed to the left.
Whereas, for CoW Swap, we can see the impact of the most popular default slippage tolerance value of 0.5%, which stops the negative slippage distribution much earlier than the other aggregators, skewing the distribution much more to the right.
All of the aggregators share upticks at particular points [-0.5, -1, -2, and -3], which may be due to transactions where slippage reached its maximum as a result of MEV activity. More information about those specific types of trades will be provided in the MEV section below.
This pattern is considerably more pronounced when the data is segmented by trade size. We divided trades into 6 different groups according to their trade value, which ranged from less than $10 to more than $100,000. Here, it is clear that the distribution is smoother the lower the trade size, whereas the higher the trade size, the more noticeable the spikes. The most probable reason for this is that potential value to be exploited from slippage tolerance is much greater for high value trades than for low value ones. In the end, 1% of $100k is a lot more than 1% of $1.
Slippage and MEV
To better understand these specific slippage tolerance upticks at the particular points we mentioned, we need to consider MEV attacks. To do this, we used a measure called slippage tolerance exhaustion. It was first used by 0x [Ref] and it is defined as
slippage tolerance exhaustion = slippageslippage tolerance
When slippage exhaustion gets close to 100%, it indicates that the trade settled exactly at the user’s lowest acceptable price, which is what was intended by an MEV attacker. When the negative slippage distributions are shown using this metric, an intriguing pattern appears. We now chose all the DEXes MEV exhausted trades to reason why were all the trades 100% exhausted.
0x did exactly that, and examined a subset of over 5,000 Matcha trades with the largest slippage for potential value extraction. Then, using a naive heuristic of classifying MEV attacks, they found that over 90% of trades with slippage in the interval from 0.49%, to 0.5% were exploited, whereas other trades were very rarely affected.
Meanwhile for 1inch, we took two different subsets of 25 trades each from their almost 100% MEV-exhausted trades. The analysis found that almost all of them were part of Flashbot bundles, and around 50% of those trades were attacked for MEV.
In comparison to its competitors, analysis of the near 100% slippage exhausted trades for CoW Swap shows that none were exploited for MEV. The uptick at the -0.5 slippage mark for CoW Swap seen earlier in the visualization and the uptick at 100% slippage exhaustion are likely due to the nature of CoW Protocol Batch Auction decentralized competition which enforces uniform clearing prices.
Conclusion
Considering the large differences between DEXs, with each of them having their own pros and cons, it is very important to keep the slippage footprint of DEXs and DEX aggregators in mind when considering where to execute your next trade.
Based on the data analyzed in this article, we can see that depending on where you place your trade:
- The frequency by which you get positive slippage will vary widely → You will get positive slippage 30% of the time you trade with CoW Swap, compared to 15% with 0x and 1% with 1inch
- Failed transactions costs are often the reason you are willing to get a bad price, but this should not be an excuse → CoW Swap allows you to be more risk averse with slippage as you won’t end up paying a fee if the trade fails/reverts
- You never need to worry about being exploited by MEV attacks → As the data points out, CoW Swap is the best at keeping you away from the dangers of MEV
Now, knowing more about these settings on the various DEXes you use, remember that what you see is not always what you get!
#CoWGMI
References
Author
Gent Rexha Data Engineer at CoW Protocol
Presented the topic at DappCon 2022, full presentation available here
Datasets used
For this analysis we’ve used data from 0x, CoW Swap, and 1inch to calculate the slippage for trades using the worst acceptable price, quoted price, and realized price. You can find the number of trades, specified timeframe and representation of total trades analyzed in Figure 3 below. Data for CoW Swap and 1inch is available in Dune. For 0x, please refer to their blog post.
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