28 Feb, 23

Maximal Extractable Value: Concepts, issues and solutions

maximal extractable value banner
Nathan Lenga

Innovation Lead

Blockchains, like free markets, are replete with inefficiencies. In order for the market to function effectively, entities capture these inefficiencies. This is mirrored on the blockchain through MEV; without this value being extracted, a network and its blocks will not be optimised with respect to profitability. Also known as Miner Extractable Value and Maximal Extractable Value, MEV inevitably exists in every blockchain that supports smart contracts. 

Part 1 of Zerocap’s coverage of MEV will examine the concept through analogies, providing examples of how they can arise and discussing the potential risks associated with various validations as well as miners capturing more value than others.

What is Maximal Extractable Value?

MEV refers to the maximum amount of value that can be extracted from a proposed block through the ordering and sequencing of transactions. The entity proposing the block has complete autonomy over the transactions included and their order. Accordingly, to optimise on additional value within a block, these proposers insert their own transactions in specific places to increase their profitability. Ultimately, Maximal Extractable Value is the additional stream of revenue accessible to miners and validators as they shift their focus from receiving rewards via the blockchain layer to syphoning value off of the application layer as transactors use various protocols.

maximal extractable value

When this idea was first discovered and documented, the revenue was named Miner Extractable Value. The ‘Miner’ feature of MEV was then accurate when Phil Daian introduced the concept in Flash Boys 2.0 back in 2019 as the Proof of Work (PoW) consensus model, which utilised miners to secure the blockchain, dominated the crypto space. However, with Proof of Stake (PoS) blockchains contributing US$ 237.8 billion to the total crypto market capitalisation, the consensus trend is ostensibly shifting towards utilising PoS. Accordingly, MEV has become known as Maximal Extractable Value; this change reflects the name of participators of PoS chains – validators.

The contrasting names can only make MEV more confusing. To understand Maximal Extractable Value in the context of Ethereum, imagine that the Ethereum blockchain is a freight company with a limited capacity to transport cargo with its vehicles. On the assumption that the executive team of this freight company act as rational agents, they will sort the cargo on the trucks and prioritise some goods over others to increase revenue. The content of the cargo, along with the sorting of the freight is publicly available knowledge. This allows third parties to discover nuanced and profitable approaches to order the freight’s load; this primarily benefits the company. To incentivise this, the freight business offers these third parties 5% on the notional value of the strategically organised cargo. With minimal barriers of entry, additional entities sorting the freight’s load for rewards emerge. 

Similarly to this expanding freight sector, the MEV market is full of entities external to Ethereum and other blockchains who are propelled to order transactions to extract as much value as possible. Subsequently, these entities are rewarded with portions of the extracted MEV for their efforts.

Opportunities for entities to extract MEV emerge in a number of different transaction categories. When individuals make a swap on a decentralised exchange (DEX), the slippage they apply to their transaction provides block builders with an opening to extract Maximal Extractable Value. If an arbitrage opportunity arises between two exchanges, block builders will prioritise their transactions over others to profiteer from this market inefficiency. Likewise, if a large borrower position is being liquidated, an entity looking for MEV can exclude certain liquidators’ attempts to purchase the collateral at a discounted price, instead enabling itself to optimise the earnings with this value.

The total realised MEV that has been extracted from the Ethereum blockchain is over US$ 675 million. Notably, it is impossible to determine the exact total of MEV on Ethereum given it can emerge whenever a user interacts with a smart contract. Notwithstanding the sheer importance and size of MEV, most users engaging with any blockchain are not cognisant of the value being captured from their transactions. As a result, Maximal Extractable Value has colloquially become known as the “invisible tax”. Moreover, MEV extraction is not a positive-sum game because the proposers are more profitable; this additional revenue comes directly from everyday participants of the blockchain. Consequently, this intrinsic feature of blockchains is a zero-sum game.

Searching, identifying and constructing strategies to optimise MEV is not an easy task. Specialised coders have created bots with the sole purpose of capturing as much MEV as possible. In a competitive market, these bots are constantly competing for Maximal Extractable Value; this has sparked continuous improvements in the strategies used, resulting in these proposers extracting more value from blocks.

using bots for mev

