Skip to content

Arbitrage theory

TL;DR:

Arbitrage is the practice of taking advantage of an inefficiency between two markets. Let’s imagine a bottle of water costs $1 in one market, and $2 in another. If you buy the bottle for $1 and sell it for $2, you’ve made a profit of $1. Arbitrage is the practice of doing this at scale, often targeting a large volume of trades with small margins.

Arbitrage

Here is a diagram detailing a simple, example arbitrage trade:

Diagram

As you can see, you start with 200 USDC, buy 1 SOL on market1, and sell it for 205 USDC on market2. You’ve made a profit of 5 USDC. On Solana, there are many, many markets, made by a lot of market makers. Some examples include:

  • Raydium
  • Meteora DLMM
  • Phoenix
  • Orca
  • etc…

To access all of these trades, we use Jupiter’s routing system, which gives us the best price for each token by potentially routing through multiple markets.

Onchain example

Here is an example trade from v2, where the bot arbed 414 USDC for 449 UDSC, making a 30+ USDC profit!

For a more in-depth explanation on exactly how the onchain system works, please check out the HARBR reference.