Dragonfly Partners: MEV is not that bad, how to coexist and evolve with MEV?

Dragonfly
2021-07-13 18:30:28
Collection
Rather than viewing Ethereum MEV as a survival risk for the industry, it is more like a pressure that forces different participants to evolve.

This article is from Dragonfly, authored by partner Tom Schmidt of the institution, and translated by Chain News.

Despite the cryptocurrency ecosystem generally believing that "code is law" and that everything is a fair game, most crypto systems also rely on a certain degree of social consensus and good citizenship to maintain a good overall user experience. Miners can make the network unusable in order to earn more money, but the network can indeed become unusable. Binance can incentivize a blockchain rollback to save losses caused by a hack, but doing so would significantly undermine the value of Bitcoin (BTC).

Transaction ordering faces a similar social consensus dilemma. While Ethereum and most other blockchains specify the correctness of transactions, there are no strict rules regarding transaction ordering. That is to say, miners should order transactions based on fees and the time they first see the transactions—miners want to earn more from transaction fees and hope to mine blocks as quickly as possible, but there are no formal regulations on this anywhere.

Historically, this has not been a problem in the past. Most of the time when I send ETH or BTC from one person to another, the order of transactions is not particularly important. However, gradually, transactions on smart contract platforms like Ethereum are no longer just simple value transfers from A to B, but rather complex financial transactions with potentially much higher value. A piece of paper mail might contain a nice note or a $20 bill, but it could also contain a check for $9 billion, or important financial information that could lead to extremely lucrative trades.

In current Ethereum, transactions can be arbitrage opportunities that capture market pricing discrepancies and yield substantial profits, or winning liquidation bonuses on lending protocols. In these scenarios, only one account can execute these highly profitable trades, making transaction ordering extremely important. More importantly, these opportunities can actually be created through transaction ordering. For example, you may be eager to add margin to avoid a loan that has shown insufficient collateral from being liquidated. But unfortunately, miners hold the power of life and death, as they can place their liquidation trades ahead of your repayment trades to liquidate you.

This is the world of Miner Extractable Value (MEV): the value of the ability to order transactions within a block. MEV is an increasingly large market on Ethereum, estimated to generate about $1 million to $4 million in value daily. But beyond discussing market size and potential profit opportunities, MEV is also important because it directly affects the usability and security of today's blockchains.

Dragonfly Partner: MEV Isn't That Bad, How to Coexist and Evolve with MEV?MEV is big business (Source: Flashbots Explore)

Bots attempting to profit from these MEV opportunities are willing to pay transaction fees much higher than ordinary users—after all, ordinary users wouldn't pay $200 in fees to earn $1,000, while bot behavior drives up the overall price of Gas and causes on-chain congestion. Looking at Ethereum Gas prices before the launch of Flashbots earlier this year provides a glimpse into this (which will be detailed later).

These bots also make the user experience of using Ethereum protocols unpredictable and uncertain. Users may think they are making simple trades on decentralized exchanges (DEX), only to find themselves facing front-running trades or sandwich attacks, resulting in failed transactions or very poor execution experiences. Want to know how much you've lost to front-running? Click sandwiched.wtf to see how much MEV has taken from you.

Dragonfly Partner: MEV Isn't That Bad, How to Coexist and Evolve with MEV?Illustration demonstrating a sandwich attack. (Source: Liyi Zhou)

Traditionally, the world of Ethereum has been dominated by simple Gas priority auctions: whichever bot pays the highest bid will capture the MEV, but this year Flashbots has disrupted this script. The Flashbots transaction ordering market is separate from the traditional block space market, allowing for more efficient price discovery and driving down transaction fees for ordinary users. In theory, this should be a great thing! But in practice, it has become a visible nightmare. Some even argue that it could turn miners into legally regulated money transmitters (subject to regulation) or make them accountable for hacking behavior!

One suggestion is for miners to bury their heads in the sand like ostriches and ignore this from a technical or moral standpoint, but that is not an easy thing to do! As one of the founders of Flashbots Phil Daian said, miners who can extract this MEV will earn more money than those who cannot or will not extract MEV, thereby giving them a greater proportion of control over the security of the blockchain under profitable conditions.

Dragonfly Partner: MEV Isn't That Bad, How to Coexist and Evolve with MEV?RIP

