With the public nature of blockchains and plenty of intelligent, highly capable and motivated programmers, it is inevitable for MEV to exist as part of ongoing blockchain activities. MEV can be found in both the underlying layer 1 chain and the layer 2 chains built on it, at the consensus and application level. Reducing MEV is an ongoing area of research, and several methods to reduce MEV are being explored. How is MEV on layer 2 extracted? And can it be prevented or mitigated?

MEV, or Maximum Extractable Value, is a measure of the profit that validators can obtain while adding blocks to the chain, by including, excluding and changing the order of transactions in a block. The most common forms of MEV are arbitrage, front-running, back running and sandwiching (both front-running and back running at the same time). Not all MEV is bad, as some activities like arbitraging help to ensure price equilibrium between DEXs and lead to more efficient markets. However, malicious MEV have negative implications for the overall user experience and consensus-layer security. In the case of MEV, it can be viewed as an invisible tax on users of a blockchain network.

In Layer 2, MEV arises due to the scalable nature of rollups. To ensure efficiency and faster transactions in L2s, there needs to be a small number of operators, who are parties that generate and execute L2 transactions. The rollup sequencers are mostly centralized, creating a situation where users have to trust sequencers to be honest.

The basic workflow of a typical zk-Rollup is as follows:

  • Users send transactions to a centralized sequencer (coordinator) on Layer 2.
  • Centralized sequencer executes the transactions and packs multiple transactions into a Rollup block. It will pre-confirm the client once the transaction is included in a block.
  • A centralized prover will generate a succinct proof for the Rollup block. The proof will be uploaded to Layer 1 with the minimum required data for verification.
  • Layer 1 smart contract can verify the proof and update the state (i.e. root hash).

Sequencers can censor and intentionally reorder the traders’ transactions to extract additional profit for themselves. If the sequencer correctly computes the state transition and includes only valid transactions, they can reorder or censor the transactions to extract MEV.

Data on total MEV extracted on most layer 2s is difficult to obtain, with the exception of Polygon which now has support from Marlin. Comparing MEV on Polygon to Ethereum yields interesting results. Till date, $687m has been extracted from Ethereum, according to Flashbots. $45m of MEV has been extracted on Polygon, according to Marlin. Not surprisingly, MEV volumes on Ethereum are much higher, given that average transaction value on Ethereum is about 40x higher than on Polygon. Interestingly, the number of MEV bots on Polygon is 20x that of Ethereum, due to lower gas fees making smaller transactions still profitable for bot operators. Overall, MEV activity in layer 2s like Polygon is high enough to deserve a closer look, even if the value extracted is significantly lower than that of layer 1.

There have been many solutions proposed by different entities, ranging from methods to extract and democratize MEV to others trying to completely prevent MEV.

MEV Auctions — First proposed by Optimism, MEV auctions reduce MEV by auctioning off the right to reorder transactions to the highest bidder. Sequencers (a role auctioned off to the free market by validators) have the responsibility of ordering transactions, while validators are responsible for submitting these transactions to the Optimism blockchain. In this free-market auction construction, those who attempt to extract MEV need to bid for the right to reorder transactions. Optimism further proposed that a portion of the funds from sequencer auctions be transferred to the Optimism team to sustainably fund developments.

Chainlink Fair Sequencing Service — a decentralized transaction ordering service that makes the time-ordering of transactions fair and predictable for all users. The idea behind FSS is to have an oracle network order the transactions sent to a particular contract, including both user transactions and oracle reports. Oracle nodes ingest transactions and then reach consensus on their ordering, rather than allowing a single leader to dictate it.

Time-Locked Encryption/Verifiable Delay Functions — MEV-resistant L2 solution that ensures complete privacy of transactions as it reveals the content of the transaction only after the transaction order is determined by the operator. This is achieved by encrypting the transactions temporarily with a time-lock puzzle, delaying the time taken for an operator to find the symmetric key used to decrypt the transaction.

Automata Conveyor — a service that ingests and outputs transactions in a determined order. This creates a front-running-free zone that removes the chaos of transaction reordering. When transactions are fed into the Conveyor, it determines the order of the incoming transactions and makes it impossible for sequencers to inject new transactions into the Conveyor output. The inserted transactions bypassing Conveyor is detectable by anyone because of signature mismatch. Sequencers are also not able to delete ordered transactions as transactions accepted by the Conveyor are broadcasted everywhere, unless all sequencers are colluding at the same time.

Zk-Squared — Introducing a secondary state containing another layer of zero-knowledge, making transactions private and thus harder for MEV to be extracted. However, an extra state load operation is still introduced, rendering less efficiency. Individual markets with zk-squared rollups could be introduced, giving Ethereum users more options so they don’t have to be subjected to MEV. As zero knowledge proofs continue to scale, the cost of the inefficiency would only decrease over time, making zk-squared rollups a potentially viable option in the future.

From what we’ve seen so far, to successfully mitigate MEV on L2 requires either decentralization of the sequencer in rollups or obscuring the order of transactions in a rollup block through various cryptographic methods. L2s have different processes for sequencing and achieving consensus, making the process even more difficult since there is no one-size-fits-all solution for all L2s. MEV on L2s is still a fairly new field of research, and certainly warrants further studies due to the wide-reaching effects MEV has on users and the entire ecosystem of the blockchain.