Arbitrage Opportunities in DeFi
Crypto Basics

Arbitrage Opportunities in DeFi

The DeFi sector comes with many arbitrage opportunities for traders. Let's understand different arbitrage methods available in this industry and how they work!

Arbitrage Opportunities in DeFi

İçindekiler

DeFi, like any emerging market, is inefficient. Inefficiency leads to financial opportunities. Arbitrage is one of these financial opportunities, and it is a particularly attractive one because of its good risk-to-reward ratio.

However, anyone thinking arbitrage is free and easy money — hold it right there! DeFi arbitrage requires strong technical skills and excellent market knowledge. In this article, CMC Academy will give you an overview of:

  • The kind of arbitrage opportunities existing in DeFi.
  • How each arbitrage opportunity works (including an ELI5 explanation of each).
  • An assessment of how difficult they are to execute.
  • An overview of the risks involved in DeFi arbitrage.

Join us in showcasing the cryptocurrency revolution, one newsletter at a time. Subscribe now to get daily news and market updates right to your inbox, along with our millions of other subscribers (that’s right, millions love us!) — what are you waiting for?

What Is Arbitrage?

Investopedia defines arbitrage as "the simultaneous purchase and sale of the same asset in different markets in order to profit from tiny differences in the asset's listed price. It exploits short-lived variations in the price of identical or similar financial instruments in different markets or in different forms."
In simple terms: arbitrage is when you can sell an asset for more in one market than you bought in another.

In DeFi, arbitrage comes in many different flavors. Let's explore the different arbitrage opportunities in detail.

Bridge Arbitrage

One arbitrage opportunity arises from price differences across different blockchains.
For instance, a few months ago, several opportunities popped up for ETH on the Ethereum mainnet and the Arbitrum layer-two. You were able to bridge ETH from the mainnet to the L2 and receive between 0.4% and 0.6% ETH on Arbitrum — risk-free and pure ETH, not Wrapped Ethereum.
Such an opportunity can arise from a shortage of assets (ETH in this case) in the ecosystem. Too much ETH may be locked up in staking contracts, or ETH imbalances in liquidity pools may lead to the market being ready to pay a premium for it.

How Does the Arbitrage Work?

In this case, you simply had to bridge ETH from the mainnet to the layer 2. It was as simple as that. After the seven-day waiting period to bridge back from Arbitrum to Ethereum, you could lock in your gains on the mainnet again.

ELI5

Imagine bridge arbitrages like the same currency in two different countries. Say both countries use the dollar, but country B doesn't have enough dollars and needs more. It is ready to pay you a bit extra if you get some dollars across the border (the bridge) to relieve the shortage.

Difficulty

Very low. However, bridge arbitrages are very rare. You also need to keep in mind that bridging to wrapped assets does not fall under this arbitrage, since it adds a layer of risk.

Stablecoin Arbitrage

A recent example of stablecoin arbitrage was the brief de-peg of USDT. USDT dipped below its peg following the panic after the LUNA collapse. Arbitrageurs bought USDT when it was below its dollar peg and redeemed it for dollars, allowing them to pocket a small but risk-free profit. In this case, the mechanism worked exactly as designed, as stablecoins are designed around arbitrageurs keeping the balance between the on-chain asset and its real-world equivalent.
Stablecoin arbitrage can get more complex, too. For example, a stablecoin may be traded at a slightly different price on one DEX compared to others — requiring the trader to factor in gas costs for their arbitrage. Stablecoin arbitrages can also happen across different pools. In that case, arbitrageurs take advantage of the pool imbalances.

How Does the Arbitrage Work?

In the example of Tether, it was as simple as buying USDT when it was below its peg and waiting a few hours. No bridging or cross-exchange transactions were required: generally the case when a stablecoin trades below its peg.

If a stablecoin trades above its peg, you can short-sell it (on a centralized exchange) or sell the other asset of a liquidity pair (on a decentralized exchange). Say the USDT/USDC pair is imbalanced and 1 USDC buys 1.02 USDT. You can sell your USDC for USDT and pocket the two cents difference once the pair is balanced again.

ELI5

Stablecoin arbitrages are pretty self-explanatory and equivalent to fixed exchange rates in the real economy.

Difficulty

Low. The most difficult aspect is assessing the risk concerning the de-peg. In Tether's case, the market was getting (unnecessarily) worried about Tether's ability to redeem USDT for dollars. However, the collapse of LUNA showed that arbitrage with algorithmic stablecoins is significantly riskier and can fail.

Yield Arbitrage

Yield arbitrage is arbitrage between different assets and/or exchanges. For example, you could borrow in DAI for 5% and lend your DAI for 10% (most likely on a different platform). The 5% difference would be your profit margin.

Such a spread is unlikely, though, and differences are most likely to arise across different DeFi and CeFi platforms. You may borrow from a DeFi protocol, but lend on a CeFi custodial platform or vice versa.

How Does the Arbitrage Work?

Another example would be borrowing from a platform like Aave. Say you borrow ETH for 1% on Aave and lend it on a custodial platform, like BlockFi, for 1.5%. The 0.5% is your profit.

ELI5

This arb is also fairly easy to understand. A (not so realistic) real-world example would be having a farm and hiring workers. The workers cost $1,000 per day, and the profit from their output is $1,100.

Difficulty

Easy to do in theory but also rare, and these opportunities disappear quickly. Lending and borrowing rates are dynamic. An easy example like the one above would be arbed away almost instantly. These opportunities are also being increasingly automated away by protocols.

Asset Arbitrage

