What is MEV?
An Overview of MEV
In the cryptoverse, Maximal Extractable Value (MEV), is the practice of eeking out value by understanding what transactions are in the mempool and inserting/re-ordering them to squeeze some extra value based on this information.
Mempool Article: https://tara-annison.medium.com/what-is-a-mempool-f6a403d4871e
It was previously known as Miner Extractable Value however with Ethereum’s transition from a proof-of-work blockchain with Miners, to a proof-of-stake blockchain with Validators, the name was changed to be more futureproof.
The mempool has been referred to as a “dark forest” where unsuspecting and unwitting users can find themselves being sniped by clever MEV bots who are scouring the dark forest for opportunities. They are able to do so because the mempool is a transparent ‘list’ of all transactions which are waiting to be processed. As such it contains a future view of what trades are about to be placed, and using this information, the MEV bots can make trades which profit off this. Therefore whilst some refer to MEV as “insider trading”, it’s important to note that all information is publicly visible within the mempool and those who are able to make MEV-related profits are simply better at deciphering these signs, turning them into profitable strategies.
One particularly effective MEV bot is called jaredfromsubway.eth who specialises in what’s know as “sandwich attacks” — we’ll go into more details on this below. On April 17th, more than 60% of blocks contained transactions from jaredfromsubway.eth, and this bot alone has generated upwards of $30 million in revenue!
Other MEV bots have found it to be incredibly profitable too with almost $400m in cumulative weekly ETH being returned to proposers.
Types of MEV
MEV has several forms, including sandwich attacks, arbitrage across decentralized exchanges (DEXs), liquidation tactics, and front-running trades. Even paying a higher fee to accelerate a transaction could be seen as a type of MEV, although it’s not necessarily seen as ‘toxic’ in the way other MEV strategies are.
- 🏃 Frontrunning is where an MEV bot will see a pending transaction in the mempool and look to insert a transaction in front of it to snag a profit. For example; a user may be about to purchase a large amount of token X on a DEX and the MEV bot will front run the trade by submitting a similar trade *before* it knowing that the big purchase of the token afterwards will likely push up the token price. The MEV bot can then sell the tokens afterwards at a profit.
- 🏦 Arbitrage refers to the practice of taking advantage of price differences between different DEXs or tokens. For example: a user may be about to make a large trade that is likely to significantly affect the price of a token on a specific DEX. In that case, an arbitrage bot can spot this pending transaction and realise that the price of the same token on a different DEX is about to become more favourable. The bot can then submit a transaction to buy the token at the lower price on the other DEX and sell it at the higher price on the original DEX, making a profit from the price difference.
- 💧 Liquidation refers to the practice of capitalising on the liquidation events of over-leveraged positions in DeFi platforms. It works as follows:
On DeFi lending platforms, users can take out loans by locking up their crypto as collateral. If the value of the collateral falls below a certain threshold (known as the maintenance margin), the platform triggers a liquidation event to ensure the loan is covered. In this event, the collateral is sold off, often at a discount, to cover the loan.
A liquidator, often an MEV bot, monitors the blockchain for these impending liquidation events. When the liquidator spots a potential liquidation in the mempool, it can act fast to buy the liquidated assets at a discounted price before anyone else, and then sell them off at market price for a profit.
In this case and the other MEV attacks, it’s likely the victim has no idea that they have received a less favourable price due to an MEV bot exploiting their transaction. However it’s worth noting at this point that the often opaque markets in TradFi likely create similar situations for retail and institutional traders alike. One person’s exploitative trading action is another’s highly profitable trading strategy.
MEV Players
The main roles in the MEV value chain are: users creating the transaction, searchers spotting MEV opportunities, bundlers assembling bundles of transactions with MEV opportunities (and inserting their own for profitable strategies) and then relayers who pass these blocks of transactions onto the validators for processing.
MEV: Good or bad?
Whilst earning some serious dollar for the MEV bot operators, MEV is most often perceived negatively in the space since it takes advantage of every day traders and crypto transactors, and can leave them with a worse deal.
As such there are already efforts being made to stop MEV opportunities or return some of the economic value back to users and dApps.
These initiatives include:
💸 MEV-Boost 💸
MEV-Boost allows validators to sell blockspace to an open market of builders who can then insert some MEV making opportunities. This helps to ensure validators get a cut of MEV opportunities. Technically, it’s an implementation of proposer-builder separation (PBS) built by Flashbots, a leading dev firm working on MEV related projects.
MEV-boost is currently used by ~20% of validators with this number steadily climbing since it was released in September 2022. However there was controversy initially around MEV-boost as many validators running it were also creating OFAC compliant blocks and blacklisting accounts that features on the OFAC SDN list. At one point this was over 50% of all blocks as processed by the network. However it currently stands around 26%.
In addition to MEV-boost, Flashbots has two other negative impact mitigating MEV initiatives.
⛔ Protect ⛔
An RPC endpoint/API to bypass the public mempool for private execution.
💸 Auction 💸
An offchain & permissionless blind auction for bundle inclusion
In line with these, solutions like Cashmere Labs (recently announced as testnet launched) is for MEV-protected cross-chain swaps across 11 chains: Ethereum, BNB Chain, Arbitrum, Optimism, Polygon, Avalanche, Fantom, Base, Polygon zkEVM, Linea Testnet, and MetisDAO.
Calls to decentralise the MEV bot landscape have also gained traction, with projects like Artemis providing alternatives to Flashbots. The challenge, however, is incentivising people to run relayers since it’s not a paid role. Seen as a public good, this activity might need to be funded as such.
💸 MEV Share 💸
In the quest to give back value, MEV-Share allows users to control what they share, enabling them to capture some of the MEV profits from their transactions. MEV-Share introduces a new actor, called the Matchmaker, to mediate this exchange.
The Matchmaker is responsible for:
— Receiving transactions from users
— Selectively sharing data about those transactions with searchers
— Receiving partial bundles from searchers, which identify user transactions that should be inserted
— Inserting user transactions in partial bundles to create full bundles
— Sending full bundles, along with a validity condition, to block builders. Builders are required to fulfill the validity condition (eg. transfer a refund to the user) for any bundles it includes in a block.
In line with this but outside of the Ethereum ecosystem — the Skip protocol team building within the Cosmos ecosystem is creating a set of modular tools that appchains can implement, giving them full control over the rules around transaction ordering and inclusion, aptly named the “sovereign MEV toolkit.”
⛔ MEV Blocker ⛔
MEV Blocker was launched by Cowswap in collaboration with Beaver Build and Agnostic Relayer. It works by mixing in fake transactions with actual user transactions, so searchers don’t know which transaction they should sandwich, and therefore, nobody gets sandwiched.
There’s also some more future looking MEV-related project like MEV-burn.
⛔ MEV Burn ⛔
The next iteration of EIP1559, aims to burn the MEV per block, stirring some contention. MEV burn would work by having builders submit a bid to include a bundle in a block. The bid would include the amount of MEV that the builder is willing to burn, and the highest bid would be awarded the block, and the MEV would be burned. However this proposal would first require proposer builder separation so is some way off on the Ethereum development horizon.
Wrapping Up
The crypto market continues to evolve, and the solution to the MEV situation is still up for debate. Whether it’s a necessary evil which is the price to pay for a transparent mempool, or something to be solved for is yet to be seen.
It’s likely that we’ll continue to see various strategies being developed; some to prevent MEV opportunities and some to more equitably distribution MEV value across the ecosystem.
Originally published at https://www.linkedin.com.