Table of Contents
🎯 Introduction
MEV-Explore is a public dashboard of metrics related to the Extracted MEV we’ve recorded on Ethereum since Jan 1 2020. In this document we go over the data range and definitions we use for these metrics. We also explain how the data underpinning the dashboard is collected and structured through MEV-Inspect, a blockchain crawler which scans Ethereum and identifies MEV extraction activity.
Maximum Extractable Value (MEV), formerly named Miner Extractable Value, is a measure of the total value that can be extracted permissionlessly (i.e. without any special rights) from transaction ordering. MEV-Explore focuses on quantifying the MEV extracted on-chain rather than quantifying the total MEV available in any given block. The Extracted MEV metric in the dashboard constitutes a lower bound estimate on MEV, limited by the current set of DeFi protocols covered by our inspectors. In particular it does not cover sandwiches.
Key Info
- Data coverage is from block 9193266, the first block of Jan 1 2020
- We inspected 10 DeFi protocols: Aave, Balancer, Bancor, Compound, Cream, Curve, Uniswappy V2, and Uniswap v3 and 0x and will continue to expand our protocol coverage.
- We only cover profit for single-tx MEV opportunities. We have a sandwich detector, but it does not have profit.
- We also do not cover CEX-DEX arbitrage since the CEX bit of the trade does not have publicly available data for us to crawl.
- Extracted MEV = Successful MEV transactions + Successful MEV transactions gas fees + Failed MEV transactions gas fees
- Our database is updated in near real time and currently has a 5 block delay.
- For latency reasons, the website’s data is updated every 3 hours.
- We normalize all our Extracted MEV calculations first to USD. We do this using Coingecko’s price for the assets with day-level granularity. We normalize all our Extracted MEV calculations first to ETH. We do so by using Uniswap's market buy price for the asset and we do not currently account for slippage.
- MEV-Inspect is our data collection effort that is open-sourced on Github, MEV-Explore is the UI on top of it. We welcome community contributions.
MEV-Explore v1
The latest version of MEV-Explore shows numbers that are different from the previous version in an attempt to more accurately estimate MEV.
The largest contributing factors to this are:
- Sandwiches:The previous version of Explore misclassified some types of sandwiches as arbitrage. We have attempted to filter out all sandwiches from this analysis, and in the future will add in sandwich profits.
- Uniswap V3: Previously Explore did not account for any transactions that interacted with Uniswap V3.
đź“Š MEV-Explore
✍️ Metrics Definitions
To find Extracted MEV, we look at each Ethereum's transaction trace, parse it and go through the token transfers, do some accounting of the starting balance of the sender address and its ending balance, taking into account proxy addresses and other cases that we plan for with a set of tests to make sure the value isn’t misclassified. Read more about our data collection process in MEV-Inspect: The Data Pipeline.
Extracted MEV = Successful MEV transactions + Successful MEV transactions gas fees + Failed MEV transactions gas fees
Failed MEV transactions gas fees = Reverted MEV transactions gas fees + Checked MEV transactions gas fees
Successful MEV transactions represent the value captured by the MEV tx sender subtracted of the gas fees they paid for it.
Cumulative Extracted MEV is a cumulative time-series of the Extracted MEV we’ve recorded on chain since Jan 1 2020. We suspect our figures for early 2020 are particularly low since we do not cover protocols where most of the MEV was back then such as Bancor, Kyber, Etherdelta and Airswap.
Daily Extracted MEV is the daily Extracted MEV we’ve recorded since Jan 1 2020. Since this is given in USD but calculated in ETH, the price appreciation of ETH is embedded within the chart and should be kept in mind when looking at the daily distribution.
Extracted MEV Split by Protocol shows the breakdown of Extracted MEV since Jan 1 2020 between different platforms the transaction interacted with. The Extracted MEV related to the transaction is weighed equally between each protocol it interacted with. We expect to use a better heuristic in the future.
Extracted MEV Split by Type hows the breakdown of Extracted MEV between different MEV action types.
- We define arbitrage as an Ethereum transaction executing swaps where the starting balance is inferior to the ending balance. In the case where the two balances are in different assets, we convert both in absolute ETH terms using Uniswap market prices. Here is an example arbitrage transaction.
- We define liquidations as Ethereum transactions executing a liquidation and will record its Extracted MEV by either 1) looking at the Extracted MEV made from selling the collateral they acquired within the same transaction, 2) converting the collateral to ETH by using the Uniswap price, without accounting for potential slippage from selling the collateral. Here is an example liquidation transaction.
Extracted MEV Split shows the breakdown of Extracted MEV between MEV Tx Sender and the MEV Tx Miner. The figure associated with the MEV Tx Miner is essentially the sum of all gas fees paid for MEV transactions (both failed and successful).
Extracted MEV Gas Usage % represents the overall gas usage of Extracted MEV transactions on the Ethereum network since Jan 1 2020.
Total Wasted Fees on Failed MEV Txs sums up the total paid out gas fees in USD amount, on the failed MEV (reverted and checked) transactions, since Jan 1 2020.
Implied Wasted Ethereum Blocks calculates an estimated number of total “wasted” blocks, for the total wasted used gas amount. We use 12500000 as an estimate for the average gas limit used per block. In the future, we plan to use the historical gas usage and limits instead of the assumption of 12.5M gas/block.
Successful, Reverted and Checked MEV Txs
Example 1: A Successful MEV transaction from a Priority Gas Auction
A 3-hop arbitrage between the 3 liquidity pools Balancer ETH/USDC, Sushiswap USDC/SIL and Sushiswap SIL/ETH that paid 12 ETH ($14.1k at the time) in gas fees and worth 16.7 ETH ($19.6k at the time) of Extracted MEV.
https://etherscan.io/tx/0x2bde6e654eb93c990ae5b50a75ce66ef89ea77fb05836d7f347a8409f141599f
The high transaction fee hints at the fact that the sender iteratively bid up the gas price of their arbitrage transaction by replacing their existing trade before it gets mined with one with the same nonce but a higher gas price in order to compete with other traders going for the same opportunity. One loser of the gas auction landed here for a loss of 1.18 ETH in “checked” mev (see example 3). The winning transaction above ended up paying a gas price of 51.6k gwei, 547x higher than the average gas price at the time (94 gwei), but only 2x higher than the loser at 27.6k gwei.
Extracted MEV breakdown for tx #1: 4.7 ETH ($5.5k at the time) for the sender, 12 ETH ($14.1k at the time) for F2Pool, the miner of this block.
Extracted MEV breakdown for tx #2: 1.18 ETH ($1.4k at the time) for F2Pool, the miner of this block.
Example 2: A Failed (Reverted) MEV transaction
A transaction that attempted to capture MEV from a Cream.Finance liquidation and failed because it ran out of gas, costing the sender 5.75 ETH (~$10k at the time) in gas fees.
https://etherscan.io/tx/0x8cfb46876ce1d40250e9690482bdaaffc1f6b60e18c3405ff5e98b636840875f
Using 1.5M gas and spending nearly 6 ETH in fees, the transaction requested a $88K USDC flashloan in order to liquidate a Cream.Finance position. It began doing so before failing halfway through due to a lack of provided gas. While on the face of it, 0x8cfb4 looks innocent, its internal transactions reveal more than 237 transactions. This is a very sophisticated transaction with complex costly logic in EVM compute that ended up using 1.5m gas, nearly 13% of the block it was included in! However much gas was spent, the transaction still failed because it ran out of gas and ended up costing the sender ~5.75 ETH (~$10K at the time) in gas fees.
After this “Reverted” transaction, the opportunity was still available and was seized by the second best gas (or first loser) auction participant for a total Extracted MEV of 4.125 ETH where 3.75 ETH was paid in gas fees.
Extracted MEV breakdown for tx #1: $0 for the sender and ~5.75 ETH (~$9.3K at the time) for Sparkpool, the miner of this block.
Extracted MEV breakdown for tx #2: 0.375 ETH ($600 at the time) for sender #2 and 3.75 ETH (~$6k at the time) for Sparkpool, the miner of this block.
📡 MEV-Inspect: The Data Pipeline
MEV-Explore uses data collected by MEV-Inspect. One can see Explore as the front-end and Inspect as the back-end of the same effort to systematically collect and classify Ethereum data relevant to transaction prioritization.
MEV Inspect is responsible for fetching each transaction’s trace and “decoding” it using protocol-specific inspectors and action-specific reducers. For detailed information on how each inspector is implemented, we refer you to the mev-inspect docs. MEV Inspect is responsible for fetching each transaction’s trace and “decoding” it using protocol-specific inspectors and action-specific reducers. For detailed information on how each inspector is implemented, we refer you to the mev-inspect docs.
📶 Data Coverage
Block Number
Block 9,193,266 - the oldest block in our database.
Date Range
Jan-01-2020 12:00:11 AM +UTC - block time of the oldest block in our database.
Last 30d means 30 days from the UTC timestamp of the most recent block in our database.
Last 24h means 24 hours from the UTC timestamp of the most recent block in our database.
Related Actions In Scope
- trades
- single-transaction arbitrage
- liquidations
Data Source
- âś… Traces data for extracting actions
- âś… Blocks data for block info (miner, timestamps, etc.)
- âś… Transactions data for transaction details (operator/bot address, gas used, etc.)
- âś… Prices data from CoinGecko API for calculating profits
- ❌ Mempool data (we do not currently use mempool data in any of the metrics displayed)
Inspected Protocols
Protocols \ Action Types | arbitrage | liquidation | attacks/exploits |
Aave | ❌ | ✅ | ❌ |
Compound | ❌ | ✅ | ❌ |
Uniswap V2 (and clones) | ✅ | - | ❌ |
Uniswap V3 | ✅ | - | ❌ |
Curve | ✅ | - | ❌ |
Balancer | ✅ | - | ❌ |
Bancor | âś… | - | - |
0x | âś… | - | - |
🏗 Pipeline Workflow: How we collect the data
The data collection and structuring process is as follows:
Part 1 - Raw Data Parser
Using an Erigon archive node with tracing enabled, we inspect every transaction using protocol inspectors and reducers. These inspected transactions are then inserted in a PostgreSQL database for further querying and analysis.
By inspecting, we are able to learn the full token flow during the transaction, as well as get higher order information, e.g. the profit amount and token of an arbitrage transaction.
Part 2 - Metrics Aggregation
After all transactions have been fully inspected, we "flatten" the information we have found so far to simple labels and normalize the Extracted MEV to USD. Block level, protocol level and action type level of aggregation table are then built with different indices for querying. This pipeline runs and updates the downstream tables and dashboards every 5 mins.
đź“ť Caveats
The following caveats apply to our methodology:
Extracted MEV Covered Only
This only reflects Extracted MEV and not all of the MEV opportunities. In other words, we are currently only quantifying extracted value and not the theoretical total extractable value.
Reflects Lower Bound of Actual Values
MEV-Inspect provides a lower-bound approach to quantifying Extracted MEV. The more MEV Inspectors are added, the closer we get to a true figure for Extracted MEV.
No Address Grouping
We cannot assign transactions coming from different addresses as a single actor automatically. In practice, we may group certain address senders together based on patterns we manually observe.
No Multi-tx MEV Covered
Our current methodology only accounts for single-tx MEV opportunities. This means sandwich trades are not accounted for (yet). However if any part of a sandwich trade is an arbitrage, the arbitrage will be picked up by our inspectors.
No CEX-DEX Arbitrage Included
Arbitrage trades between centralized and decentralized trading venues are not tracked nor quantified given the opaqueness of the CEX part of CEX-DEX arbitrage.
Price Oracles
Normalizing from ETH to USD is done using the minute ETH price for 2020. For 2021, we use the ETH price per block by taking the average of ETH-DAI, ETH-USDT and ETH-USDC prices given by Uniswap V2's oracle.
Normalizing from $TOKEN to ETH is done by using Uniswap's market buy price for the asset, we do not account for slippage.
🚀 Next Steps
📡 MEV-Inspect
Expand Protocol Coverage
Add more classifiers that expand protocol coverage to new protocols. For example, we want to expand coverage to new DEXes.
Expand Strategy Coverage
Support multi-transaction types of MEV, such as identifying sandwiching and backrunning arbitrage.
Expand Chain Coverage
Add support for other EVM chains
🙏 Contribute feedback, report bugs and suggest new features to MEV-Explore⚡️🤖Find out more about Flashbots