Using specialised bots to extract MEV might seem unethical given that blockchain participants are detrimented, without this mechanism, the crypto market would fail to be efficient. If validators and block builders ignored the existence of MEV, blockchains will function less effectively. In this sense, a correlation between MEV extracted and the efficacy of a blockchain exists. Using bots can hence be analogised to squeezing the juice out of an orange; more juice extracted equates to a more effective use of the fruit.

ai generated image from dreamstudio
Source: AI-generated image from DreamStudio

How Value is Extracted by Network Participants

Sandwich Attacks

As MEV burgeons and becomes increasingly more profitable, unique opportunities to extract value from network participants arise. The sandwich strategy is notoriously malicious as it takes directly from users trading on the blockchain. As suggested by its name, sandwich attacks see MEV bots insert their own transactions before and after an individual’s transaction (sandwiching it) if it is profitable.

how maximal extractable value is extracted

Most of these extractions occur when a user is making swaps on a decentralised exchange (DEX). DEXs utilise automated market makers that run on a set formula to price tokens with others. More specifically, this function determines values based on the supply of tokens inside of a liquidity pool; this allows MEV bots to extract substantial value from certain trades. Let’s say that Bob is buying 20 ETH with 30k USDC on a DEX at a price of 1.5k USDC per ETH. Due to the volume of his transaction, Bob accepts that he will face an inflated level of price slippage. This is what enables the sandwich attack. Alice, who is running an MEV bot, observes this transaction in the mempool and creates two transactions that are inserted before and after Bob’s trade. Alice’s first transaction buys a sizable amount of ETH, pushing the price up as a result of the AMM’s valuation formula. Notably, the altered price will remain inside the slippage range Bob has accepted. Subsequently, the third transaction sees the MEV bot selling its recently acquired ETH to Bob for USDC at a higher price; the price difference being the bot’s profit. Simultaneously, Bob, knowingly or unknowingly, acquiesces this loss.

Another example can be found in the image below.

an example of sandwich attacks

Liquidation

The borrow and lending DeFi market is another profitable opportunity for MEV bots. This category of protocols allows users to deposit tokens as collateral in order to receive a loan in other tokens. Depending on the DeFi platform’s chosen liquidation threshold, users can borrow an amount of tokens and pay interest on these funds – similar to this process in traditional finance (TradFi). However, with the increased volatility of the crypto market compared to the TradFi market, collateral is at risk of falling below the value of the borrowed tokens. 

When this occurs, protocols look to recoup the borrowed funds by enabling others to liquidate the collateral. The liquidator will purchase the borrower’s collateral at a discount to the market value, initially paying back the lenders before taking the remaining tokens as their profit. This is akin to how margin calls work in TradFi. Evidently, the difference between the market value and discounted price, with the subtraction of satisfying the lenders, provides an MEV opportunity.

Nonetheless, in most situations, these windows remain hidden for short periods of time as all MEV bots monitor blockchains’ mempools. All entities want to make this risk-free profit; therefore, bots tip validators to prioritise their orders. This creates a bidding war in fees – this auction is known as a priority gas auction. As bots are pre-programmed to execute transactions as long as they make a profit, they will increase offered bribes until a single dollar is generated when considering all costs. This deleterious process has seen MEV gas fees reach as high as 11x the price of ordinary gas fees.

Arbitrage

As previously mentioned, markets face inefficiencies. These inefficiencies often manifest themselves in the form of variations in prices across different markets and forums. Traders can capitalise on this spread in what is known as arbitrage. In the Maximal Extractable Value world, arbitraging across decentralised and centralised exchanges is a simple and popular opportunity; accordingly, it has become one of the most competitive markets. Indeed, arbitrage makes up over 99% of all MEV transactions.

If Alice’s MEV bot did not sandwich Bob’s USDC to ETH trade, a discrepancy in price across different exchanges would emerge due to the volume of this trade. An arbitrage focused MEV bot discovers this opportunity and attempts to capture it. Resulting from the competitive nature of these MEV transactions, the bot offers validators a tip to choose their arbitrage transaction. These opportunities can be extremely profitable if acted on efficiently; in this block, an MEV bot made 147 ETH having paid under 16.5 ETH to the miner so as to ensure its transaction was included. This arbitrage trade was made possible by targeting stablecoin swaps. However, other MEV searchers locate this opportunity and attempt to outbid the original bot’s validator bribe to capitalise on this arbitrage trade. With more bots noticing, a gas war similar to that faced in liquidation transactions, can emerge. 

