How arbitrage works in DeFi

In DeFi, MEV and arbitrage go hand in hand: they take advantage of price differences. In this post, we’ll explain the relationship between arbitrage and MEV, how traders are made vulnerable to them, and how you can keep yourself protected.
What is arbitrage?
Arbitrage at its simplest, is a strategy where an investor or entity buys and sells an asset in different markets, taking advantage of the difference in price between those two markets.
Arbitrage basics for the crypto market
Diving a bit deeper into the definition of arbitrage: the price of an asset varies depending on which exchange you are buying or selling it from. With more than 250 crypto exchanges, that means there’s a lot of opportunity for traders to make a profit from finding assets with different prices.
Why are prices higher or lower on different exchanges? The simple reason is demand. If one exchange has many buyers and not many sellers, the price will go up. While on another exchange, if there are lots of sellers but not many buyers, prices will fall.
But there are other reasons for price discrepancies.
-
Liquidity: Exchanges with higher trading volumes tend to have more stable prices, while lower-volume exchanges can experience more pronounced price swings.
-
Geography: Demand for specific cryptocurrencies can vary across regions, leading to price differences. So a typical example: USDC on an exchange based in Asia will have a fractionally different price on a European exchange.
-
Fiat Currency Differences: The use of different fiat currencies on different exchanges can also contribute to price discrepancies. Explaining this further, exchange rates for fiat currencies as well as where the buyer is in the world, create added variation in the price of an asset.
-
Market Fragmentation: As we touched on earlier, there are a lot of crypto exchanges, meaning there are more opportunities for arbitrage.
Let’s take a look at how arbitrage can take place using Ethereum as an asset.
Ethereum arbitrage
Ethereum is one of, if not, the most available crypto assets to buy. That means there are lots of opportunities to find price differences.
Below you can see a screenshot of the price of Ethereum across different exchanges.

