Blockchain

The Four Quadrants of MEV Protection

Understanding the MEV Solution Landscape

Like many other crypto narratives, the dark side of blockchain was first introduced on Reddit in a post titled “Miners Frontrunning.” In the now historical post, the author outlines how given the Ethereum mempool is inherently public, miners can frontrun transactions and profit on the ultimately arbitraged difference in that transaction. However, this isn’t an entirely new phenomenon in finance. The 2014 book, Flash Boys: A Wall Street Revolt by Michael Lewis investigates frontrunning orders in high-frequency trading. The paper Flash Boys 2.0, published in 2019, takes these observations into a blockchain level and showcases how the promised fair financial system of the future in reality has widespread arbitrage bots exploiting user transactions. Up until the Ethereum “merge” to proof-of-stake in September, over $675 million has been extracted in these arbitrage transactions! 

Likely the worst abbreviated buzzword of the blockchain industry, Maximal Extractable Value (MEV) is the reward a validator, miner, node, or any block producer can extract by reordering transactions inside any given block. MEV, however, isn’t extracted purely just by the block producers. Arbitrage traders and bot operators known as “searchers” also detect profitable MEV opportunities by using public blockchain data to their advantage. Additionally, often searchers and validators work in tandem to find potential profitable trades available on the public blockchain. Due to this, MEV became the umbrella term for any sort of arbitrage transaction that happens on-chain. Despite MEV being dominated by searchers, “SEV” (searcher extractable value) or “BPEV” (block producer extractable value) doesn’t have as good of a ring to it. In that case, MEV stuck.

Types of MEV Attacks

As mentioned earlier, MEV isn’t only limited to a protocol-level transaction reordering by the block validators. Arbitrage traders, bots, and carefully created scripts also extract a significant percent of MEV from blockchain applications. In some ways, MEV can be defined as the hidden tax behind each transaction. Prior to analyzing the MEV solution landscape, it is important to understand some of the types of MEV attacks occurring in the ecosystem. I’m aware there are many attacks happening under the radar that we are yet to uncover, but these are some of the most typical we come across.

Frontrunning:

Frontrunning is when bots closely watch a network’s mempool for profitable trades and transactions. Once a bot deems a transaction profitable, the frontrunner bot copies and expedites their same exact transaction with higher gas fees, ultimately keeping the profitable transaction for themselves. Here’s a great video of Frontrunning in Action.

DEX Arbitrage:

Given automated market makers offer divergent prices for their tokens at any given time, this creates various arbitrage opportunities for bots looking to extract the difference in prices. When two decentralized exchanges (DEX) are offering a token at two different prices, a bot can purchase on one DEX and instantly exchange it on another in a single transaction. Here’s an example of a searcher making $320k profit because of pricing differences on Uniswap and Sushiswap. In many cases, however, DEX arbitrage isn’t necessarily bad for the network. More often than not, it keeps DEX’s healthy by constantly rebalancing their pools!

Backrunning:

Backrunning is when a transaction sender wishes to have their transaction ordered directly behind a “target transaction.” Oftentimes, these transactions can be to exploit new token listings (and subsequently inflate the price), rebase tokens (like AMPL), or to take advantage of pricing discrepancies after large trades on DEXs. 

Liquidations:

A form of a backrunning strategy, searchers constantly analyze blockchain data to determine where lending protocol borrowers can be liquidated based on currency volatility or a price oracle update. Once a position can be liquidated, the bot submits the liquidation transaction and profits the liquidation fees.

Sandwich Attack:

Searchers scan the mempool for potential large DEX trades. Prior to a trade happening, a searcher buys the asset that will ultimately appreciate in value, and right after the whale’s trade executes, the searcher sells the same asset, thus “sandwiching” the whale’s trade. Sandwich attacks can also be exploited by liquidity providers by creating higher slippage for a victim’s trades. This article excellently explains the intricacies of sandwich attacks.

Sandwich attack by an arbitrage bot visualized (Source: Liyi Zhou)
Sandwich attack by a liquidity provider visualized (Source: Liyi Zhou)
Time Bandit Attacks:

Time Bandit Attacks is the strategy behind the definition of MEV: reorganizing past blocks and proposing competing blocks containing altered transactions at the expense of the users of the network. Although exceedingly difficult to pull off, if it were to happen it can certainly impact the security and consensus of a blockchain. 

NFT MEV:

As expected, searchers or block producers can design transactions to be the first in line to purchase a coveted NFT, or purchase many in the same transaction. 

JIT Liquidity:

Just-In-Time liquidity is a form of MEV in a transaction sequence where an LP mints and burns a position immediately before and after a swap. Although actually improving the execution of trades that would otherwise suffer high price impact, it is highly competitive and a minimal amount of JIT liquidity trades actually go through.