The Centralisation Risk of Maximal Extractable Value

Currently, the MEV extracted represents the lower bound of potential value that can be captured by bots. In this context, more specialised bots equates to additional MEV. Herein lies the risk. If one expert builds the most optimised, effective MEV bot, they will capture more value than others. As more funds are extracted by this program, the expert can set up additional validator nodes, ergo increasing their likelihood of being chosen to mint a block. Evidently, if MEV extraction is not democratised and available to everyone, irrespective of their coding capabilities, blockchains will become centralised in the long run.

ethereum is a dark forest
Source: Ethereum is a Dark Forest by Paradigm.xyz

The Inevitability of Maximal Extractable Value

Maximal Extractable Value is intrinsic to every blockchain that supports smart contracts. With transactions validated and verified by nodes powering the blockchain, some will locate and extract MEV. Considering the risk of MEV mentioned above, any developer must factor in the importance and inevitability of MEV when designing a blockchain to promote decentralisation. 

Even though MEV is intrinsic to most chains, harmful forms of MEV, such as sandwich attacks and front-running, can be mitigated by certain features. Indeed, the upcoming DeFi-focused blockchain, Sei, reduces MEV through disrupting front-running and frequent batch auctions. Other solutions include more efficient or single-slot finality, a committee-based finality model and obfuscating contents of transactions in the mempool with zero knowledge proofs.

However, mitigating MEV and eliminating MEV are two different things. As value will continue to be extracted by specialised bots, the centralisation risk remains. To design decentralised blockchains, developers might ascertain strategies that democratise MEV, ensuring that the rewards are shared across all validators instead of a single one. These strategies could include creating open source MEV bots that any validator can make use of or smoothing MEV to distribute value captured across more entities.

Conclusion

As a foundational feature of blockchains, MEV has the potential to present an interminable problem if left unchecked. Understanding the methods used by bots to extract value from users’ transactions and remaining vigilant is crucial to maximise one’s tokens when trading on DeFi protocols. Although the existence of MEV can prove detrimental for some participants, optimising profitability within blocks is fundamental to create an effective market for blockchains.

Part 2: Solving Issues Relating to Maximal Extractable Value

Reconciling the existence of MEV and understanding its impacts has been discussed in numerous papers, workshops and on academic panels. Thus far, no definite answer on whether MEV should be aggressively extracted and distributed or removed has emerged. Further, even those who claim that MEV should be eradicated fail to provide comprehensive solutions that can be backed by game theoretical questioning. Nonetheless, from these debates, highly relevant organisations and concepts have arisen; focal points include providing transparency around captured MEV, smoothing MEV across involved parties, dividing up validator roles and more. Yet still, the question remains of whether developers should strive to mitigate or democratise Maximal Extractable Value.

Flashbots

Based on Phil Daian’s Flash Boys, a team focused on combating and democratising MEV, known as Flashbots, emerged. This R&D organisation additionally sought to study the existential risks of MEV on Ethereum and other layer 1 blockchains with smart contract functionality. As a transparent company, all of Flashbots research and products are open sourced and highly accessible. Furthermore, with searcher bots constantly surveying Ethereum’s mempool, Flashbots had a significant amount of data on total MEV extracted and strategies used. Accordingly, the company released a MEV-Explore which concentrates on providing live data on MEV; notably, however, Flashbots’ explore webpage has not been updated following Ethereum’s transition to PoS.

As well as striving to mitigate the impacts of MEV on Ethereum, Flashbots distinguished itself from other players in the space by acknowledging its inevitability and sought to make it available to everyone. The catalyst behind this drive was the team’s cognisance of the centralisation risk of MEV which was detailed above. Prior to The Merge, Flashbots prevented Ethereum miners from obtaining disproportionately large amounts of influence over the blockchain by enabling any network participant to extract MEV through mev-geth. This client meant that all miners, irrespective of their coding expertise, had the facilities to survey the Ethereum mempool, finding MEV opportunities and ordering their blocks to optimise for profits. 