Using the above example, a buyer looking to buy cheap and sell high would buy from Coinbase, where the price of Ethereum is $1,920.16, and then sell on DigiFinex, where the price is $1,934.41.
If the buyer bought 1 whole ETH, they would have made around $14 just by exploiting this difference in price - minus fees of course.
But this is just one type of arbitrage. In the next section we’ll look at other ways of exploiting price differences.
Common types of arbitrage in crypto
There are lots of different ways of exploiting arbitrage across crypto markets. Here are the most common.
There are lots of different ways of exploiting arbitrage across crypto markets. Here are the most common:.
Triangular Arbitrage
Triangular arbitrage exploits price differences between three currencies. Traders identify profitable conversion paths between assets. This creates a circular trading opportunity with net gains.
A trader might convert USDC to Bitcoin first. They would then swap Bitcoin for Ethereum. Then they’d convert Ethereum back to USDC at a profit.
Cross Exchange
Cross exchange arbitrage buys assets on cheaper exchanges. Then sells them on platforms with higher prices. This strategy capitalizes on price gaps between different marketplaces.
A trader might buy ETH at $1,920 on Coinbase. They would then sell it for $1,934 on DigiFinex. These price differences create a $14 profit opportunity.
Spatial
Spatial arbitrage exploits price differences across global locations. Different regions show varied demand for cryptocurrencies. Local market conditions create these price gaps.
A trader might buy Bitcoin in a low-demand country. They would then sell in countries with higher demand. These opportunities exist due to regional economic factors.
MEV
MEV arbitrage manipulates transaction ordering for profit. Searchers extract value by placing strategic trades around yours. They force price movements that benefit them.
A typical example is sandwich attacks. Bots place transactions before and after yours. This manipulates the price during your trade, taking value from you.
Yield
Yield arbitrage moves assets to higher-interest platforms. Traders spot differences in interest rates across lending protocols. They shift funds to maximize returns.
A trader might spot Aave offering 3% APY. They would then move funds to Compound's 5% APY. The 2% difference becomes an immediate profit opportunity.
Flash Loans
Flash loans arbitrage uses uncollateralized temporary loans. Traders borrow large sums, execute profitable trades, then repay instantly. No collateral needed makes this unique.
A trader might borrow 100 ETH through flash loans. They would buy underpriced tokens on one exchange. Then sell higher elsewhere before repaying the loan.
There are lots of other types of arbitrage that can take place in crypto, but for now we’re going to turn our attention to MEV.
How MEV exploits arbitrage opportunities
MEV or “maximal extractable value” is, as we explained earlier, a unique feature to the world of crypto. Whenever you make a trade, buy or sell an NFT, or lend tokens to a liquidity pool, people can see what you’re trading and take advantage.
To date, billions of dollars worth of value has been lost on Ethereum, making it problematic, particularly for new users. There are several key ways MEV can take place on Ethereum:
Frontrunning - Frontrunning occurs when an MEV bot monitors the mempool for a trader’s pending transaction. Spotting a potential trade, the bot quickly duplicates the users transaction so that they can be the one to get the tokens or the opportunity that the user detected.
-
Backrunning - When a trader places a large trade that artificially inflates the price of an asset on an AMM, an MEV bot can backrun the trade and profit from the arbitrage.
-
Sandwich attacks - Sandwich attacks occur when a user’s transaction gets trapped, or “sandwiched,” between two hostile transactions — one before and one after. As a result, the original transaction executes at a much higher price than necessary, leading to an inflated price for the original trader and a profit for the malicious trader placing the two extra trades.
For all of these types of MEV, speed is vitally important. That’s because the length of time a pending transaction remains in the mempool can be seconds.
That means searchers often rely on bots to execute MEV attacks.
Most DEXs are vulnerable to MEV arbitrage
MEV is possible because validators are free to order blockchain transactions as they see fit in order to maximize their profits. Proof-of-stake (PoS) blockchains such as Ethereum use parties known as “validators” in order to ensure that the consensus rules of the blockchain are followed by all participants.
Validators get randomly selected to add the next block to the blockchain. In this process, they determine what transactions are included in the block, and in what order.
When you submit a transaction on Ethereum, it does not immediately get added to the next block. Instead, it first goes into the “mempool” which is the collection of all pending transactions. Validators then pull transactions from the mempool and add them to the next block when it’s time for it to be built.
Here is where the opportunity to extract value through MEV comes in.
Validators are not required to add transactions to the block in the same order that they were submitted by users, so searchers can pay validators a fee to order transactions in a specific way. For example, they can pay to have their transactions come first if they want to frontrun someone else, or they can pay to have their transactions come right after a specific transaction if they want to perform a backrun — both are types of MEV.
But while MEV is common place, it’s not impossible to avoid.
Traders can protect themselves with MEV blockers and defensive measures, but MEV is still a threat on most DEXs.
Let’s take a look at how it works.
Frontrunning
Here’s a simplified look at how frontrunning works.
-
Monitoring Pending Transactions: A bot monitors the mempool looking for a pending transaction it can create an arbitrage opportunity. It finds one: User A intends to swap 2 ETH for $BOB tokens
-
Selecting Profitable Transactions: The bot identifies this amount of ETH would create a significant impact on token price. This means there’s an opportunity for arbitrage: exploiting the difference between the pre-trade and post-trade states of the token being traded.
-
Placing A New Transaction: The bot submits its own transaction paying higher gas fees to be positioned before user A’s transaction in the block. As a result, user A received fewer tokens than they were hoping for. Meanwhile the bot has sold the tokens at an elevated price, earning itself a healthy margin in the process.
If you’re interested in understanding frontrunning more fully, check out our frontrunning blog post.
The bottom-line: consequences of MEV arbitrage
MEV is a controversial subject in the crypto space. While some argue it helps keep markets running more smoothly, CoW DAO takes the position that MEV is a bad thing.
Sophisticated actors familiar with the mechanics of blockchains like Ethereum have developed numerous ways to exploit users with less knowledge.
MEV makes money for searchers, block builders, and Ethereum validators at the expense of regular users, especially beginners who don’t know how to protect themselves. As of the time of writing, sandwich attacks on AMMs and aggregators alike generate almost $1 million in profit for searchers each week.
Over time, persistent MEV erodes market confidence as traders realize they are at a constant disadvantage to more sophisticated actors.
While in many parts of DeFi, arbitrage opportunities can feel inevitable, there are a few spots where MEV arbitrage can’t hurt your trades.
Meta-DEX aggregator solution to MEV exploitation
You’ll no doubt be familiar with a decentralized exchange, or DEX. These are the backbone of the DeFi world, acting as a bedrock underpinning all trades.
DEX aggregators meanwhile, bundle all the DEXes up into one platform to allow a user to search all the DEXes looking for the best price for their trade.
A Meta DEX Aggregator is different again. As the “meta” name implies, they aggregate DEX aggregators. This leads to better liquidity coverage across more venues, while still providing users with a single interface for their trades.
Why would you want to aggregate an aggregator? There are many reasons. The first is that DEX and DEX aggregators have strong points and weak points. Some are better for large trades, others for small trades, and some are better across certain trading pairs. There’s a good bit of research on the strengths and weaknesses of DEX aggregators here.
A meta DEX negates those weak points, by routing your trade to the DEX that is strong for the type of trade you’re trying to do. In essence, a Meta DEX takes the guesswork out of finding the right DEX for your trade.
Another key reason for a Meta DEX Aggregator is that it can integrate features not found on the DEXes themselves. Such as MEV protection: one of the baked in goodies found in CoW Swap.
We dive into that, and the other features of what makes CoW Swap so special.
The CoW Swap approach
CoW Swap was built from the ground up with MEV protection in mind.
CoW Swap relies on 3 main features to keep you safe from MEV:
-
Delegated Trade Execution - On CoW Swap, all transactions are routed through a decentralized network of “solvers” — independent algorithms that are responsible for finding the best execution price for your trades. That means those MEV bots we spoke about earlier can’t see your trades, and therefore, can’t arbitrage your profits away.
-
Coincidence of Wants - Any time you submit a trade on CoW Swap, solvers start looking for the best way to execute it. Before checking on-chain liquidity, solvers check other incoming orders on CoW Swap’s current batch auction to see if your trades can be matched peer-to-peer. If someone wants to do a trade in the opposite direction to what you want, you are paired together, and the whole thing is executed gas free!
-
Uniform Clearing Prices - On other DEXes, whenever a lot of people want to trade the same token, each of those trades are treated individually, meaning each trade is executed at a slightly different price. This allows MEV to creep in, as trades can be slotted in between that queue of swaps to make the most money. On CoW Swap, if the same people are making the same trade, as long as they are in the same batch auction, each order will be settled for the same clearing price when it goes on-chain. This leaves no room for MEV attacks since all prices are the same, meaning that transaction ordering becomes irrelevant.
Want to understand CoW Swap’s unique feature set more fully? Check out this blogs:
FAQs about MEV arbitrage and DeFi
What is arbitrage in DeFi?
Arbitrage in DeFi is a practice where traders exploit price differences of the same asset across different exchanges or protocols. While proponents claim this "helps markets reach equilibrium," in reality it's a form of value extraction that preys on regular users and diverts value from the ecosystem into the pockets of sophisticated technical operators.
What's the relationship between MEV and arbitrage?
Arbitrage is one of the most common forms of MEV (Maximal Extractable Value). MEV represents all the ways value can be extracted from users by controlling transaction ordering. Arbitrage specifically refers to exploiting price differences, but the underlying mechanics of exploitation are similar.
Is arbitrage necessary for DeFi to function?
No. This is a myth perpetuated by those who profit from it. While some price discovery mechanism is needed across platforms, the current exploitative form of arbitrage is not the only way to achieve this. Alternative mechanisms could internalize these processes or distribute the value to users rather than extracting it from them.
How can I protect my trades from MEV attacks?
Use platforms with built-in MEV protection like CoW Swap, which routes transactions through decentralized solvers. Choose exchanges that implement uniform clearing prices to prevent transaction ordering manipulation. Consider meta-DEX aggregators that combine multiple exchange benefits with MEV protection. Private transaction methods that keep your trades off the public mempool until execution can also help. Use tools such as MEV Blocker to protect your transactions.
How does CoW Swap’s approach to MEV differ from other DEXes
CoW Swap uses delegated trade execution through decentralized solvers, keeping transactions private from MEV bots. It employs Coincidence of Wants to match peer-to-peer trades before accessing on-chain liquidity. CoW Swap implements uniform clearing prices so all similar trades execute at identical prices. These three features work together to eliminate transaction ordering advantages that MEV exploiters typically rely on.
Why are prices higher or lower on different exchanges?
Liquidity also plays a role: exchanges with more trading volume have more stable prices. Geographic factors and fiat currency differences can cause price gaps. Market fragmentation, with many exchanges worldwide, creates more opportunities for price differences.
What are common types of arbitrage in DeFi?
Arbitrage strategies exploit price differences to make a profit. Traders use these strategies to buy low on one platform and sell high on another. Some strategies are automated using bots for speed.
-
Cross-exchange arbitrage: Buy on one exchange, sell on another.
-
Triangular arbitrage: Trade between three currencies for a profit.
-
Spatial arbitrage: Exploit price gaps across different regions.
-
MEV arbitrage: Manipulate transaction order for profit.
-
Yield arbitrage: Move assets to platforms with better returns.
-
Flash loan arbitrage: Use instant, no-collateral loans to exploit price gaps.