JIT Liquidity Visualized (Source: Jon Charbonneau, Delphi Digital)

Some other fascinating MEV attacks are cross-chain MEVstablecoin arbitrages, and uncle-bandit attacks.

Effects of MEV: The Bad and the Good

From a first glance, MEV appears to be an existential threat to blockchain. The hidden costs of transactions lurking underneath every wallet signing surely cannot be economically viable for a new technological paradigm. In fact, MEV is one of the few phenomena that cause a significantly worse experience for novice and advanced blockchain users alike. Users suffers increased slippage and worse execution for large trades (as a result of sandwich trading and DEX arbitrage), an increase in gas prices and slower execution of trades (a result of frontrunning), and everyone suffers the threat to the blockchain consensus stability (a result of validator reorganizing blocks). These concerns remove the entire bull-case for blockchain: security, immutability, and trust.

Yet, despite the negative implications, there are some positive factors to coexisting with MEV. Arbitrage traders ensure token pricing across AMMs are equal, satisfy mechanisms for stablecoins to remain at parity, ensure DeFi loans will have smooth liquidation processes, and keep block proposers incentivized to increase blockchain security (by offering higher rewards). This case for “good MEV” seeks to amplify the good aspects of MEV while minimizing the negative impacts.

Regardless of whether you believe the positives of MEV outweigh the negatives (or vice versa), the reality is MEV is here to stay in some capacity, especially in a post-merge world. Now, given there are differing viewpoints of MEV and how it lives within blockchain, it would make sense that there would be divergent approaches to approaching the MEV situation. As such, the blockchain ecosystem is actively discussing and working on solutions to mitigate or at least minimize MEV’s effects. Various solutions have been proposed from both sides – those who believe MEV is inevitable and access to it should be democratized, and those who are trying to prevent it. 

There are several different ways of categorizing and approaching MEV. We can categorize by perception and view of the MEV problem:

  • Offense – MEV is inevitable, let’s find a way to extract and democratize it.
  • Defense – MEV is an existential threat, let’s try to prevent it.

Or, as inspired by @Hasu, by where these solutions are taking place:

  1. P2P layer
  2. Application layer

In theory, all MEV protection solutions are being built on-chain, yet some are purely utilized on an application level via a designated frontend. Calling these user-facing platforms an application layer is surely acceptable. By looking at the MEV solution space through these lenses, we have in effect created the four quadrants of MEV protection

The four categories are:

  1. Offensive on-chain protection
  2. Offensive applications
  3. Defensive on-chain protection
  4. Defensive applications
The Four Categories of MEV Protection

In this article, I explain the different players in each camp, how exactly they are tackling the MEV dilemma, and some of my thoughts for where the industry is going. I’m aware there are many I didn’t feature here – the entire industry is moving at the speed of light. If there is demand, I will publish a follow-up outlining the solutions I didn’t feature. For now, here are the four quadrants of MEV protection (as of November ‘22).

The Four Quadrants of MEV Protection

Offensive On-Chain

Flashbots

Flashbots is an R&D organization working on mitigating the negative effects of MEV. Through a collection of coordinated research and products, Flashbots has solidified their name in being one of the leading organizations in democratizing and redistributing MEV revenue while bringing more transparency to the ecosystem. The Flashbots ecosystem begins first with Flashbots Auction. 

Flashbots Auction

Flashbots Auction is a private communication channel between Ethereum users and validators for efficiently communicating preferred transaction order within a block. Flashbots Auction was first introduced as mev-geth (a patch on top of the go-ethereum client) coupled with mev-relay (transaction bundle relayer) on proof-of-work Ethereum. Now on PoS Ethereum, Flashbots Auction is built on MEV-Boost (more on that later).

Flashbots Auction skips the traditional open bidding auction which creates unnecessary network congestion and adds an additional cost to bidders. Instead, Flashbots Auction uses an auction mechanism allowing users to privately communicate their bid and transaction order preference without paying for failed bids, all while maximizing validator rewards and preventing frontrunning. The combination of the private transaction pool coupled with sealed bids ensures both the fair and optimal block construction for the Ethereum network.

Jon Charbonneau
MEV-Boost

Given Ethereum’s merge to proof-of-stake, Flashbots Auction shifted to mev-boost, which is an implementation of proposer-builder separation (PBS) for PoS Ethereum. MEV-Boost lets validators outsource block construction to a competitive marketplace of block builders, and accept the most profitable block construction through a service called relays – thus minimizing the negative effects of MEV. MEV-Boost enhances Ethereum’s security and decentralization by enabling all validators, regardless of their size, to receive PBS-enabled MEV rewards, as opposed to only a small number of large, whitelisted, enterprise validators. 