Bridge arbitrages are a subset of asset arbitrage, i.e., the same asset being priced differently across exchanges, ecosystems or countries. The most famous example of asset arbitrage is Sam Bankman-Fried, the CEO of FTX, doing Bitcoin arbitrage in Japan. In short, SBF was buying BTC in the United States and selling it in Japan at a higher price — although it was much more difficult than that. You can see the full story in this interview:

A recent example of that is the imbalance in price between ETH and staked ETH in protocols like LIDO. Although staked ETH should theoretically be the same price as ETH, it is trading at a discount and thus offering a possible arbitrage opportunity (not financial advice).

How Does the Arbitrage Work?

Asset arbitrage is usually done with bots that simultaneously buy and sell assets across different exchanges. However, since openly available bots can be unreliable and are available to anyone, an edge can only be attained through coding your own asset arbitrage bot.

ELI5

Similar to bridge arbitrage, a real-world equivalent is the same asset having a different worth across different exchanges. This is often impossible for different reasons, like regulations and capital controls.

Difficulty

An arb like the one SBF did is very complex and capital-intensive, which is why it was so profitable! A simple cross-exchange arbitrage is simple and can be done automatically, which is why it is easy to pull off. Anything in between is possible as well, depending on the arbitrage.

Trade Batching and Flash Loans Arbitrage

This is a more complex version of asset arbitrage. Arbing between different centralized exchanges is straightforward, but real inefficiencies and arbs often hide across different DEXes and liquidity pools. Arbitrageurs can take advantage of those by batching trades in one transaction, allowing them to execute all of them successfully or not at all.

In other words, trade batching works like a "fill or kill" order on an exchange or an IF-THEN logic in an Excel sheet. Traders can build profitable risk and reduce the risk of their different legs becoming unprofitable, since the transaction is only triggered if all the conditions are fulfilled. Flash loans add another layer to that and allow traders to execute these arbs without much capital.

How Does the Arbitrage Work?

For example, you borrow ETH in a flash loan from one protocol, buy a protocol token on one decentralized exchange, sell it on another exchange and repay your ETH loan. All of this happens in one transaction, which is only executed if your conditions are met. Needless to say that this kind of arb requires excellent coding and smart contract skills.

ELI5

Nansen provides a nice explanation of this type of arbitrage. Imagine you buy comic books from one dealer and immediately sell them to another dealer while having a friend that travels with you to loan you cash on hand. However, you only get into the car and start your endeavor if you know your conditions are met (this is the trade batching).

Difficulty

These arbs are highly complex and not run by hand. You need to code smart contracts that are triggered by a certain execution logic to execute these arbs profitably.

Frontrunning Arbs and Miner-Extractable Value

Finally, there are arbitrage opportunities thanks to the transparent nature of the blockchain. For instance, Ethereum miners can see transactions in the mempool and front run them by executing the same transaction with a higher gas price. Regular users can also do this and, to make things even more complex, front runners can be front run by the initial party.

How Does the Arbitrage Work?

Say you want to execute the arb from the previous example, but a miner front runs you and executes your transaction with a higher gas price. You can cancel your own batched transaction with a simple transaction with a higher gas price. The opposite is also possible: if you know how to monitor blockchain transactions and can write a bot to scan the mempool, you can front run others users.

ELI5

Picking up on Nansen's previous example: you are off to buy and sell comic books to different dealers, but find out someone else is already doing your deal. You turn around and head home. While you lose money on the gas, you don't have to make the transaction, which has now become unprofitable.

Difficulty

Needless to say that this is the most complex arb. CMC Academy has a full guide to front runners and MEV explained.

DeFi Arbitrage Risks and Conundrums

By now, you understand that DeFi arbitrage is more complex than it initially sounds. The easy deals are often gone quickly, and the complex stuff is not just "free money." Moreover, there are risks to DeFi arbitrage as well:

Smart Contract Risk

Smart contracts across different exchanges can fail or be exploited. Your funds are at risk if you interact with a potentially faulty smart contract, even after your transaction has been executed.

Gas Risk

Fluctuating Ethereum gas prices can lead to arbitrage opportunities becoming unprofitable. That makes batched transactions necessary because these transactions are only triggered upon a certain gas price. However, the arb may be gone until the transaction is put through.

Asset Price Risk

As the example of UST showed, a stablecoin can also be surprisingly unstable. The degree of risk related to asset arbitrage is often subjective. While one person may be convinced that USDT could never fail, someone else may not be so sure. That is partly the reason why stablecoin de-pegs occur in the first place.

Conclusion

You may now think: "arbitrage... sounds good but doesn't work."

That is true and also not true. Easy arbitrage opportunities are certainly difficult to come by and disappear quickly. Doing arbitrage in DeFi systematically requires constantly monitoring blockchain transactions, coding knowledge to write well-functioning bots and skill in interacting with different exchanges and blockchain ecosystems. In other words, DeFi arbitrage is best left to professionals.

This article contains links to third-party websites or other content for information purposes only (“Third-Party Sites”). The Third-Party Sites are not under the control of CoinMarketCap, and CoinMarketCap is not responsible for the content of any Third-Party Site, including without limitation any link contained in a Third-Party Site, or any changes or updates to a Third-Party Site. CoinMarketCap is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement, approval or recommendation by CoinMarketCap of the site or any association with its operators. This article is intended to be used and must be used for informational purposes only. It is important to do your own research and analysis before making any material decisions related to any of the products or services described. This article is not intended as, and shall not be construed as, financial advice. The views and opinions expressed in this article are the author’s [company’s] own and do not necessarily reflect those of CoinMarketCap. CoinMarketCap is not responsible for the success or authenticity of any project, we aim to act as a neutral informational resource for end-users.
3 people liked this article