Of course, MEV does not exist in a vacuum, and the DeFi space is not static. Rather than viewing MEV as a survival risk for the industry, I see it more as an evolutionary pressure that forces different participants to evolve or die, and it has already driven the evolution of things! MEV offers many options for application developers, protocol developers, and blockchain developers to apply to potential future projects.

Option 1: Crash and Burn

Literally, self-explanatory.

Option 2: Embrace MEV and Go Earn It Yourself

Part of the fear of MEV comes from the "otherness" of miners and bots. 99% of users and protocol developers are neither miners nor bots, so there is a natural feeling of being deceived or manipulated by those who are untouchable. However, with the introduction of proof-of-stake (PoS) mechanisms that have their own transaction ordering and confirmation systems in ETH 2 and layer 2 networks (L2), the overlap between these two disparate camps has greatly increased. If these extra fees are returned to me (as an Optimism developer) or to you (as a protocol developer in my rollup), is MEV really that bad?

There certainly exists a world where MEV is merely a cost of doing business and a channel for these systems to self-fund. One could even imagine a large protocol running its own rollup, with these MEV directly flowing into the protocol's treasury. For those already using some off-chain transaction ordering mechanisms (like dYdX and Loopring's trading matching system), it is easy to see that a certain percentage of the profits generated from order sorting would return to the protocol developers and token holders.

Option 3: Prevent MEV

People are smart and respond well to incentives; I suspect they will respond well to the incentives provided by MEV by changing the way they build products. Essentially, MEV arises from several core ~~flaws~~ features of Ethereum:

  • All transactions are in a public mempool, waiting to be mined into a block;
  • All data required for these transactions is also public;
  • Any user can (typically) access this public data from these public transactions and can then execute the same transactions themselves.

Most solutions revolve around adjusting one of the above assumptions about how Ethereum operates to address the MEV issue.

Option 3A: Hide MEV

What if transactions are not entered into the public mempool, but are sent privately to miners until they are mined into a block? Bots cannot see the transactions that are about to be front-run, so they cannot front-run them. This is the path chosen by many application developers like 1inch and Archerswap, integrating private transaction relay services like Taichi Network into the system, or even reusing Flashbots to achieve similar functionality. Users who choose private transactions will have their transactions bypass the public mempool and be sent directly to miners.

The additional benefit of this approach is that users do not have to worry about transaction failures, as miners will only be rewarded when the transaction is successfully included in a block! The biggest downside of this approach is clearly the need to trust that miners will not initiate front-running transactions themselves, but reputation and social consensus once again keep them temporarily in check.

Dragonfly Partner: MEV Isn't That Bad, How to Coexist and Evolve with MEV?

Developers can also leave transactions in the public mempool but set their contents to private. Bots can see the transactions but cannot decrypt their contents, thus ensuring that the transactions are effectively private. This technology was pioneered by submarine sends, using a "commit-reveal" scheme that allows users to publicly send transactions without facing front-running, but can also be easily repurposed for DeFi applications.

Dragonfly Partner: MEV Isn't That Bad, How to Coexist and Evolve with MEV?

Option 3B: Unionization

What if protocols do not allow any random address to profit from these MEV opportunities, but instead restrict access to a known group of participants? Transactions can still hang in the mempool, but only whitelisted addresses can replicate them. When these addresses capture this MEV, they are forced to return a portion to users who have faced front-running or liquidation, thus redistributing wealth.

This is the path taken by protocols like KeeperDAO and BProtocol. Bots are compelled by game theory or programming to share MEV with DeFi protocol users. Through BProtocol and KeeperDAO's kCompound, these protocols effectively take over users' positions in the lending market and add a small collateral buffer, effectively lowering users' liquidation prices. When users' positions would typically be liquidated without this extra buffer (for example, being liquidated at $2,000/ETH instead of waiting to be liquidated at $1,800/ETH), whitelisted bots can liquidate these positions within the aforementioned protocols and share this "penalty" with the liquidated users and others. Since these positions are not actually liquidatable on protocols like Compound or Maker, non-whitelisted bots never truly see these liquidation opportunities. If every borrower were to migrate their positions to these protocols tomorrow, nearly all on-chain liquidation MEV would disappear.

Dragonfly Partner: MEV Isn't That Bad, How to Coexist and Evolve with MEV?

However, this technology does not necessarily have to be "DAO-ified," and the profits can be spread among many users or token holders. Users can make agreements with individual companies to save the latter's positions or directly protect them from arbitrage, as long as these companies pay a small fee. DeFi Saver will accomplish on an individual basis what kCompound does, while services like bloXroute's BackRunMe will allow users to backtrack their automated market maker (AMM) trades, letting them share in the slippage caused by the trades.

