Original title: "MEV and Flashbots: The Uniquely DeFi Tale"
Original Author: 0x Fishy
Original compilation: Kxp, BlockBeats
introduction
MEV is a by-product of blockchain design and a unique product of DeFi. Essentially, MEV is just an act of profit maximization, where validators operating a blockchain try to maximize their profits on the task of validating transactions. While we can argue that MEV provides benefits through increased capital efficiency, MEV can significantly impact the user experience of using decentralized applications, including higher gas fees, slippage, and validator collusion and centralization risks. This article will first examine MEV from a theoretical conceptual perspective, and the systemic risks it poses to the ecosystem. Next, I will use Flashbots as a case study to explore how the DeFi community is trying to solve all these negative externalities of MEV, and explain why the story of MEV is a representative DeFi story: it reveals a lot about the construction. Fundamental issues, challenges, principles, and tradeoffs of centralized financial systems.
Flash Boys Club
MEV is a feature of blockchain technology rather than a flaw. In a given blockchain network, validators (or miners in the traditional PoW model) are responsible for deciding what data is put into the chain. Specifically, they can control the entry and removal of data, and the ordering of that data on-chain. Just like rational economic agents, validators arrange transactions to maximize profit from transaction fees.
The concept of MEV was first elaborated by smart contract researcher Phil Dainan in an important paper called "Flash Boys 2.0". In this paper, the researchers emphasized that it is not uncommon to use a large number of robots and arbitrage agents to "predict and exploit" ordinary user DEX transactions, similar to traditional financial high-frequency traders actively optimizing transaction delays. In the last 24 hours of writing this article alone, these entities have realized 2,578 ETH, or approximately $4.9 million, through MEV operations.
While MEV is a general umbrella term that encompasses many different arbitrage methods and scenarios, there are a few key characteristics that form the basis of many MEV opportunities in DeFi. First, most MEV is implemented through a process known as Priority Gas Auction (PGA), where users pay higher transaction (gas) fees in order to have their transactions run first. Since many arbitrage bots rely on the priority running of their transactions for profit, these bots will engage in Gas bidding wars, sequentially increasing prices to have their transactions run by validators, which in turn leads to high network congestion and outbid normal user bid fees, Unless they also pay exorbitant transaction fees.
Validators, on the other hand, are one of the main beneficiaries of this practice. In fact, power is directly related to profit: because validators (at least in theory) have the power to determine which transactions to run, they can prioritize which transactions are processed based on their fees, thus gaining "ordering optimization". "income. In fact, since validators are responsible for so much work such as MEV search, packaging and execution pipeline, most of the "ordering optimization" is outsourced to dedicated searchers, builders and relays. These intermediate entities can be imagined as validators. "secretaries" who receive a portion of the profits by simplifying the MEV process. Specifically, searchers will discover MEV opportunities, builders will package these opportunities into complete "blocks", and relayers will send these complete "blocks" to validators or actual block builders. Therefore, an overview of the current MEV ecosystem is as follows:
MEV Ecosystem, source:https://chain.link/education-hub/maximal-extractable-value-mev
As we have hinted before, while MEV-enabled arbitrage may have some benefits, including greater capital efficiency and ensuring that prices are consistent across exchanges, there are huge externalities for end users, such as higher High transaction fees, slower execution and higher slippage (e.g. sandwich attacks). However, this is not the biggest risk of MEV to the blockchain - if validators collude with each other, MEV operations may actually undermine the security guarantees of the blockchain consensus layer.
This security issue stems from a misalignment of incentives - in all of these lucrative MEV opportunities, miners can earn more by optimizing transaction fees rather than relying on a constant block reward stipend. As Dainan writes, this means:
“Thus, miners can fork high-fee blocks, retaining some of the fees to attract other miners to build on the fork. In extreme cases, the incentive to deviate from the protocol can cause economically rational miners to undermine their strategy, reducing block confirmations.” security provided."
Known as a “price war” attack, this is one of several ways MEVs can undermine the basic security guarantees of the blockchain. Other known attacks include the "Time Thief Attack", where instead of stealing lucrative transactions from the current block, validators collude to steal and exploit MEV opportunities in past blocks by rewriting past history. Furthermore, MEV withdrawals don’t even need to happen on-chain, as all of this can be done through off-exchange transactions, such as between large traders and validators.
So, as we can see, there is a lot at stake (the original text here is "at stake", intended to be a pun on "stake").
Flashbots: Mitigating the Negative Impact of MEV
Given the potentially severe consequences of unrestrained MEVs, several projects and groups have worked to mitigate the negative externalities of this practice. One of the most important groups in this space is Flashbots, a project dedicated to realigning the incentives of MEV to reward honest validators while mitigating the worst effects on ordinary users.
To do this, Flashbots attempted to take three distinct steps: (1) reveal the MEV "dark forest", (2) democratize MEV extraction, and (3) redistribute benefits back to the ecosystem. To achieve the first goal, Flashbots has a dedicated product called MEV-inspect, which aims to "reveal" the "dark forest" of MEV, to quantify the negative externalities caused by MEV, and to visualize the scale of the problem.
The other two goals of “democratizing MEV extraction” and “redistributing benefits” are more complex, encompassing a full suite of products and evolving as the scope and focus of the problem change. To some extent, we can think of Flashbots' product development history in the past two years as a microcosm of Ethereum's growth and development.
The first major product line released by Flashbots is the MEV-Geth client, or an improved version of the Ethereum Golang implementation that is better protected against MEV manipulation by routing it to a private transaction pool. Based on this new client, a MEV auction market is built using the "one-price sequestration bidding" method (also known as "blind bidding"), where each participant is only allowed to submit one price and none of the auction participants knows The price at which other participants bid. By this design, Flashbots alleviate the previously discussed "price bidding" wars that lead to network congestion.
The guiding principle behind the creation of MEV-Geth and the MEV marketplace is to diffuse the power and responsibility of validators to build blocks through an incentive re-alignment process called "block producer-builder separation". Instead of going through the complicated process of MEV searching and transaction packaging, validators using MEV auctions can simply look at the MEV market, find the transaction that brings them the highest MEV, and submit a single bid that reflects their actual preference. Additionally, to prevent validators from including their own transactions and profiting from user transactions that precede transactions, the actual transaction details (buy orders, sell orders, liquidations, etc.) are not made public until after the block is built.
So why would a validator use this algorithm, forgoing the aforementioned lucrative MEV opportunity? This is because it is easier and cheaper for validators to pick only MEV transactions from the market for this Flashbots algorithm. As more and more high-quality MEV transactions go through the market rather than directly on-chain, validators can earn higher rewards by sticking with Flashbots. The results are very impressive: not long after MEV-Geth was released, over 90% of Ethereum validators started using the project, thus showing the importance and effectiveness of incentivized re-alignment in solving potential problems. With the development of the Ethereum ecosystem and the shift from the proof-of-work model (PoW) to the proof-of-stake model (PoS) in September 2022, this change in Ethereum's underlying consensus structure makes it necessary for us to "block producer-builder The concept of "separation" is updated.
The main reason why PoS is more efficient than PoW is that in PoW, each node has to build and produce blocks from scratch; while in PoS, only a few validators act as block producers for the main block, appending data to the blockchain . While this is great for the environment and computational efficiency, it could introduce additional centralization risk due to the extremely attractive MEV yield, especially if validators ("block producers") share key "constructs" with market sellers. Those" collusion. Even Flashbots running private transaction pools may be tempted by this, but the very fact that we place our trust in a single entity such as Flashbots goes against the spirit of decentralization.
MEV Boost system diagram, source:https://github.com/flashbots/mev-boost
So Flashbots released MEV-boost, a piece of software that decentralizes the "supply side" of this MEV market. MEV-boost not only includes transactions from Flashbots private transaction pool (actually a monopoly), but also allows any builder running this software to submit transactions to all participating validators. For validators, as more builders participate in building all these different blocks, they can earn more revenue and level the playing field for validators, resulting in a stronger, more secure ecosystem. Like MEV-Geth, this novel design realigned incentives for multiple parties to avoid centralization risk and was a huge success with over 85% network adoption, where Flashbots only relayed 34% of transactions.
Flashbots SUAVE
So far, the quest to mitigate all risks of centralization and shield decentralized finance from the most pernicious effects of MEV remains unfinished. In implementing block producer-builder separation, Flashbots' solution is to decentralize, or redirect, the key powers and responsibilities of validators to "builders" who act as validators independent of validators. Entities that do transaction picking and selection for validators. It turns out that there are huge economies of scale, which in turn lead to centralization risks in the role of the builder.
So what do these economies of scale mean for the builder role? Recall that we mentioned earlier that Seekers, Builders, and Relays all play different roles, with Seekers searching for MEV opportunities and then sending those opportunities to Builders, who send complete blocks to Relays. This means that searchers must choose who to send their results to. In order to maximize their rewards, they will select the highest quality builders, who will often be selected by validators. This creates a centralizing effect as more high-quality deals flow to top builders - top builders will always get the highest MEV deals from Seekers, strengthening their position.
Builder centralization effect, source:https://simbro.medium.com/mev-driven-centralization-in-ethereum-ec 829 a 214 f 18
This builder centralization effect has been proven in practice. In the last 24 hours of writing, the top 5 builders proposed about 90% of the total MEV-Boost blocks. As this level of centralization increases, these oligopolistic companies may begin to use their dominance to manipulate transactions, including collusion and censorship of certain transactions, which could compromise the security of the underlying blockchain. That's the goal of Flashbots' latest project: a single unified auction of value expressions that aims to separate the block building process from any single decentralized.
SUAVE and the L1 blockchain stack, source:https://writings.flashbots.net/the-future-of-mev-is-suave/
SUAVE is actually an independent and dedicated block sorting chain, which is mainly responsible for transaction mempool and builder responsibility related issues, while the verifiers of protochains such as Ethereum will be responsible for block production and proof roles. As we can see, SUAVE is a natural extension of the "block producer-builder separation" principle, where we put block producers and builders on two completely separate chains so that they are both sufficiently decentralized and separate from each other. Additionally, the vision for SUAVE is that it will serve as a common ordering layer for many different chains so that whether you are a validator on Ethereum, Arbitrum, Polygon, or any other EVM chain, you can use SUAVE to find the best MEV opportunities. This applies not only to the original chain you are in, but also to cross-domain MEV for cross-chain transactions, so we can't just focus on the transaction memory pool of the original chain.
SUAVE cross-chain situation, source:https://writings.flashbots.net/the-future-of-mev-is-suave/
While SUAVE has ambitious goals that ultimately benefit all parties involved and make the Ethereum ecosystem more decentralized, in the six months since its inception in November 2022, several core design issues still need to be resolved. For example, one of the central questions is whether to build SUAVE as a separate L1 chain (similar to Chainlink), or use a Rollup solution, or use a re-hypothecation service that "borrows" Ethereum validators, such as Eigenlayer. Each of these solutions has its own unique trade-offs in terms of ease of implementation, validator retention, security, and flexibility, which we will not discuss in detail here.
Another core question is whether SUAVE will issue its own Token. Although the SUAVE forum currently denies that it will launch its own token, we still have several questions as to whether Flashbots will stick to this. Especially considering that launching SUAVE Token seems to make a lot of economic sense in the long run as a private company. Furthermore, one could make a plausible argument that Flashbots thinks it can raise a unicorn valuation of $1 billion in a bear market because of its hints at a future SUAVE Token offering.
So, what made Flashbots choose not to launch SUAVE Token? As it turns out, launching a token came with several head-scratching design decisions. For example, is this token useful for certain transactions, or is it just "another governance-only token"? If this Token is useful, what will its purpose look like? How different stakeholders using Flashbots (e.g. different chains, end users, builders on Flashbots, etc.) are incentivized to use and trust this new token instead of more mature tokens like ETH, or even L2 Token , such as ARB? In any case, they would face a complex and labor-intensive incentive coordination process; thus, it makes perfect sense for the Flashbots team to avoid launching a token for now.
The bigger picture of the future of DeFi
While it's hard to tell what form SUAVE will ultimately take, and whether this new ordering chain will succeed in its goals and coordinate incentives in a way that truly mitigates MEV's negative externalities, I believe that MEV and Flashbots represent a real step forward in design. A typical image of the trade-offs, issues, and principles that need to be made in a centralized financial system.
First, as mentioned earlier, MEV is a feature of blockchain design, not a bug. These arbitrage opportunities and profit incentives for validators stem from the instant accessibility of the blockchain and guarantee the capital efficiency of DeFi. The negative harms of MEV, including congestion, gas wars, and end-user slippage, are simply by-products and negative externalities of this process.
By definition, a negative externality does not affect the entity engaging in the negative behavior. In this case, causing network congestion and slippage to end users does not harm validators or arbitrage bots engaging in this profitable activity. It has been widely recognized through traditional economics that all these externalities cannot be well addressed by a purely market-based system. In traditional markets, governments or other regulators step in to correct market volatility and minimize the impact of negative externalities (such as taxes on tobacco and alcohol).
DeFi, on the other hand, is inherently trustless and opposed to any form of government enforcement. The closest it comes to a "law enforcement agency" is probably through encoding rules and regulations in code (e.g. via smart contracts) to achieve certainty and transparency. Therefore, as the Flashbots story demonstrates, reducing the negative externalities of the MEV phenomenon has always relied on complex incentive redesign and alignment. After all, like quantitative traders on Wall Street, DeFi arbitrage bots are not known for their high ethical standards and goodwill.
Utilizing incentive redesign to reduce MEV's negative externalities is not just an approach inherent to Flashbots. In addition to Flashbots, there are many other teams trying to realign incentives to develop protocols to reduce the impact of MEV. For example, Chainlink’s Fair Sequencing Service (FSS) leverages its network of decentralized oracles to outsource the process of “ordering transactions” to validators, achieving a goal similar to what the SUAVE network is pursuing. Another example is the "Coincidence of Will" (CoW) mechanism of the CoW protocol (formerly known as Gnosis chain), which complements each other depending on whether the will is (eg I want 1500 USDC for 1 ETH, and you want 1 ETH for 1500 USDC ), automatically piecing together trades and using a solver algorithm to ensure everyone trades at the best price.
But incentivizing refactoring, especially in a decentralized environment where you don't trust any single party, can be a maddening conundrum because you're basically trying to offset economies of scale. Take the builder centralization of Flashbots as an example, those builders who have “proven their worth” are more likely to be “trusted” by searchers, which in turn will lead to more high-quality transactions and solidify them as market leaders status. Identifying, addressing, and implementing a decentralized alternative through incentive re-alignment is basically a game of whack-a-mole - you never know what centralization vulnerabilities a newly introduced incentive system might contain and the implied economies of scale, all of which are only known in hindsight.
Furthermore, in a complex system (such as a blockchain) with many different stakeholders and agents, it is nearly impossible to avoid externalities, as there will almost certainly be actions by one stakeholder that affect another behavior of stakeholders. As Dainan demonstrates in "Flash Boys v2.0," many of these externalities can pose real threats that destabilize entire systems. Consequently, any decentralized system—even those with well-designed game-theoretic principles—will always have inherent complexity, sophistication, and fragility, any one of which unforeseen vulnerabilities could threaten its exist.
Compared with centralized systems that are vulnerable to breaches (where necessary countermeasures can be created), decentralized systems do not contain any obvious "single points of failure" - but this is precisely what makes decentralized systems sometimes more powerful than centralized systems. The fatal reason is that every node has the potential to become a "single point of failure" if there are loopholes in the system design.
Original link