In addition to this, the R&D company released a custom Remote Procedure Call (RPC) called Flashbots Protect, enabling users to send their transactions to a Flashbots builder as opposed to Ethereum’s public mempool. This heralded the benefits of transactors being safeguarded from frontrunning attacks. However, the functionality of this offering and Flashbots’ mev-geth client plummeted upon Ethereum’s shift to a PoS consensus model. Notwithstanding, the team designed a new open source software, MEV-Boost to act as a plugin for Ethereum staking clients, once again enabling all network participants to capture MEV. 

MEV-Boost

Flashbots’ MEV-Boost has seen substantial adoption from the dominant validator clients, resulting in over 75% of blocks relayed since The Merge have utilised this plugin. It is estimated that by running MEV-Boost can increase staking rewards by over 60%, resulting in the majority of nodes leveraging Flashbots offering. 

The effectiveness of MEV-Boost stems from Flashbots’ Proposer Builder Separation (PBS). This concept introduces independent roles to the proposal of blocks by validators – block builders, proposers and relayers. Block builders assume the role of expert coders who autonomously run searcher bots to ascertain profitable MEV extraction strategies. The builder combines these strategies and transactions with high bribes (gas fees) to design optimal blocks. This process of creating the block occurs off-chain. On the other hand, the proposer performs the task of selecting the most profitable block generated by the builders and broadcasts it to the rest of validators participating in the Ethereum network. Notably, this only occurs when the specific proposer is selected by the pseudo random function utilised by Ethereum’s PoS consensus mechanism. Finally, the relayer receives blocks from the builders, recreates them on-chain and conveys it to the proposer of the forthcoming block. 

mev boost

MEV-Boost has also established a structure around how these roles interact. First, the builders will create a block each and send it to the relayer. This party will then send only the block header and value to the proposer. Subsequently, the proposer selects the highest bid and signs the header with their private key. Once signed, the relayer will provide the specific block details, including its transactions, to the proposer who broadcasts the block to other validators. This process occurs in just over 12 seconds. The amalgamation of these roles distribution specialisation and capacity, democratising MEV by ensuring all entities can capture it.

Ironically, in striving to ameliorate the problem of MEV, Flashbots produced another; censorship at the protocol layer of Ethereum. As a US regulated company, Flashbots is compliant with the Office of Foreign Assets Control (OFAC) and its sanctioning of Tornado Cash. Consequently, Flashbots prevents relayers from picking up blocks with transactions originating from addresses on the OFAC’s Specially Designated Nationals list. This has resulted in individuals and entities seeking privacy through Tornado Cash’s crypto mixer service being censored. Unfortunately, since the merge, over 75% of all blocks proposed have been OFAC compliant, ergo censoring certain addresses. Notably, PBS has positive ramifications for MEV, hence the solution to centralisation and censorship must utilise a similar model of distributing roles without the plugin being facilitated by a single authority.

Ethereum-Native Proposer Builder Separation

To prevent these levels of censorship, integrating PBS into the base layer of Ethereum is part of the blockchain’s roadmap. Enshrining this separation in Ethereum will open the doors to many additional improvements to Flashbots’ PBS. This native approach will allow a novel iteration of PBS which leverages pre-confirmation privacy, whereby there is no risk that builders can perceive other builders’ blocks unless that are selected by the relayer. Using encrypted blocks that can be decrypted and recreated on-chain directly as opposed to using the Flashbots plugin. Further, without this fear, block builders may start specialising in the creation of specific types of blocks; maximising profit, non-malicious extraction strategies, fairly ordered blocks, blocks which comply with regulation and more. In addition, proposers will not need to trust the parties behind relayers who have built the client as this will be automatically facilitated by the Ethereum blockchain. 

maximal extractable value mempool ethereum

This innovation to Ethereum falls under “The Scourge” category of the chain’s roadmap, which is reserved for MEV-relevant upgrades. This is due to the difficulty in effectively implementing PBS directly into Ethereum with an understanding of how to ensure builders retain freedom without allowing for widespread censorship, using fair auctions to determine fees and more. These edge-cases need to be adequately documented and addressed before PBS can be fixed into the base layer of Ethereum.

MEV Smoothing

