ZeroMEV Data API
I have a 20 year career in developing automated trading systems. I have been involved in Ethereum since before the pre-sale, hoping it would address the failings I saw in traditional finance. My motivation is to engage with the community to achieve this end.
I identified that frontrunning would be a problem for Ethereum in 2014 and begun estimating real world harms with my EthInclude project (a prototype of Zeromev) which supplied data for my MEV WTF Devcon talk around this time.
I’ve been published on Coindesk and I’m a frequent poster on ethresear.ch, where I warned that PBS would lead to builder centralization issues a year before MEV-Boost was released. I founded and developed http://zeromev.org on an Ethereum Foundation grant in 2021.
Miners frontrunning post (2014) (http://bit.ly/3v3YDmP)
Estimate frontrunning estimator (https://github.com/pmcgoohan/EthInclude)
Builder centralization warning (https://ethresear.ch/t/two-slot-proposer-builder-separation/10980/10)
Coindesk article (http://bit.ly/3jWSRkG)
- Generate transaction granularity MEV summary data sourced from zeromev.org
- Data published via a documented public API at data.zeromev.org / info.zeromev.org
- Also unrestricted direct database access to this data for CoW Swap / Zeromev and their partners
- Minimum provisioning / maintenance period of 12 months
Grant Goals and impact:
Accessibility of data related to MEV on Ethereum is still relatively limited.
It is in the best interest of both zeromev.org and CoW Swap to make granular MEV data available to the public through a free API. This will help to increase transparency and awareness around the problematic nature of MEV and promote sustainable solutions.
Some potential ideas for use cases to build on top of the proposed API:
- A chart that compares the value extracted from users split by the DEX protocol they were using
- A chart that compares the amount of MEV incidents for every MEV type split by DEX protocol
- An educational snippet on CoW Swap revealing more information about MEV incidents uses had when interacting with various DeFi protocols
The following MEV data will be summarized for each relevant transaction:
|BlockNumber||Ethereum block number|
|TxIndex||Index of transaction in block|
|MEVType||Frontrun, Backrun, Sandwiched, Swaps, Arb, etc|
|Protocol||Uniswap, Bancor, Opensea, etc|
|UserLossUsd||Loss to user from the MEV|
|ExtractorProfitUsd||Profit to the extractor from the MEV|
|VolumeUsd||Swap volume (where applicable)|
|Imbalance||Sandwiched imbalance percentage|
|ArrivalTimeUS||Time the transaction was first seen by our US node|
|ArrivalTimeEU||Time the transaction was first seen by our European node|
|ArrivalTimeAS||Time the transaction was first seen by our Asian node|
- Creation of a new postgres database to hold the MEV transaction summary data above
- Data to be persisted on RAID drives across two servers / database instances (a write instance and replicating read instance)
- Database to be populated with all available historical MEV transaction data
- MEV transaction data updated in realtime as each new block is classified by Zeromev core
- Authenticated access to the database restricted by IP for use by Cowswap / Zeromev / Dune / etc
- Public access via a REST API at data.zeromev.org (rate limited)
- Document the API and data fields alongside other zeromev documentation at info.zeromev.org
- Service to be provisioned and maintained for a minimum of 12 months (approximately the remainder of the Zeromev contract with the Ethereum Foundation)
- Development time is estimated to be 6 - 8 weeks
Funding request summery: 30k xDAI (15k payed upfront, 15k payed upon completion)
Development $22400, Infrastructure / Maintenance $7600
Gnosis Chain Address (to receive the grant):
Proposal was developed in collaboration with middleway.eth
Terms and conditions:
By applying for this grant, I agree to be bound by the CowDAO Participation Agreement and the COWDAO Grant Terms and Conditions.