What Is MEV and How Do Flash Loan Arbitrage Bots Use It


Miner Extractable Value (MEV) is the amount of money/value that miners make by excluding, including, and reordering transactions in any block they are able to mine. It is also known as Maximum Extractable Value and Proposer Extractable Value. 

Although called Miner Extractable Value, the process allows mainly DeFi traders to benefit. Almost all of the current MEV-related activity is driven by non-mining traders. 

Through various strategies, like structural arbitrage trading on Uniswap and other DeFi platforms, traders make a profit, and miners indirectly benefit from transaction fees. 

In this article, we will explore how MEV works and what strategies traders use to earn income from it. 

How Miner Extractable Value (MEV) Is Derived?

How Miner Extractable Value (MEV) Is Derived?


Blockchain networks like Ethereum, Binance Smart Chain, and others are immutable ledgers, and their security is ensured by a decentralized network of computers, known as “miners.” 

Miners add new blocks to the blockchain after the validators reach a consensus and approve a transaction. They select transactions from a pool of unconfirmed transactions, called mempool, and put them in a certain block. The number of transactions is limited for each block, and miners decide which transactions to choose first. 

As miners are financial-incentivized, first they usually select and include transactions that would bring them higher profits. The amount of profits depends on gas prices, otherwise called transaction fees. 

The process allows miners to extract additional profits from users via reordering transactions. Interest that a miner earns this way is called miner-extractable value (MEV). This is a simple method of MEV similar to bidding which in Ethereum is called “Priority Gas Auction” (PGA).

There is also another form of MEV available for anyone; scanning mempool to see liquidation and arbitrage opportunities. 

When such an opportunity comes along, miners can replace the transaction they chose with a new one with a higher fee. 

Implementing MEV strategies is unavailable for most Ethereum users, as it requires profound data analysis and comprehensive knowledge of smart contracts. MEV involves transactions with complex logical solutions to allow earning income. 

Although MEV is the most commonly used term concept, most forms of MEVs are executed by third-party bots. By scanning the mempool, bots can change the transaction fee they pay to miners and rearrange transactions. 


Miner Extractable Value

What Are Flash Loans and How Bots Can Use MEV Extraction Strategies to Benefit from Them? 

One of the most common DeFi opportunities that bots are looking for to make a profit is flash loans. A bot is constantly running, searching for possibilities and it acts based on the smart contract to carry out the profitable transaction. 

Flash loan is a decentralized finance service, which has been growing at a fast rate. Flash loans allow users to get non-collateralized loans, and this type of token borrowing has been becoming more popular. It doesn’t exist in traditional finance and offers lots of benefits such as convenience and facilitation of DeFi activities. 

Through flash loans, traders without much capital can access arbitrage, liquidation, and asset swapping opportunities. They can discover price differences among tokens between decentralized exchanges (DEXes), borrow tokens by flash loans, and maximize their profit. 

Flash loans follow the logic written in smart contracts. The general rule is that borrowing assets and their return must be executed in one transaction. 

There are 5 main steps in a flash loan transaction:

  1. Flash loan providers (Decentralized platforms such as Aave, and UniSwap) send requested assets to users
  2. The network calls pre-designed operations
  3. Getting the loan, users interact with other smart contracts and put the borrowed assets to work
  4. After the execution is done, users need to return the borrowed assets
  5. Flash loan providers check their balance, and if the loan isn’t returned, the smart contract reverts the transaction immediately. 

Traders can make more profit using the concept of MEV together with executing flash loan strategies. Bots can monitor for large trades once they appear in the mempool, and use the received data to their benefit.

According to the code written by developers, the bot can check for profit. 

Bots can use MEV data in different ways, including arbitrage trading via flash loans, flash swaps, NFT purchases, collateral liquidations, and more. The latter is a feature that allows any ERC 20 tokens to be swapped for any other token without the need to execute more than one transaction and pay extra fees.

What Is Flash Loan Arbitrage?   

The investment strategy where people purchase assets on one market and sell them on another one to make a profit due to price differences is called arbitrage. Price differences can be small but can increase profits considerably when dealing with large amounts. 

Allowing instant loans without collateral, enables users to execute arbitrage strategies and multiply the amount of earned interest.

In addition, using the concept of MEV to be aware of price valuations and act accordingly, opens up new revenue opportunities. 

Is MEV Practicing Popular Today? 

The usage of MEV is becoming more common along with the growing popularity of DeFi. MEV can be created each time a user interacts with a blockchain and smart contracts provide a wide range of possible activities. 

According to an MEV transactions explorer, MEV-Explore, the amount generated from MEV transactions surpassed $580 million since January 1, 2020. Most of the transactions with extracted values were executed on UniSwap. 

While the major upgrade of the Ethereum blockchain protocol, Eth 2.0 is expected to launch in 2022, MEV opportunities will continue to exist, as miners will continue to decide on the sequence of transactions in the block. 


As MEV practices are getting better and blockchain networks continue to grow, it’s becoming more common and at the same time more complex to benefit from the maximum extractable value.  

Along with this, the number of flash loan arbitrage bots that effectively use MEV to gain profits due to logical strategies is increasing, and the competition is getting stronger. 

Building a bot that generates MEV revenue is a complex process that requires writing a smart contract based on data analysis and deep knowledge of blockchain networks.