Flashbots and (eventually) Ethereum’s PBS will prevent the centralisation risk of MEV by facilitating the ease of extracting additional value from blocks. Given that higher yield rates can be generated through staking, more entities will choose to stake the 32 ETH requirement to set up their own node. In the short term, this will protect Ethereum by rendering it more decentralised. However, in the long run, rewards will exponentially decrease. Consequently, less validators will join the network, resulting in Ethereum’s continued journey to becoming increasingly decentralised, stagnating.


MEV Smoothing resolves this to ensure Ethereum’s decentralisation can leverage the blockchain’s substantial economies of scale. Through distributing MEV more evenly across builders and proposers, the variance of these rewards lowers as its value increases and becomes more stable. This can be achieved through putting all MEV captured in a protocol escrow account and shared equitably among validators. Through smoothing these rewards, network participants receive additional certainty as to their estimated rewards from staking, encouraging more entities to begin validating Ethereum. Notably, MEV smoothing can only be achieved with in-protocol PBS as awareness of the live builder market and bids are a necessity.

Other MEV Solutions

As well as the prominent solutions detailed above, other approaches to reconciling MEV have emerged from different sources. The layer 2 rollup network, Optimism, auctions off the right to reorder transactions to the highest bidder. MEV Auctions (MEVAs) are created, reducing the benefits of utilising malicious strategies to extract MEV as a bid war will undoubtedly commence before the ordering of every sequence of transactions are compressed. Through leveraging MEVAs and transferring the winning bid value to the Optimism Foundation, the team can focus on funding open sourced, public goods; ensuring that the impacts of MEV are guided to benefiting the wider ecosystem.

Zero knowledge rollup focused company, StarkWare, has proposed a different approach to mitigating the likelihood of the extraction of malicious MEV. StarkWare released VeeDo, a STARK-based Verificable Delay Function (VDF) service that slows computation, yet can be easily understood by other network participants upon being solved. VeeDo makes use of zero knowledge proofs to ensure that once a solution to the VDF has been ascertained, it is recognisable and publicly broadcasted. This offering, which is compatible with the Ethereum layer 1 blockchain, can make applications immune to front-running attacks.

Another research point being investigated is how the mempool can be encrypted and the impacts that will have on Maximal Extractable Value. As explained in the first part of this piece, MEV originates from specialised bots surveying the mempool to find profitable strategies based on transactions. However, through the use of RSA encryption of zero knowledge proofs, transaction information in the mempool can be obfuscated, with the exemption of gas fees – the validator bribe. This results in the ordering of blocks being based on the fee offered by the transactor. Further, an encrypted mempool increases the censorship resistance at the cost of increasing the validator honesty assumption.

Additionally, the detrimental effects of severely unjust MEV extractions methods can be eliminated through single slot finality. Upon two epochs passing, an initial block of transactions has reached finality. This term comes from the fact that the chain cannot be reorganised, hence transactions are irrefutably final. However, with an epoch being made up of 32 blocks, each equates to a length of 6.4 minutes. Thus, there is a 12.8 minute period until Ethereum transactions are declared final. During this period, if a bot obtains enough power, it can reorg the chain to leverage unoptimised MEV opportunities. Single slot finality would see blocks of transactions being deemed unchangeable upon the subsequent block being proposed. Though arduous, this can be achieved through a randomised committee based approach. Each slot (block) sees the selection of a committee of random validators; the proposer has 4 seconds to send the block to the committee and each member will verify the block. Using advanced cryptographic BLS signature aggregation methods, near-instant finality can be achieved, ensuring Ethereum cannot be reorganised.

Conclusion

Ultimately, MEV can be construed to be problematic to the blockchain as it individuals unknowingly lose value in their trades upon transacting or as a feature of Ethereum that can be used to encourage more entities to validate the network. Despite this ambiguity, solutions must be implemented to render MEV more accessible, censorship resistant, non-malicious and democratised. Though currently the extraction of this value cannot be entirely abolished, many researchers continue to focus on how MEV can be minimised to advantage the blockchain. Furthermore, with the external development of blockchains, for example in the fields of parallel execution and modular blockchains, the capture of MEV will inevitably shift, sparking additional investigation and novel breakthroughs.

DISCLAIMER