Transactions are typically uploaded to the blockchain in one of two manners: the public mempool or through private RPC’s (AKA exclusive order flow). Regardless, the MEV-Boost transaction flow is quite similar. Transactions that are sent to the public mempool are ordered by “searchers” into bundles. These bundles are typically ordered in a way that extracts the most MEV. Then, the searchers ship their bundles to the block builders, who gather the bundles in a manner that maximizes the MEV profit for them while building them on the block. Ultimately, they send the block (which has a collection of bundles built in) through a relay, who aggregates the blocks from multiple builders and ranks them in order of reward, in addition to filtering them for censorship. The validators then selects the most profitable block received from MEV-boost and adds it to the Ethereum network. 

Flashbots Github
The Four Participants of MEV-Boost:
  1. Searchers are bots, advanced Ethereum users, traders, or anyone actively searching the mempool for arbitrage opportunities that find profitable transactions and attempt to have their transactions included in a block. Searchers collect transactions, add them to bundles, and send them to block builders.
  2. Block Builders are specialized entities that connect to searchers and take bundles (consisting of transactions) and create a final block to send through relays to validators.
  3. Relays collect blocks from multiple block builders and select the most profitable one (determined by the builders’ bids) to send to a validator for proposal. Relays play a critical role in censorship because they are able to pick and choose which blocks to include (more on this later).
  4. Validators subscribe to one or more relays using MEV-Boost and propose the most profitable block of the ones received from the relays it is subscribed to, ultimately validating and finalizing that block on chain.
The MEV-Boost Process (Flashbots)

Since Ethereum hasn’t fully added PBS onto its protocol, MEV-Boost is currently a sidecar to the block producing and MEV minimizing ecosystem. Eventually, upon a few more steps on Ethereum’s upgrade timeline, MEV-Boost be directly enshrined into the Ethereum base layer via Proposer Builder Separation (PBS), which would completely separate the role of builder and proposal at the base level and will remove the need for relays altogether. As you can see, the vast majority of MEV-Boosted blocks are through Flashbots:

MEVBoost.pics, screenshotted 11/14/2022

What’s most impressive however, is MEV-Boost’s entire functionality is purely run on trust.

Jon Charbonneau, Twitter
Flashbots Protect

In addition to Flashbot’s MEV protection on a validator level, Flashbots also has several products for any blockchain user to protect themselves from MEV. Flashbots Protect is Flashbot’s tool for users and developers for frontrunning protection. Flashbots Protect RPC allows regular users to easily submit their transactions to the Flashbots Auction by using a custom RPC endpoint in their wallet. Everything is the same for users, except transactions are sent to the Flashbots builder instead of the public mempool. Thus, these transactions are completely private and won’t be seen by the hungry arbitrage bots lurking the mempool. It’s super intuitive for users to interact with it – in fact, it’s as simple as adding a URL to MetaMask!

Censorship Issues, Downsides, and Next Steps

Despite the incredible advances of Flashbots, there still remains several concerns with their solutions. Some of the issues that arise are inherent with their technology, for example, if the entire network connects to the same relay and that relay is the highest bidding relay it will certainly be selected by validators. But what if that relay withholds blocks from the validators, that would end up creating an endless cycle of empty slots being published to the chain. This concern is known as liveness issues. Luckily, Flashbots outlines two potential solutions for liveness issues, and once PBS is enshrined within Ethereum itself this problem will go away on its own. Not only that, if MEV-boost has no relays running or or all relays are offline, then the beacon node will always fall back to constructing a block from the public mempool.

