Maximal extractable value (MEV) refers to the maximum value that can be extracted from block production more than the standard block reward and gas fees by including, excluding, and changing the order of transactions in a block.
MEV has become more popular since Ethereum transitioned to Proof-of-Stake (PoS). The rise of Layer 2's like Starknet introduced new dynamics to the MEV landscape. Understanding MEV within these ecosystems is important in comprehending the implications of on-chain competition and its effects on network stability and user experience.
MEV in the Ethereum ecosystem presents a complex duality with beneficial and potentially detrimental impacts on the network.
Inefficiency and unfairness:
Innovation and security incentives:
Market health:
There are multiple strategies to extract value from block production:
The MEV ecosystem has developed various tools and platforms to manage and optimize MEV extraction. These solutions seek to balance the benefits of MEV while minimizing its negative impacts:
The MEV ecosystem on Ethereum involves several key participants:
Most MEV strategies are executed by automated trading bots that identify and exploit opportunities in real-time:
Many of these trading bots are integrated within various MEV infrastructure platforms, aiming to reduce the risks of manipulative tactics.
Starknet is an Ethereum Layer 2 (L2) designed to deliver high transaction throughput and low costs while maintaining Ethereum's core principles.
Starknet operates as a Zero-Knowledge Rollup (ZK-Rollup), using a STARK proof to bundle transactions off-chain before submitting a single proof to the Ethereum mainnet. MEV on L2's like Starknet differs from L1 due to increased throughput, reduced transaction costs, First-Come-First-Serve (FCFS) model, account abstraction, and censorship resistance. Here's how:
However, MEV opportunities still exist on Starknet. The interaction between L1 and L2 creates complex transaction flows that are "MEV-exploitable"
, allowing searchers to capitalize on information and timing differences between these layers for profit.
Due to the L2 design, MEV strategies that rely on gas fee manipulation are less effective. However, searchers are still exploring profitable strategies. Here are some notable ones:
Atomic arbitrage involves profiting from price differences across exchanges and protocols (such as Ekubo and Nostra). The lower transaction fees and high TPS on L2s like Starknet make it easier and faster for bots to execute these arbitrage strategies efficiently. For a practical guide on creating an atomic arbitrage bot, check out Maksim's blog and Matteo's blog.
MEV bots can profit from liquidations on lending protocols when collateral values drop below certain thresholds. When this happens, bots can quickly act to liquidate these positions for profit. For a practical guide on building a liquidation bot, check out Kristan's blog on ZKLend.
This strategy uses statistical models to predict price movements and identify profitable trading opportunities. While it can be riskier, the high throughput and low transaction costs on L2s make it easier to execute effectively.
Cross-layer sandwich attacks involve monitoring interactions between L1 and L2 to place transactions that manipulate prices. Searchers can observe pending transactions on L1 and strategically place transactions on L2 to influence prices in their favor.
All these strategies are possible on Ethereum and its L2s. However, many L2s are exploring MEV auctions and decentralized sequencers to mitigate MEV risks for end users.
Starknet actively employs strategies to create a fair ecosystem and mitigate MEV on the mainnet. The community is engaged in healthy discussions and multiple initiatives focused on addressing MEV on Starknet.
Starknet is improving TPS and performance by implementing parallel transactions, resulting in lower fees, reduced congestion, and fairer transactions.
The community is also developing tools and engaging in conversations to address MEV's impact. Here are some notable ones:
Looking ahead, the future of L2s is promising, with the potential implementation of decentralized sequencers to decentralize the network and MEV auctions to reduce MEV risks.
I hope this article has introduced you to the world of MEV on Ethereum and Starknet. You should now be able to compare the MEV dynamics between these layers and better understand how MEV works on Starknet.
If you want to discuss MEV on Starknet or have valuable insights to share, join our MEV discussion group.
This piece is part of a series exploring MEV on Starknet, so stay tuned for more insights and discussions in the upcoming articles.