Eliminating MEV
Introduction
Maximum extractable value (MEV) is essentially a tax on DeFi users and is one of the most corrosive forces in DeFi’s struggle to outcompete traditional finance to date.
MEV can be broken down into two categories: MEV due to stale state (i.e., toxic flow) and MEV due to public transactions. Synchronicity takes a piecemeal approach, solving both types of MEV independently to create MEV-free on-chain finance.
Stale State
The Problem
Blockchains clear transactions in discrete blocks. The discovery of information and price occur continuously. This mismatch results in blockchain state (e.g., limit orders) becoming stale (i.e., based on outdated information) between blocks. Value can be extracted by trading against stale state and hedging the trade on another venue that has already updated.
To account for the risk of having value extracted due to stale state, market makers quote wider spreads. The more volatile the asset, the wider the spread needed to protect from this risk.
Historically, blockchains conduct an auction for the first slot in each block, such that the highest bidder gets to extract all of the value from the stale state. If there is $1 of MEV available from a user’s stale state, a MEV bot will pay up to $.99 (or more) to capture it.
This creates a lose-lose situation for market participants: either have the $1 extracted or pay $1 to prevent the loss. In either case, the cost to the user is $1.
Hyperliquid’s Partial Solution
Hyperliquid solved ~90% of the stale state problem for market makers by processing cancels before fills. No longer did makers need to pay excessive transaction fees to be ordered at the top of the block. Instead, the blockchain itself prioritized their order cancellations, thereby enabling them to remove stale orders from the blockchain before an arbitrageur could capture the value from it.
Processing cancels before fills solves most of the problem, but does not eliminate MEV due to stale state entirely. With cancels before fills, market makers can protect themselves from MEV so long as they can have a transaction to cancel their orders included in the block that the MEV first appears in.
Therefore, the exposure of makers to MEV is a function of (1) their latency from when information and price discovery occurs to when they can have their transaction included, (2) the latency of the fastest market participant and (3) the block interval. The percentage of MEV that they are still exposed to is defined by .
For example, if a market maker’s latency is 15ms, the fastest market participant’s latency is 5ms, and the block time is 100ms, the market maker is only able to prevent MEV if it appears in the first 85% of the block interval (i.e., with enough time to cancel their order after the MEV becomes available). If it is created in the last 15% of the interval, they will not be able to react quickly enough to have the cancellation of their orders processed. But, no one is able to capture the MEV if it occurs in the last 5% of the block interval.
Synchronicity’s Complete Solution
Synchronicity introduces Synchronous Execution, which enables state transition functions to be automatically and atomically triggered in response to state being written. It is no longer necessary to generate a state transition function outside of the network and submit that transaction to the network to cancel stale orders.
Instead, orders can be a function of oracle values that automatically update at the top of each block. Orders are automatically and atomically cancelled, or updated based on new oracle data, before they are traded against. This is a complete solution that eliminates MEV due to stale state entirely.
Public Transactions
Prior to transactions being sequenced, they sit in a mempool of transactions from which block builders select transactions to include in the next block. A second form of MEV occurs when block builders reorder, insert, or censor transactions to extract value. Synchronicity combines privacy via TEEs, which prevent anyone from seeing transactions prior to their processing, with frequent batch auctions, which clear every market participant at the same price, to entirely eliminate the risk of MEV due to information from public transactions.
Thus, Synchronicity eliminates MEV entirely.