Blog → Solana MEV Bots: A Detailed Explanation

Solana MEV Bots: A Detailed Explanation

Victor Olanrewaju
Last Updated:
April 14, 2024
Published:
April 14, 2024


Table of Contents

TL;DR

  • What is MEV?: Maximal Extractable Value (MEV) is the maximum profit validators can achieve by manipulating transaction order in block creation.
  • Why Solana?: Solana offers cheaper fees and faster transactions than other blockchains. MEV is important on Solana to block attacks without any manual intervention. 
  • Function of MEV Bots: These bots automatically find and execute profitable trading opportunities by monitoring transactions.
  • Finding MEV Bots: You can locate MEV bots on platforms like GitHub, with specific examples like Jito Labs' backrun Arb bot which operates on Solana DEXes such as Orca and Raydium.
  • Risks and Caveates: Potential scams and transaction delays are notable risks. Network congestion can also affect the success rate of arbitrage strategies.
  • Common Strategies: Common strategies include arbitrage across different DEXes and sandwich trading, which involves front-running and back-running trades.

Maximal Extractable Value, or MEV for short, might not be a familiar concept to every participant in the blockchain ecosystem. However, that is fine as this article will look at what MEV entails. But the focus here will be on MEV bots on Solana, their importance, associated challenges, impact on transactions, and many more.

Receive a Custom Newsletter for the Coins You Follow

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

What is an MEV and Why is It Relevant?

Simply put, an MEV is the maximum value validators can get by adding, omitting, or reordering transactions to optimize profits during the creation of a block. While this might still sound complex, let’s give an example. 

Suppose a validator notices a pending transaction in a block. So, instead of approving the transaction immediately, the validator submits a personal transaction which has a higher fee, to progress faster than the initial transaction. That said, let’s move to explaining Solana and its sensitivity to MEV bots.

Solana: An Introduction

Solana prides itself as a decentralized platform that brings “blockchain to the people.” Unlike many other blockchains, Solana offers cheaper fees and faster transactions than its competitors.

With the blockchain, developers can scale applications in no time, and users can process an incredible number of transactions per second. MEV bots are sometimes termed controversial.  But for Solana, this feature is important to block attacks without any manual intervention. 

Apart from that, the existence of these bots has helped prevent outages which Solana is predominantly known for. However, there are other functions of these bots on Solana which will be discussed later in this piece.

Understanding Solana MEV Bots 

MEV bots are a bit different from MEVs, and the disparity is simple. Typically, validators handle MEV transactions manually. However, MEV bots do not use the traditional method. Instead, it automatically searches for trading opportunities on the blockchain and executes the orders automatically. 

When it comes to transaction ordering or execution, MEV bots have some impact. For instance, a validator can maximize profits or revenue by creating an opportunity to intercept a large order by buying the same token and selling it back at a higher value before the original transaction is executed. There are also other ways MEV bots operate on Solana, and this will be explained much later.

How to Find and Utilize MEV Bots on Solana

Finding MEV bots on Solana can be challenging but with the right research, one can find a good one. Most times, these bots are not free and accessible as developers or users might have paid for them.

However, one place you can find a Solana MEV bot is via GitHub repositories. According to Coinfeeds' in-depth research, Jito Labs offers a backrun Arb bot on Solana. For the uninitiated, the bot is designed to target SOL and USDC traders and uses the Jito mempool. 

DEXes like Orca and Raydium also support the Jito Arb bot. The bot does three major things including:

  • Identifying trades to backrun: Here, the bot keeps an eye on the mempool while watching a ton of pending transactions. During this phase, the bot looks at the size and direction of the trade. For instance, if there is a trade involving a swap of 300 million WIF for 150 USDC, the Jito bot can backrun the transaction. To do this, it has to observe the changes in balance while ensuring that the pair on the DEX shows that some changed 300 million WIF for 150 USDC without throwing the market into imbalance.
  • Highlighting profitable bankrun arbitrage: In this instance, the bots calculate the possible gains on each hop route and compare it with the original size of the trade. To maximize profits, the bot chooses the route with the highest potential profit to backrun.
  • Carrying out the arbitrage trade: The last step for the Jito bot is to execute the transaction. The bot can do this with a decentralized lending protocol if the user does not have capital. This way, it can borrow USDC or SOL as a flashloan. After this, it can execute the arbitrage route, repay the flashloan, and tip the validator involved. 

Irrespective of the profits involved, there are risks associated with using MEV bots on Solana. One of them is the potential scam as anyone who offers to code you a bot might not be legit and siphon your wallet.

Another is the possible delay in the backrun transactions. If the Remote Procedure Call (RPC) nodes do not respond fast, the transaction might be delayed or not executed.

However, there are tips for running Solana MEV bots successfully, which include:

  • Ensure your bot is ready to submit transactions at any opportunity. 
  • Create an on-chain program that reduces the state of latency.
  • Make sure you fulfill the user-agent requirement and developer register to access faster processing of transactions.

MEV Bots on Solana: Strategies and Techniques

There are different way MEV bots functions on Solana but the most popular are arbitrage on Decentralized Exchanges (DEXes) and sandwich swaps.

Arbitrage on Solana DEXes with MEV Bots