Option 3C: Evolve

Ultimately, many current protocols may not survive in their current form in the era of MEV. Many of these solutions are quite old-fashioned, merely following outdated thinking without innovation.

Some solutions, such as request-for-quote (RFQ) DEXs like 0x, 1inch Limit Orders, Tokenlon, and Hashflow, were designed from the outset to avoid MEV. In the RFQ model, users receive orders tailored specifically for their addresses—the smart contract executing the trade prevents other users from seeing the transaction and filling the order—thus, this model's percentage of total DEX trading volume is increasing. The RFQ trading volume through aggregators now exceeds that of Uniswap v2, Curve, and Sushi.

Dragonfly Partner: MEV Isn't That Bad, How to Coexist and Evolve with MEV?Look at the total volume of various RFQ trades

Even older systems are upgrading to reduce MEV. For example, Maker has switched to a new liquidation system, transitioning from fixed liquidation bonuses to Dutch-style collateral auctions, allowing users to purchase collateral at prices they deem fair and reducing the economic penalties for liquidators. Other protocols (like Euler) are exploring similar technologies like "progressive liquidation," which offers greater liquidation discounts as the degree of collateral shortfall increases. All of these reduce aggressive Gas bidding among bots, which aims to plunder free funds within the public mempool.

Looking Ahead

What does the future of MEV look like? From one perspective, we are merely predicting based on current trends to see what the endgame might look like.

More DAO-ified

Innovations around restricting bot access to protocols could continue to develop significantly. What if you had to be a member of a DAO to trade on a specific AMM? Malicious actors like those engaging in sandwich attacks could easily be identified and have their assets confiscated or be kicked out. Pseudo-witch elastic systems (like ARCx’s "Know Your Farmer" ID system) could also be used to obtain users' real identities. As mentioned earlier, protocol teams could run their own off-chain ordering systems, at which point MEV would return to token holders.

A Fairer Competitive Environment

In the past, it took a lot of engineering time to reliably view global mempool data. Now, bot developers can easily become highly competitive using services like bloXroute and Blockdaemon. It used to require complex PGA strategies to win MEV opportunities. Now bot developers can simply bid on Flashbots, and if they don’t like Flashbots, they can use MiningDAO, which attempts to open-source and decentralize Flashbots' bundled auctions. The pursuit of edges in the bot space may continue to advance, but it is currently unclear how much development space remains. Perhaps in the future, generalized front-running services will be offered as standard services alongside ETH 2 clients.

Is This a Dream?

Dragonfly Partner: MEV Isn't That Bad, How to Coexist and Evolve with MEV?

Much of this divergent thinking is possible because miners are willing and able to charge extra fees around transaction reordering. But what will happen as Ethereum transitions to PoS? If other PoS blockchains like Cosmos can provide some insights, the ETH 2 PoS mempool will likely be composed mainly of reputable, regulatory-compliant participants. From the deposit contract address, ETH 2 also seems to be moving in this direction. Would Coinbase dare to risk being investigated by the SEC to steal a few basis points of profit from Uniswap traders, or worse, to lower the value of their ETH assets to facilitate trades? As miners step out of the shadows and into the sunlight, the market for reorganizing blocks will shrink dramatically.

Dragonfly Partner: MEV Isn't That Bad, How to Coexist and Evolve with MEV?Look at the differences

Most economic activity on Ethereum may also shift to a rollup protocol, as mentioned earlier, which may earn MEV for itself.

Consider that the MEV market may also shrink due to protocol changes. With reduced slippage at execution, the ability of bots to arbitrage user trades may even be eliminated, significantly reducing AMM MEV from Uniswap V3. Protocols may also begin using verifiable delay functions (VDF) to prevent transaction ordering tricks, as Solana has done at its core, to ensure transactions are ordered by arrival time, or simply delegate ordering to something like Chainlink's Fair Sequencing Service (FSS).

Ultimately, all concerns about MEV and the demise of Ethereum seem to be hasty conclusions. With every new firearm that appears, there will be 1,000 gun salespeople and 1,000 bulletproof vest manufacturers creating prosperous business opportunities.

Thanks to Saneel Srini, Zack Skelly, and Rahul Bishnoi for their reviews.

Related tags
ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators