Welcome, Crypto Dummies!
If you’re new here, this substack is focused on educating those that know nothing about crypto and blockchain technology.
If that’s you, you’re in the right place!
Our goal is to educate newcomers and arm them with the tools they need to succeed in the crypto space.
Today, we’re going to touch on a topic that can cause some confusion, Miner Extractable Value.
What is MEV?
MEV stands for Miner Extractable Value or Maximal Extractable Value. This has been a recurring topic of discussion surrounding Crypto Twitter lately, and something not many people know enough about.
We know that Miners are responsible for selecting and adding transactions into blocks. Similarly, miners can often rearrange transactions on a block, in a method that is beneficial to them. This is Miner Extractable Value.
But how does it work exactly?
Typically, a block is only added to a chain after validators agree upon the order of transactions in the block and reach a consensus. That block is created by a Miner, and they are in full control of where they decide to place transactions in a block. MEV allows miners to play with the order of transactions in a way that is beneficial to them and allows them to profit off a transaction while asking for a higher gas fee.
Miners and Validators optimize for-profit and tend to select and order transactions based on the highest gas price and transaction fees. Miners can leverage their ability to reorder transactions to extract additional profits from users.
MEV is typically associated with miners, but it is not proof-of-work nor Ethereum exclusive.
The majority of MEV extraction can come from arbitrage traders, bot operators, and miners actively seeking and identifying MEV opportunities on-chain and capitalizing on them in different ways. MEV exists on nearly all smart contract-enabled blockchains, including validators in proof-of-stake-based systems and optimistic rollups.
Let’s break it down a little further.
Miners are responsible for sequencing transactions and deciding the order/which transactions to include in blocks and their order
Miners can profit off of this in 2 ways
PGA (Priority Gas Auctions): Selling scarce block space to non-miner MEV extractors in exchange for ridiculous transaction fees.
Capturing MEV directly through reordering, including, or censoring transactions to profit from on-chain liquidation or arbitrage opportunities.
‘Searchers’ play a significant role in the MEV game. These are the Defi traders and bot operators who seek MEV opportunities and different ways to capture value.
Searching can profit in 2 different ways:
By bidding excessively high gas prices in on-chain PGAs to have their transactions strategically placed on blocks by miners.
By expressing transaction ordering preferences to miners off-chain using novel extraction tools like Flashbots.
‘Searchers’ begin their MEV journey by monitoring the blockchain with bots and automation tools for potential profit extraction opportunities. Searchers will bundle transactions in a method designed to materialize their MEV extraction goal when mined. Once a bundle is created, searches will send this to a miner through off-chain networks like Flashbots MEV-Geth. This allows them to avoid public transaction pools and they can save on gas fees when their transactions are rejected directly by miners.
When a miner includes a searchers bundle/transaction in a block, the MEV process is complete. The transactions are confirmed on-chain and the searcher has successfully extracted some amount of value from other traders on the network.
The most common MEV methods.
Front-Running
Front-running is as straightforward as it sounds. This involves getting a transaction out ahead of a pending transaction. Typically, searchers will run front-running bots to scan the network for large orders on decentralized exchanges. This can give the ‘searcher’ or miner a prediction of the future price action of the coin being bought and they push their transaction through first to secure a nice profit
Sandwiching
Sandwiching is a variation of front-running where the searcher will strategically place two transactions. Typically one before and one immediately after another user’s pending transaction. This allows the searcher to manipulate price action. They can identify a token that is about to be bought and make a trade to push the price up, then sell immediately after a buy order has further increased the price.
Let’s take a second to look at things from a miner’s perspective. If a miner notices a large transaction that causes a slippage in price, this creates an opportunity to earn thousands in profit. The miner can ‘sandwich’ their trade between their buying and selling transactions to inflate the gas fee and make an instant profit at practically no additional cost.
Back-running
Back-running refers to getting a transaction ordered second in line, or immediately after a pending transaction. Searchers can employ back-running bots to monitor new token pair listings, and place a buy order immediately after the initial liquidity to buy as many tokens as possible. This leaves only a small amount for other traders to buy, and once their orders have been completed, the back-running bot can dump tokens at a higher price to secure the profit.
Liquidations
Liquidators are searchers that specialize in extracting MEV through liquidations of over-collateralized loans. Liquidators run specialized bots to monitor the network for transactions that present liquidation opportunities. These bots can run either front-run or back-run transactions to be the first to liquidate a loan. Searchers can extract value from unsuspecting borrowers by liquidating their loans before they can repay the debt, and selling the borrower’s collateral for profit.
Time-Bandit Attacks
Time-bandit attacks are specific to miners and can allow them to extract value from previously mined blocks. When MEV is high enough in comparison to block rewards, miners can destabilize the consensus to capture value in older blocks. Let’s say a miner notices a 30k arbitrage opportunity in block 105 that is 3 blocks deep. Instead of mining the latest block, the miner can choose to re-mine blocks 105, 106, and 107, to capture the arbitrage opportunity and have a longer chain than the original block miner.
Miner extractable value or MEV presents many different opportunities for miners and searchers to create a profit off of on-chain data and analysis. These opportunities can create hundreds of thousands in profit from the parties participating and actively looking for methods to profit. Blockchains that rely heavily on smart contracts can create the perfect environment for those looking to profit off of MEV opportunities.
That’s it for today’s post crypto dummies! Hope this helps break down MEV and hopefully gives you a little more insight.
Stay tuned for next week’s post!