Zerocap Pty Ltd carries out regulated and unregulated activities.

Spot crypto-asset services and products offered by Zerocap are not regulated by ASIC. Zerocap Pty Ltd is registered with AUSTRAC as a DCE (digital currency exchange) service provider (DCE100635539-001).

Regulated services and products include structured products (derivatives) and funds (managed investment schemes) are available to Wholesale Clients only as per Sections 761GA and 708(10) of the Corporations Act 2001 (Cth) (Sophisticated/Wholesale Client). To serve these products, Zerocap Pty Ltd is a Corporate Authorised Representative (CAR: 001289130) of AFSL 340799

All material in this website is intended for illustrative purposes and general information only. It does not constitute financial advice nor does it take into account your investment objectives, financial situation or particular needs. You should consider the information in light of your objectives, financial situation and needs before making any decision about whether to acquire or dispose of any digital asset. Investments in digital assets can be risky and you may lose your investment. Past performance is no indication of future performance.

FAQs

What is Maximal Extractable Value (MEV)?

Maximal Extractable Value (MEV) refers to the maximum amount of value that can be extracted from a proposed block through the ordering and sequencing of transactions. The entity proposing the block has complete autonomy over the transactions included and their order. MEV is the additional stream of revenue accessible to miners and validators as they shift their focus from receiving rewards via the blockchain layer to syphoning value off of the application layer as transactors use various protocols.

What are the potential risks associated with MEV?

MEV extraction is not a positive-sum game because the proposers are more profitable; this additional revenue comes directly from everyday participants of the blockchain. Consequently, this intrinsic feature of blockchains is a zero-sum game. If one expert builds the most optimised, effective MEV bot, they will capture more value than others. As more funds are extracted by this program, the expert can set up additional validator nodes, increasing their likelihood of being chosen to mint a block. This could lead to centralisation in the long run.

What are some examples of MEV extraction strategies?

Examples of MEV extraction strategies include sandwich attacks, liquidation, and arbitrage. Sandwich attacks occur when MEV bots insert their own transactions before and after an individual’s transaction if it is profitable. Liquidation happens in the borrow and lending DeFi market where MEV bots can purchase the borrower’s collateral at a discount to the market value. Arbitrage is when MEV bots capitalise on price variations across different markets and forums.

What are some solutions to the MEV problem?

Solutions to the MEV problem include more efficient or single-slot finality, a committee-based finality model, obfuscating contents of transactions in the mempool with zero knowledge proofs, and MEV smoothing which involves distributing MEV more evenly across builders and proposers. Other solutions include the use of MEV Auctions (MEVAs), zero knowledge rollup focused solutions like VeeDo, encryption of the mempool, and single slot finality.

What is the role of Flashbots in addressing the MEV problem?

Flashbots is an R&D organisation that focuses on combating and democratising MEV. They have released a MEV-Explore which concentrates on providing live data on MEV. They also released a custom Remote Procedure Call (RPC) called Flashbots Protect, enabling users to send their transactions to a Flashbots builder as opposed to Ethereum’s public mempool. Flashbots’ MEV-Boost has seen substantial adoption from the dominant validator clients, resulting in over 75% of blocks relayed since The Merge have utilised this plugin.

Like this article? Share
Latest Insights

28 Feb, 23

What is the CBDC Anti-Surveillance State Act?

On May 23, 2024, the U.S. House of Representatives passed the CBDC Anti-Surveillance State Act. This legislation, introduced by Congressman Tom Emmer, aims to prevent

28 Feb, 23

Blockchain Fintech Solutions: Bridging the Ecosystems

Blockchain technology is revolutionizing the financial technology (fintech) landscape by providing innovative solutions to longstanding challenges. As the demand for more secure, transparent, and efficient

28 Feb, 23

How is Bankrupt FTX Paying Back Its Customers?

FTX, once a major player in the cryptocurrency exchange market, filed for bankruptcy in November 2022 following revelations of significant mismanagement and fraudulent activities. The

Receive Our Insights

Subscribe to receive our publications in newsletter format — the best way to stay informed about crypto asset market trends and topics.

Want to see how bitcoin and other digital assets fit into your portfolio?

Contact Us
Ready to sign up?
Create an Account