Another issue that arises with Flashbots is their centralization concerns. Since it is a private organization creating products for the greater good of Ethereum, there is always a fine line between what the greater Ethereum community wants and does not want. Recently, Flashbots announced that it would, in accordance with U.S. Treasury Department sanctions, begin censoring transactions that the U.S. Treasury’s Office of Foreign Asset Control (OFAC) blacklisted (meaning all Tornado Cash transactions. This has created quite a bit of backlash from the public, and brought forth several philosophical blockchain-related questions. Regardless, the vast majority of transactions on MEV-Boosted blocks are OFAC compliant, and it’s certainly trending in that direction as well. 

Screenshotted from MEV Watch on Nov 8th 2022

Recently, Flashbots announced they have been developing the next iteration of their software under the stealth term “SUAVE” – the Single Unifying Auction for Value Expression. From the early teases, it appears SUAVE will be a MEV-aware, encrypted mempool for users and wallets. They plan on creating it fully decentralized, open-source, EVM compatible, with rollup and cross-chain support. I’m quite excited for this, and I expect this to change the MEV protection paradigm significantly. 

Manifold Finance

Like Flashbots, Manifold Finance builds technology and infrastructure to minimize the negative effects of MEV. The foundation of Manifold Finance is their SecureRPC system, which allows users to submit secure and private transactions. By sending orders to an RPC endpoint like Manifold’s SecureRPC or Flashbots, users’ transactions are sent through an intermediary which protects the users from hungry searchers hanging out in the public mempool looking to capitalize on your trades.

On top of their SecureRPC, Manifold offers several products. OpenMEV (formerly known as YCabal), is an SDK enabling protocols and applications to protect against direct MEV arbitrage. OpenMEV allows protocols to recapture inefficient implementations and return it back to their users. In fact, Manifold Finance already has some big name partnerships, Sushi Guard is the OpenMEV implementation for Sushi. Whenever you submit a trade on SushiSwap, if your trade is eligible for getting its transaction cost refunded you’ll get a rebate of ~90%. However, if your trade is not eligible, it will be immediately submitted through a private RPC layer. Although you won’t get a transaction rebate, you still benefit from a protected trade submission. Manifold Finance additionally runs their own block-building MEV relay (similar to Flashbots), however it’s claim-to-fame has been that it is censorship resistant (unlike Flashbots). You can see the entire ecosystem around SecureRPC here:

Manifold Finance Docs 

The Manifold Finance ecosystem revolves around their FOLD token. All the MEV the integrated protocol (OpenMEV) captures is then re-distributed: 50% users, 25% validators, and 25% xFOLD stakers. They are expected to announce the second iteration of their staking product shortly, which the community is anticipating. Yet despite being quite impressive, Manifold Finance’s documentation is incomplete, so I couldn’t fully dig into the technological intricacies of their products. Additionally, there were some concerns around the organization of their staking, how the company and founder present themselves on social media, and their tokenomics model. The question whether these concerns justify not censoring transactions, especially when that issue is pretty minimal, is one to be discussed. Ultimately, Manifold Finance has an incredible opportunity to take control of the MEV ecosystem, but only if they play their cards correctly.

BloxRoute

After Flashbots, BloxRoute is emerging as the second biggest relay provider. They currently run three different relays: BloXroute Max Profit, BloXroute Ethical and BloXroute Regulated. Below are their specifications:

BloxRoute Docs

Given the discussions today revolving whether it is the relay’s responsibility to sensor sanctioned transactions, the CEO of BloXroute Labs, Uri Klarman, told CoinDesk that BloXroute “felt that deciding whether validators should or shouldn’t include [sanctioned] transactions is outside our pay grade” and that it chose to introduce a relay that censors Tornado Cash depending on users’ discretion and specific legal standing. 

In addition to BloxRoute’s relay offerings, they also have an offensive application product called BackRunMe, which allows users to safely submit private transactions while allowing searchers to backrun the transaction via MEV to produce additional arbitrage profit. The private transaction feature keeps your transactions hidden from the hungry front-running and sandwich bots scurrying around the mompool. Additionally, if a backrun is available, then BackRunMe gives a portion of this additional profit back to the user. These backrun transactions do not affect the transaction submitted by the user since it occurs after the transaction is confirmed so a win-win for all. Currently, BackRunMe can be used on SushiSwap and Uniswap V2.

How BackRunMe works
Backrunning Profit Sharing

BloxRoute offers an additional frontrunning protection product called Fast Protect which is usable on all Dapps on Ethereum, although it is not so beginner friendly. Regardless, BloxRoute is a leader in the MEV protection space.

Eden Network

Eden Network is the fourth offensive on-chain solution for MEV protection. Similar to the above three, Eden has three related but distinct products for MEV protection: an RPC, relays, and bundles. Eden RPC is an RPC endpoint that users can add to their wallets which sends their transactions to Eden builders. The Eden RPC powers the Eden Relay that connects validators to a network of block builders in order to maximize validator yield. This way, users are guaranteed not to be frontrun in Eden blocks. Finally, through Eden’s RPC, sophisticated Ethereum users called “searchers” can send “bundles” to Eden’s network of block builders. Amongst all MEV-Boosted blocks, Eden is doing pretty well (but still one is even close to Flashbots).

MEVBoost.Pics, screenshotted 11/14/2022

Another relay provider that is important to mention is Blocknative. Their relay, called Dreamboat, is publicly available, transparent, although filters sanctioned addresses. As you can see above, it’s also a chunk of MEV-boosted blocks on-chain. The question of transaction censorship is one to be discussed, and the blockchain community has had quite a lot to say on it lately. Despite the controversies and arguments on whichever side you’re on, Flashbot’s and the entire MEV-boost ecosystem has done quite a lot for blockchain and MEV protection. I am curious and anticipating the next steps for this field of MEV protection

Controversies in MEV-Boost

In addition to the MEV-boost offering, there are several other notable projects that are worth mentioning that are building on-chain offensive protection. 

Skip Protocol

Skip Protocol is building ecosystem-aligned MEV products on Cosmos, amplifying the effects of good MEV and minimizing the effects of bad MEV – and redistributing those rewards back to validators and stakers. Skip identified the following problems on Cosmos chains, given its a first-come-first-serve mempool, quoted from Skip’s whitepaper:

  1. Execution Risk: In periods of high chain congestion, there’s no way to express that certain transactions are “more important” or more economically valuable for the trader or for the ecosystem. This happened extensively during the 5/9 Terra depeg.
  2. Wasted block space and gas: You can find a graveyard of multiple failed transactions behind large arbitrage opportunities (e.g. see Terra Classic block 5635240) from the rush to be first.
  3. Centralization of profits: Almost all arbitrage opportunities are won by a very few addresses, likely controlled by a couple HFT shops that can afford the massive low-latency infrastructure required to win the race. This amounts to a hidden tax on Cosmos users and validators who create these arb opportunities but can’t capture them.
  4. Consolidation of participants: MEV searchers and validators are incentivized to vertically integrate to get their bots and nodes on the same servers for faster mempool access and transaction broadcasting. (e.g. We’ve seen partnership progress between MEV-searchers and validators for preferential access), which undermines longterm decentralization.
  5. Chain halting risk: Large waves of spam can knock out full nodes or validators (when they expose ports), as has happened recently on other layer 1’s (e.g. Solana)

Thus, Skip’s proposed solution is to create a sealed-bid closed auction system that allows traders to submit tipped transactions to validators who prioritize them at the top of blocks based on blocks.

Skip Transaction Ordering

By doing so, validators will receive more rewards per transaction and staking profits will increase as MEV rewards are distributed to stakers – a win-win! 

Just recently, Skip announced their Skip-Select product, allowing validators to completely decide how they are building their blocks. Validators can choose how MEV rewards are dispersed, whether Skip is building their blocks, compliance, governance, and a variety of other MEV preferences. This is all a part of their Sovereign MEV vision, which is to allow stakers, validators, and core devs for app-chains to decide how their MEV markets work. To do this, they are developing the MEV-SDK, which brings these preferences and block-builder rights in-protocol and on-chain. At the time of writing, Skip is active on testnet and mainnet for Juno, and will be launching on Evmos, Terra2, and other Cosmos chains soon. Additionally, they have been in talks with Osmosis on a variety of partnership integrations. You can track how many validators are actively running Skip on their dashboard here

Jito Labs

Unlike the previous projects mentioned which are in the Ethereum and Cosmos ecosystems, Jito Labs is on a mission to scale Solana through high-performance MEV infrastructure. Given they are in the offensive MEV category, they attempt to minimize the negative effects of MEV while maximizing the good MEV to be redistributed to users. Through three different product offerings, which work in unison, Jito is leading the pack in minimizing MEV on Solana. 

First, validators run Jito-Solana, which is a modified Solana Labs validator client allowing validators to create “bundles” of transactions, giving searchers and high frequency traders the flexibility in expressing transaction ordering. The open-source Jito-Solana validator is the centerpiece of the network and manages communications with the Jito-Relay, which performs filtering and signature verification for the transactions being processed. The highest bidding and most profitable bundles are sent to the validators from the relayer to be added to the chain. Additionally, Jito offers a Block Engine, which connects relayers, searchers, and validators via an off-chain sealed-bid auction for transactions to be added to the chain. The Block Engine simulates every transaction combination and forwards the highest paying batch of bundles to the leader for block inclusion. At the auction expiration, the most profitable bundles are sent to the leader to be executed immediately. What’s neat is that the Block Engine is globally distributed to ensure that validators and searchers get low latency access wherever they are.

Jito Documentation

Validators MEV profits are then split up and distributed at the end of each epoch. Here is a cool spreadsheet Jito made to calculate validator profits pre and post MEV profits.

Ultimately, the offensive on-chain camp has made incredible strides in their share of MEV protection. My hope is that they will continue innovating, as validators are the foundations of every network. Now, we will analyze the offensive application MEV protection ecosystem. 

Offensive Application Layer

Offensive applications are solutions that believe MEV is inevitable, so they offer application and user-facing solutions to extract and democratize it. We already discussed BackRunMe above (as it’s part of BloxRoute’s product offerings), so now we will dive into the two other major players in this camp.

Rook Protocol

Rook Protocol is one of the first MEV extraction solutions aiming to catch MEV on the application layer, protecting users and protocols from negative externalities and reducing the total MEV available at the consensus layer. Ultimately, Rook redistributes the MEV profits amongst participants in a way that increases overall network and market efficiency.

The Rook Protocol runs on ROOK, an ERC-20 governance and utility token used to discover the value of MEV in a transaction as it is processed. Everyone using the Rook Protocol – users, smart contracts, market makers, keepers – are connected through the ROOK token ecosystem. Keepers are automated bots that fulfill the user’s transaction that stake ROOK into a coordinator smart contract and receive xROOK in return. Keepers constantly watch the transaction mempool for arbitrage opportunities. Once a profitable transaction is spotted, Keepers have a bid war using their xROOK for the opportunity to execute the transaction. The Coordinator Auction Module greenlights the Keeper who won the auction, and they fulfill the transaction while distributing the bid the Keeper paid for that opportunity. Meanwhile, ROOK token holders can stake their ROOK in the Rook staking pool, receiving xROOK in exchange. A percent of the value captured in every bid goes directly to xROOK holders giving them a yield that directly corresponds to the utility and success of the Rook Protocol. 

Rook Documentation

This is built with Rook’s “hiding book”, an off-chain orderbook that hosts transactions only fillable by Rook Keepers. Orders that are sent through the hiding book are inaccessible to other predatory MEV bots, thus allowing the user to receive their transaction at their target prices. Rook’s hiding book can even be utilized via their own DEX, Hiding Game, their API, or through their partner integrations. 

Rook Documentation

B.Protocol

B.Protocol is another offensive application level MEV solution. However, it focuses on the loans and liquidations sphere (as opposed to the other solutions mentioned which are increasingly more DEX, frontrunning, and sandwich attack focused). B.Protocol democratizes liquidations, ensures higher capital efficiency, and fights MEV. 

On the platforms that B.Protocol is integrated with, it pools users’ funds into a Backstop pool that is used for liquidations. While funds are sitting idle, they reside in a yield bearing platform and generate passive revenue to the users (interest rates or liquidity mining rewards). Once a liquidation takes place, the smart contract pulls the needed funds from the backstop to facilitate the liquidation, and automatically puts the seized collateral for sale. Once sold, the return is deposited back to the backstop pool, and profits are accrued. Here’s a great overview of how it works.

B.Protocol Documentation

By creating democratic pools that anyone can participate in, B.Protocol shares MEV profits with users who deposit collateral and give them liquidation priority. B.Protocol is currently live over several big-name projects, including Liquity’s Chicken Bonds. B.Protocol is distinct in the sense that it is one of the lone players in the MEV protection space for liquidations, in an already niche offensive application layer category.

Ultimately, offensive application layer protection has a relatively smaller number of actors, although each is certainly unique and admirable in their own right. I am increasingly optimistic about the future of this camp.

Defensive On-Chain Protection

As mentioned earlier, these solutions believe MEV is an existential threat to blockchain so they offer on-chain and consensus layer to ideally completely eliminate it. There are definitely some fascinating players in this field, so I’m keeping my eye out and watching this camp evolve closely.

Chainlink Fair Sequencing Services

Another major player entering the MEV protection space is Chainlink, the decentralized oracle network. For those not familiar with oracles, they basically securely connect smart contracts with off-chain data. This could be used for financial markets, sports data, or even niche things like weather and carbon credits. Chainlink is now taking this a step further by implementing MEV protection to their smart contract add-ons – by introducing Fair Sequencing Services (FSS). In short, FSS is an oracle network that orders the transactions sent to that smart contract. It collects the users transactions off-chain, generates the order based on the smart contract developer’s specifications, and submits the transactions to the chain in a decentralized manner.

Fair Sequencing Services Flow Model

Additionally, FSS could be used not just on smart contracts in a pre-processing stage, but on a block-building and rollup level as well. Today, FSS is already a fully-functioning prototype, and they have a pilot program with Arbitrum! The entire blockchain and MEV community is anticipating the full-scale launch of FSS in the coming months.

Secret Network

Secret Network is a layer-1 blockchain built on the Cosmos IBC featuring ​​privacy-preserving smart contracts. Secret’s smart contracts, known as “Secret Contracts” are private by default. Everything is encrypted (input, output, state, etc) and can’t be viewed by others, unless they’re given access. This opens up use cases that aren’t possible on traditional public blockchains. Built on these secret contracts is “Secret DeFi”, which is their privacy preserving decentralized finance ecosystem. Like all other DeFi applications, users can trade, swap, buy, loan, sell – however your data is private by default. Due to this inherent privacy, orders are not visible on the mempool. Thus, being protected from the hungry MEV frontrunning and sandwich bots. Secret Network is one of the few (if not the only) protocols that has privacy as a right, not a feature – and its benefits are definitely felt in the MEV space.

Cosmos 2.0

Recently, Cosmos announced the second iteration of their Internet of Blockchains product offering. With a variety of new features worth an article in their own right, the focus is on the Interchain Scheduler – their proposed solution for combatting MEV. However, in an unexpected turn of events, the ATOM 2.0 proposal was rejected by the ATOM community. Regardless, I do think it is worthwhile to elaborate a bit on the proposed (although with an unclear future) Interchain Scheduler.

Since the Cosmos ecosystem is made up of several blockchains, there is a difference in asset prices across the decentralized exchanges in the network. In addition to creating obvious DEX arbitrage opportunities, it also introduces more complex and intricate frontrunning and sandwich attacks. The Interchain Scheduler proposed creating a MEV market on-chain, helping Cosmos’ appchains sell a portion of their blockspace as tradable NFTs. With the Scheduler, they will reserve block space on the participating blockchains through an auction. Then, this payment will be redistributed across the entire ecosystem (stakers, validators, etc.). 

The Interchain Scheduler

The technical intricacies could be found here, although I do expect it to change a bit before being fully executed on-chain.

Other Defensive On-Chain Tools and Solutions

In addition to the products featured above, there are a variety of other defensive on-chain solutions for MEV protection. 

Submarine Sends:

Submarine Sends is an open-source smart contract library that protects your contract against front-runners by temporarily hiding transactions on-chain. In short, the user commits his transaction to the submarine address, hiding the data submitted to the smart contract and locking the value being sent. Once the committed transaction holds it’s spot on chain, the smart contract unlocks the data being stored and verifies it. 

Submarine Sends Flow Model

All the code for Submarine Sends is publicly available on Github, although it hasn’t been updated in several years.

ZeroMEV

ZeroMEV is a fully decentralized solution for Ethereum validators to protect their users from frontrunning and censorship. When using MEV-Boost, users could occasionally be frontrun by milliseconds. To prevent this, ZeroMEV protects their users by ordering transactions by time instead of by gas price or MEV. In fact, ZeroMEV protects users up to a difference of 500 milliseconds! To use ZeroMEV, only three lines of code in the original Geth are changed. However, currently using ZeroMEV is purely for altruistic purposes, as validators will likely earn less because they are only paid in tips after EIP-1559. Validators can backrun transactions, however, thus creating a bit more profit. Regardless, ZeroMEV is an incredible MEV protection tool for validators.

Salmonella Attack

In a play to trick the sandwich trading bots, Defi-Cartel introduced a pretty neat technique to bring power back to the trader. The Salmonella idea is the following: create a typical ERC-20 token, however whenever someone other than the specified owner transacts with it, it only returns 10% of the specified amount – despite publishing event logs showing the full trade. As you can see here, it had several big exploits in its heyday. 

The Poisonous Function

The Salmonella contract was certainly a slap in the face for all the arbitrage bots looking to pickpocket us typical users.

Kattana

Another great story of fooling the bots, Kattana is a cross-chain trading terminal for DEXs and CEXs. During their token launch, they included a trap for front-running bots preventing them from selling their tokens. This little addition to their smart contract made a bot lose 68 ETH for tokens he couldn’t get rid of. Sometimes, the predator becomes prey

Ultimately, the defensive on-chain protection camp is quite advanced, technical, secretive, and even humorous at times. Surely upon the launch of Chainlink’s FSS this camp will create even more waves across the industry. If any readers have any other examples of fun ways to fool the bots, send them my way!

Defensive Application Layer

Finally, the last camp to be discussed is the defensive application sphere. These are the solutions that believe MEV is an existential threat to blockchain so they offer application and user-facing solutions to completely eliminate it. Many of these are products novice users of blockchain are already familiar with, yet it is important to dive into their MEV protection functionalities. To best explain them, they could be divided up into categories. 

Automated Market Makers (AMMs)

To discuss the defensive application camp, it is imperative to begin with automated market makers. For a rundown on AMMs, read this article I wrote a bit ago. 

MEV Capturing AMM (McAMM)

There’s been a lot of discussion around MEV capturing AMMs recently. In short, the idea is the following: the AMM auctions off the right to the first trade per block, thus selling a potential MEV slot and redistributing those profits to traders, stakers, and even potentially searchers. I highly recommend a read through the whole proposal as it is very interesting. If anyone has any further resources of AMMs trying this out, please send them my way!

Concentrated Liquidity

In March 2021, Uniswap announced their third iteration of their platform, Uniswap V3. In it, they introduced a completely new paradigm for DeFi and AMM’s: concentrated liquidity. In short, concentrated liquidity gives LP’s granular control over what price ranges their capital is allocated to, thus providing significantly higher capital efficiency and significantly lower slippage, while also protecting against any asset freefall scenario. Since it creates a lower price impact on every trade, it certainly has less of a MEV impact as well. Additionally, there’s a fascinating JIT liquidity MEV technique on concentrated liquidity pools that actually benefits the trader. While concentrated liquidity doesn’t remove MEV completely, it certainly minimizes it. 

There are a variety of other MEV-resistant AMMs, some of the ones that I have in mind are: HashflowDualitySwapSwap, and Wendy (a key feature of Vega Protocol). This region of MEV protection is flourishing with innovation and I am very much looking forward for the next stages in development here.

DEX Aggregators

For those not familiar with DEX aggregators, they connect hundreds of DApps all in one and offer the best exchange rates through these various liquidity pools. I discuss DEX Aggregators briefly in this article

1inch

1inch is the best known and most widely used DEX aggregator. Recently, they collaborated with Flashbots to protect their users from frontrunning and sandwich attacks. Through the 1inch exchange now, users can select to route their transactions via Flashbots, which creates a direct connection between the validator and 1inch. However, I am not sure if this has been updated or if it’s still functional post-merge. If anyone from the 1inch team is reading this, please do let me know! Another frontrunning protection tool that 1inch offers is an “auto-slippage” that will minimize likelihood of a bot targeting a transaction, given it will have lower slippage tolerance and as a result less room for manipulating the users desired amount returned.

CowSwap 

CowSwap, in short, is the DEX aggregator of DEX aggregators. Trades on CowSwap could be settled via connected on-chain AMMs, other DEX aggregators, and a unique feature called Coincidence of Wants (CoW). In short, CoW’s network of “solvers” scans each batch for coincidences of wants (when traders who want what each other has). These CoWs are matched peer-to-peer, so everyone gets a better price and no one pays unnecessary AMM fees. This is in addition to searching all other liquidity sources for potential best trade prices. Then, CoW submits these trades in batches to the chain, hiding them from the public mempool and in effect from transaction reordering miners and hungry sandwich bots. CoW Protocol is certainly unique in this regard, and they have quite a bit of research proposals as well on other potential MEV solutions. I’m curious to see what other MEV innovations they implement.

Some of the other miscellaneous defensive application-layer MEV protection solutions are MistX LabsDFlow, and Shutter Network. As you can tell, this camp is quite crowded, but each player is doing a significant part in reducing MEV and protecting their users. A prediction of mine is that in the future, DApps that don’t protect their users from MEV will suffer a significant lack of users and MEV protection will need to be an industry standard.

Current Problems and the Future of MEV

Now that we’ve gone through the entire MEV solution landscape, it is important to mention the concerns and problems that still arise, in addition to understand where the next innovations will take place. 

First, like most other problems in blockchain, the problem is just too complex for the masses to understand. The vast majority of blockchain users will simply transact with worse execution rates. Although this may not be such a problem in the short term due to a few cents being lost per trade, blockchain will never be the financial status quo of the future if these concerns are not understood, let alone solved. To take that a step further, the solutions being offered are also incredibly complicated with a variety of actors to understand. On the other hand, however, being MEV-aware does not drive adoption, which is an interesting philosophical discussion in itself and one to be considered when developing these applications. 

Second, the solutions being offered don’t offer ownership nor a stake in their network (ROOK and COW aside) – they are purely add-ons or features to their protocols and seldomly are profits being distributed. The solutions that do have profits being distributed, are being distributed in their own token as opposed to the implemented DApps token itself (this is only applicable on the application layer). 

Last, many of the solutions in the current landscape have some implementation of private orderflow or shielded transactions. Recently, the argument has popped up that private orderflow has its downsides – removing the public nature of blockchains and potentially leading to centralization. The reality is there will always be tradeoffs on both sides, so users or applications will need to pick their poison.

Despite these concerns, the innovations happening in the MEV protection space are dumbfounding to watch. The sheer length of this article alone highlights how important, fascinating, and lucrative this problem is. In that regard, I could certainly see mempool development being one of the leading themes of 2023, especially as troughs of bear markets are prime innovation hubs for underlying infrastructures. 

Additionally, there are some predictions of major DEX’s becoming block builders in the future which would certainly create an interesting dynamic in this space. The rising interest in privacy preserving chains and applications after the whole Tornado Cash debacle also raises some eyebrows, especially since MEV could be mitigated through these platforms (like Silent ProtocolNucleo, and Aztec Network). 

Since the fallout of FTX in recent weeks, I believe this will emphasize MEV even more. As more and more transaction flow will go on-chain and ditch centralized alternatives, bots will be jumping at the thought of unsuspecting users bringing their stacks to DEXs and AMMs. I’ll be watching the mempools for the next several weeks to absorb all the action.

The question whether MEV is an existential threat or solvable challenge to blockchain is ultimately in your hands. The current landscape of solutions has been outlined, but transactions are still being frontrun and bots are still making delicious sandwiches. Whether we’ll need to learn to live, cope, or potentially profit with MEV, or if we’ll completely forget about it several years from now is a question I think about often. For now, let’s try our best to keep the bots hungry.

Photo by Nathan Watson on Unsplash
  • Coinsmart. Europe’s Best Bitcoin and Crypto Exchange. Click Here
  • Platoblockchain. Web3 Metaverse Intelligence. Knowledge Amplified. Access Here.
  • Source: Plato Data Intelligence: Platodata.ai