Trading on Solana DEXes like Jupiter, Orca, or Raydium is one of the most popular ways of using MEVs. As you probably know, these exchanges have their respective liquidity pools. 

One way this system works is by looking for price differences between the same markets on different pools and executing the trade to profit from them. For example, a token can be cheaper on Jupiter but has a higher value on Raydium. So, the bot can buy the token on Jupiter and sell it for more profits on Raydium.

However, it is important to note that a high percentage of arbitrage on Solana fails as the network might sometimes be congested. For example, the Solana network recorded a non-vote transaction failure of 76.8% because many MEV bots engaged in spamming arbitrage transactions.

Solana failed non-vote transaction rate

Though the matter has not been attended to yet, the Foundation behind the project noted that it would address the situation soon.

Sandwich Trading

Sandwich trading on Solana can either be frontrun or backrun. In this process, the MEV bot searches for transactions without any digital exploitation and uses the same trading pair to execute transactions.

For a sandwich trade to be successful, the attacker has to exchange a certain amount of tokens in the frontrun, and swap the same amount in the backrun. This usually happens within seconds.

Let’s give a quick example. Assuming an MEV bot searches and buys 20000 USDC before a user transaction with 500 SOL, the user’s transaction makes the USDC cheaper. Therefore, the bot can make a quick profit from the transaction when the sale goes through.

But not all MEV bot transactions end up in profits. Sometimes, traders lose to the strategy. For instance, a trader bought $8.9 million worth of WIF in a liquidity pool. However, the bot filled the order at a price 1,400% higher, making the trader lose a whopping 92% of his investment.

However, using the same WIF memecoin, another trader made a staggering $1.7 million in profits. In January 2024, the trader employed 2fast, a Solana MEV bot, and swapped 700 SOL for 490,000 WIF. He then swapped the same amount of WIF for 19,035 SOL, making a total profit of $1.73 million.

The Role of Tools in Facilitating MEV Bot Transactions

While some argue that MEV bots are bad, others believe that they are necessary. Regardless of the disparity, here are the roles tools like Jito Labs play in MEV bot transactions.

  1. As a liquidity staking platform, Jito offers MEV rewards in successful transactions, helping to mitigate the effect of harsh market conditions.
  2. The platform enhances network efficiency by solving crucial MEV extracting challenges.
  3. The growth of Jito improves the network health of a blockchain like Solana.
  4. Jito’s involvement in MEV bot transactions means that Solana’s liquid staking sector remains strong despite Lido Finance’s exit.
  5. Lastly, Jito is involved in encouraging the adoption of Decentralized Finance (DeFi), and improving on-chain activity.
Jito Labs’ process in MEV bots transactions

Controversy and Debate Around MEV Bots

The same way MEV bots can be profitable for traders is the same manner some traders see the tool as a harmful one. Ethically, MEV bots provide a balance between the fundamentals of decentralization and making profits. 

But some do not see it that way. For those on the other side of the divide, an activity like frontrunning or backrunning questions the integrity of the participants involved. According to their arguments, these activities are similar to market manipulation and should be stopped.

However, there has been a response to this viewpoint from Jito. A few weeks back, Jito Labs, which is the largest validator on Solana, pulled out the mempool function because of some negative comments about sandwich attacks. According to them, some traders earned millions of dollars in profits at the expense of others who lost money due to the activity. 

Despite Jito’s decision, bots are still active on Solana. However, there have been some restrictions as a Reddi discussion explained how bots who pay more to take profits were sanctioned. But that does not imply that MEV bots have been on Solana. 

As of this writing, RPC on Solana wallets still exists. Therefore, MEV bots remain present since they offer some form of volume on the blockchain.

The Future of MEV Bots on Solana

In the future, MEV bots may continue to exist on Solana despite some drawbacks. However, there has to be a way to create ethical standards for the use.  For instance, the Solana network needs to address the risks of centralization and censorship

There is also a need to create an alternative model that would not be at the expense of individual traders. Therefore, transparent decision-making and government models should be put in place to curb some of these alleged manipulations.

Beyond that, Solana can provide funding for MEV-related research as this can benefit the network in the long run. Also, clear community engagement about the topic could help improve overall activity in the ecosystem as users would be informed about the pros and cons of the bots.

Case Studies and Notable MEV Bot Events

Although there have been different scenarios where MEV bots make significant profits or losses, the one mentioned above where a bot made $1.7 million for a trader remains the most notable one. 

However, there are implications for this activity. For instance, using MEV bots can result in astonishing losses or gains in the highly volatile cryptocurrency market. Therefore, traders might need to be on the lookout so as not to fall victim to MEV attacks. At the same time, developers should be careful about building inefficient bots that could capitulate traders’ capital.

Final Thoughts

In conclusion, it is necessary to understand the place of MEV bots in the market either as a developer or a trader. When successfully executed, these bots can be termed a good innovation.

However, users also need to consider the risks involved. With these, there should be a balance between transparency, accountability, and growth in the MEV bot development space. Besides that, stakeholders need to address the concerns raised. One of the ways to do this is by providing educational content, and including the community in active engagement on the subject.

Receive a Custom Newsletter for the Coins You Follow

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.