Polygon MEV testnet is live!
Last month, we introduced the Flashbots architecture for Polygon through mev-bor. However, some validators expressed concerns over directly switching…
Last month, we introduced the Flashbots architecture fo
A lot has been written about miner-extractable value (MEV) so instead of reiterating the same information, let’s dive straight into the topic. We present below the case for the existence of MEV in chains other than Ethereum, describe the tools we are building to analyze (mev-inspect-*) and democratize (mev-*) such extraction opportunities and lay out future plans to integrate such capabilities in the decentralized Marlin network.
This article should interest validators in the Polygon network who would like to increase their income by including MEV bundles, dapp developers who would like their user’s transactions to be protected from frontrunning and MEV searchers who are interested in prioritizing their bundles.
MEV in Polygon, BSC & others
Flashbots’ explorations on Ethereum suggest that over USD 711m has been extracted since the start of 2020 in the form of arbitrage and liquidations. This figure is expected to be far lower than the real value as MEV is notoriously hard to detect and correctly categorize. However, the estimate is sufficient to conclude that the problem is large enough to deserve attention.
A corollary of this observation is that MEV in chains other than Ethereum is probably substantial as well. There are a number of anecdotal reasons to back such a hypothesis:
We’re not the first to make this observation. Nethermind recently launched an alpha version of its MEV plugin for the xDai chain. Our conversations with members of the Flashbots organization suggest that they would be eager to see the Flashbots spec deployed on other chains too.
Implementing the Flashbots spec on Polygon
We’re happy to open-source mev-bor, a fork of Polygon’s Bor client developed to process Flashbots bundles based on mev-geth. The beauty of a Flashbots bundle as opposed to sending a set of transactions is that the transactions in a bundle are executed in order atomically without requiring extensive gas price manipulation. Additionally, the spec guarantees that bundles which revert are not included in the block protecting against unnecessary gas usage.
To protect against bundles from being disclosed or sandwiched in the public mempool, Marlin will be running a private relay similar to Flashbots which will also be responsible for spam prevention and DoS protection.
A brief description of a bundle’s journey would be as follows:
Users, developers and validators interested in participating in the alpha release should register their interest by filling this form. Instructions for validators to install the gateway to enable communication between mev-bor and the Marlin relay can be found here.
Dissimilarities from Flashbots on Ethereum
Searchers having experience using Flashbots should note that unlike Proof-of-Work Ethereum, validators who would be producing the next block are known apriori on Polygon. This enables two new features:
It is fairly accepted that not all MEV is good for the ecosystem at large. It is thus important to know how much MEV is being extracted in a particular network and how. While the relay would be running health monitoring infrastructure to constantly evaluate the actions of validators and searchers alike, mev-inspect will be extended by our team to support Polygon. A few key features include:
This work is still in early stages and will be open-sourced after some clean ups.
mev-bor comes with the same trust assumptions as Flashbots on Ethereum. The design relies on Marlin developers running a centralized and permissioned relay which could hypothetically extract value from the bundles. This is not our intention of course.
Similarly, the bundles can be viewed by the validator producing the block. We expect validators to not engage in malpractices as it’s a comparatively smaller and well known set in PoS networks. Moreover, their long-term reputation is much more important to them in attracting delegations as compared to PoW miners. Nevertheless, differentiating such maliciousness from genuine transaction reorderings is tricky. Participants will be expected to hold on to the Fair Markets Principles otherwise risk being cut-off from the network.
Future work involves exploring ways to protect a bundle’s contents from validators whether through SGX or otherwise and decentralizing the relay - areas of interest to Flashbots core as well. An existing decentralized relay network certainly helps in this regard provided pre-trade privacy can be ensured. Simultaneously, we’re also in touch with the team at Fantom and expect to expand to other chains with such MEV opportunities.
Follow us on our official channels to keep track of our latest updates.
Twitter | Telegram Announcements | Telegram Chat | Discord | Website
Subscribe to our newsletter.