Why You Can't Afford to Ignore MEV | Hasu & Stephane, Flashbots
27 May 2022 · 28:28
Hasu and Stephane Gosselin of Flashbots argue that MEV, the value an actor with privileged access can extract by ordering, inserting or censoring transactions, cannot be wished away and should be channeled into open, competitive markets. They compare it with payment for order flow and high-frequency trading, explain how MEV-Geth replaced gas-price latency races by separating transaction placement from price, and describe MEV-Boost, which they are introducing with the upcoming Merge so validators can outsource block building to a network of builders. Their law of MEV conservation holds that poorly designed chains get spam and centralization instead, so they urge application, wallet and protocol developers to plan for MEV and find ways to return its value to users.
Speakers
Topics
Transcript
so um how do we get started how soon do you want to do a quick intro yeah sure i mean the the production value on this conference so far has been amazing i hope you're all enjoying it uh we are certainly very excited to speak to you today um i can give a quick intro about myself i'm hasou i do strategy at flashboards among a couple other things mainly in my capacity at flashbots i've gotten it because i've been thinking about you know block space market design and mev in public blockchains for a couple of years and yeah this has really brought us here today um steph can you introduce yourself yes okay i'm stefan um yeah recently the anonymized so i went from a face reveal
yesterday so speaking in front of 2000 people today so it's zero to 100 very quickly um but it's a pleasure to see all of you here so um yeah so flashbots is a company that was started about a year and a half ago and it focuses on research and development around mev we built a few products that that help ethereum handle all the throughput of bot operators that have emerged over over the last couple of years and we've sort of seen this massive wave of growth in the amount of activity doing statistical arbitrage doing atomic arbitrage doing things like nft sniping um and so flashboss is a company
that has built a lot of products to help systems like ethereum scale and handle the load that that comes with with mev stefan let's let's get everyone in the room on the same page first so um what is meb okay let's let's maybe try something let's do a show of hands here so who is familiar with mev and the definition of mev can you put your hand up okay who has been sandwiched before can you put your hand up who has made a trade on uniswap before can you put your hand up everyone who put their hand up for the second question and not the first question is going to learn a lot today on this panel because if you made a swap
on unislav you've definitely been sandwiched before so what is mev mev is you know formerly known as minor extractable value or maximal extrapolable value it's in summary all the value that an actor with privileged access to a network like ethereum can extract from doing things like ordering sensor shape censorship or insertion of transactions in a block um so how does mev actually get expressed today um it ends up looking like this arbitrage opportunity liquidations on chain a lot of the sort of activity around new token launches and um and nft launches that end up taking networks down all
that could really be described as as being mev and smev something that is unique to crypto or does it exist in the traditional financial system as well so i think this is where sort of we can get into a nuanced conversation and and haas i'd be curious to hear you draw parallels here and talk a bit about about payment for overflow so one way that i think about mev it's sort of the value the emergent value that comes from having users generate transactions that are tied to some economic activity so in traditional finance you know if you look at exchanges if you look at the the robin hood model the transactions that get sent by the users have some information content in it and that
information is only valuable to entities like hedge funds or market makers who know how to make the most of that value who are able to separate out uh sort of the signal from the noise in the transactions that are coming in and and use them for executing trades i would say that that's mev in the traditional finance sense that you have a actor like a market maker who is in a privileged position to see transactions and operate on top of them and extract some value how do you see payment for order flow uh relating to traditional finance and crypto well i think you're spot on i think mev could also be reframed as you know the value of information and if you're
getting certain information faster or have the ability to sort of interact with it in privileged ways then then this gives you you know the ability to benefit from that in a financial way and as you laid out one example of this would be you know payment for order flow and another one that probably would also be equally familiar is that of co-location slots uh you know at major exchanges so um there's this this whole industry that has sprung up around um you know just getting information faster from exchanges and getting your trades to the exchanges faster which is the whole high frequency trading industry and
you can virtually think of every dollar that is extracted via high frequency trading as a form of mev and there have been you know attempts at sort of restructuring the way that exchanges work in order to remove this but ultimately it seems that you know the exchanges make so much money from selling these co-location slots that um it would really cut into their their bottom line uh you know to to switch to a different uh you know exchange format something i find absolutely insane about the space that mev is in crypto in general is just the size of the opportunity so if you look even just a year and a half
ago two years ago mev was not really talked about and by any sort of sense of metric and estimates that flashbacks has made the mev industry is almost already bigger than the hft industry in terms of just fees and margin taken by the the actors in the operator space you know the fact that this has emerged in such a short amount of time i think is a testament to the like speed of innovation that takes place on these on these platform relative to the ones in the the traditional financial system so we were in a position as you say where basically mev was completely unknown and non-existent and then that was mainly the the reason why that was made that there was not much financial activity on
ethereum so mev you could say is a function of users performing some kind of financial transactions um you know yet trading on decentralized exchanges or borrowing or landing on on landing markets and so on so um then all of a sudden mev enters the scene so in what sense has it changed ethereum um and how did sort of users and application developers and protocol developers feel the impact of that yeah um so actually we have a slide up here um let's see if we can switch to it all right um
so we're studying a bit how the mev landscape in the mev industry is is evolving over time and we've put together sort of the same simple mental model to think through what does the future of of mev look like um you know you mentioned how how does mev impact how the user operates well it used to be that when you're performing a transaction on uniswap right you just sign a transaction you send it to the transaction pool it gets picked up by a miner and then the miner includes in a block and happy days you got your your swap settled um very rapidly we're seeing the mev industry become much more industrialized where transactions are no longer necessarily directly routed to um to uh to a public transaction pool but
instead of being routed through sort of a network of intermediaries that add value to that transaction so you know you could call this a supply chain you could also call this a value chain so the user can really wants to express an intent an intent like swapping an asset for another asset they'll use some kind of front end or a wallet to encode that into a transaction the wallet and this is sort of the new part that flatbox has introduced the wallet will then communicate directly with some searchers either through a transaction pool or through some some private um routing system to augment the transaction with uh with additional transaction that can capture the mev that the transaction created um we call this a bundle right but then the bundle
still needs to be included in a block so this initial product that we launched called mevgeth on top of ethereum it was really focused on this relationship between searchers and miners where he introduced the concept of a bundle the ability for these third parties to perform the mev extraction and communicate those preferences with with miners using sort of an auction system um that sort of took off and and overnight you know maybe a couple months after we published the the open source software for it uh over 80 percent of the miners on ethereum are running the software and producing about 60 of the blocks uh using using the software so this sort of new abstraction for how the um the
transactions get included uh caught on really quickly the new part that now we're looking to introduce the ethereum is the separation between builders and validators so the builder role is really the role of taking and aggregating all the transactions from different sources and putting them into a block and then the validator role is just the role of publishing that block to the network and then validating all of the other blocks that are produced by the network with the upcoming uh merge and the transition to proof-of-stake for for ethereum we're introducing something called mev boost which allows for validators to completely outsource block construction to a network of builders so an open market for block construction
where anyone can aggregate transaction and compete on who can produce the most valuable block buyer estimate this means that we'll be able to boost the revenues that staker makes significantly so about 70 percent of staker revenues after the the proof-of-stake merge are expected to come from uh from a system like this that's able to extract mev um yeah so this is sort of a a framework for thinking of the industry i think flashboss fits very neatly in this framework and the the tooling that we've built but there are many other applications are also looking to play with mev at different layers of this uh of this supply chain so uh yeah we could also we could go uh
take another step back and say so what was even the thinking that went into our first product which was mavgaf right so we previously said that um users make transactions on ethereum and these these transactions they have what you could see as like an attack surface where they they they sort of expose a financial value that anyone who interacts with the transaction in a specific way could harvest and this creates this whole industry sort of around front running and backgrounding and sandwich attacks that that sort of spawned and initially played out in ethereum's public memory pool sort of the waiting room for
transactions and to give a concrete example sort of how um how that negatively affected ethereum is the miners used to run a very simple algorithm in order to determine what transactions go into their block right just sort them by the gas price and and so the only way that the searchers could communicate that they want to place their transaction right behind the user like a target user transaction was basically to pay a very slightly higher gas price and then get the transaction to the miner as
fast as possible so they would include it first and then throw out any follow-up transactions that they would get and so you can see this is very problematic because it already incentivizes sort of this latency game that we see in traditional finance where it's all about speed and we know that ultimately it is all about co-location with large miners and mining pools and so this is really where flashbot stepped in and the fundamental change that that flashbots introduced is separating transaction placement from transaction price so searchers were able to say exactly where their transaction should go
and what it should do and then independently of that bid on how much that transaction is worth to them and now all of a sudden sort of they were competing on price which drove up minor revenue and it completely removed this incentive for you know spamming the network with many transactions that most of the time fail to compete on latency and to vertically integrate yeah that's right i think you know the title of this fireside chat was why why you can't afford to ignore mev and it's been fascinating over the course of the last year see what happened to other blockchains that may not have introduced a similar system to
flashbacks for auctioning off mev right you know you mentioned the this is sort of a game you could you can think of mev as being a game where you have these autonomous parties these searchers or these bots that are finding ways to play the game in the most effective way and if the game is not designed to be compatible with the objective of the chain then you can have outcomes like having spam like having reorgs uh like having co-location advantages um and and introducing this this change i think is is fascinating um i'm wondering do you have like examples of other chains and and how mev has impacted them from from not having a system like this yeah great question i mean i think for
one um a good example that that we have seen in in practice is like chains that have very low latency and very cheap transaction fees um you what you often see is that entire blocks uh basically get filled only with failed transactions um we also can see sort of examples uh where um well the there's no public memory pool for example and um and then there's really the incentive uh to co-locate with a validator in order to even see the transactions and in this situation only
the validator themselves can insert the transaction so it's not even the searcher so you don't even have sort of that division of of labor in between and i mean what what we have seen um this does is it really centralizes um these different actors in the supply chain so i would be curious to hear from you what is really what is like the underlying reason why we are worried about centralization in the supply chain in what sense change change do the underlying like guarantees that we want out of public blockchains uh deteriorate if instead of let's say 100 miners you all of a sudden have like one or two yeah this is this is tricky right you
mentioned validators and co-location i think something that we've seen on other proof of stake chains is validators starting to sell colocation services and there's sort of a huge advantage in the value that they're able to generate from this from this co-location and so as the the value that these validators are able to aggregate over time increases they control more and more of of the network that's definitely like been the case in some chains where we've seen actually bot operators take the consensus of the chain in a direction that was to their advantage to be able to extract more value and sensor other validators from being able to produce blocks i think that's a very clear negative
impact of having some centralization at the validator level due to mev but ultimately i think centralization can can emerge at multiple different layers of of the supply chain right if you have better order flow if you are a wallet that produces all of the transactions in the system you also have the ability to um to extract an outsized amount of mev relative to everyone else in the system if you're a builder that's able to have more optimal merging algorithms than anyone else you can then potentially vertically integrate up and down and extract value in this way um so one one way to think about the supply chain is um is through a competition policy lens
and you know what what is a healthy supply chain what is a healthy market um it's one in which each layer of of the chain are are highly competitive and and modular as opposed to one where they are highly vertically integrated let me ask you like a very naive question that but we nonetheless get a lot of the time why don't we just get rid of mev why don't we just get rid of mev um i think we have a fun brain teaser which is uh maybe a principle called the conservation of mev the law of the conservation of mev that any mev that exists and can be extracted
will be extracted the question is just what are the externalities of that extraction mechanism is it going to be spam is it going to be you know what we saw on on solana at some point that the entire chain was brought down by by arbitrage bots that their extraction strategy was to spam the network or even for nft launches right the the optimal strategy for capturing first come first serve nft launches or even sort of pooled nft launches is to perform sort of spam so a lot of the techniques that try to avoid mev or eliminate mev aren't dealing with the underlying problem which is the transactions have value the transactions that the user generates
have value that can be extracted by some party um really in my opinion the only way to deal with that is to find a way to return that value to the user create some fair marketplace some fair and open marketplace for competitive behavior to return value to the users so but in the present day no value is really returned to the user right uh like we see users only um you know suffering financial loss from the existence of meb what could a potential future look like that's different from that and where the user the value actually accrues back to the user i don't know that there's no user no um no value that returns to the user right
in the way that for example mevgeth works today on on ethereum and the way bev boost works on ethereum it maximizes the value that stakers get from producing blocks and so in a way you can see mev as a subsidy on the security of the network that it's um that's operating on that's still a subsidy that the user ends up paying right so the user is not only just paying for the gas of their transaction in this case they're also paying for the mev which goes towards paying for the block space is there a future in which the user can instead capture the mev directly i think so right we've seen these rfq systems uh that aggregate transaction flow from multiple
different um aggregate transaction flow and then also route it to market makers directly who are able to quote better prices than the dexa's necessarily would be able to quote themselves that i think is an example of optimizing for trade execution in a way that returns value to the user and i expect over time there'll be more generic approaches to this i could definitely see a future in which users are paid to transact on a chain rather than having to pay the transact and the question is how quickly do we get there this is one of my favorite brain teasers as well because even the existence of sandwich attacks which
you know it's very obvious to see how this takes money away from the user right and yeah but the the point is the money you know some money is extracted by the searcher but most of it goes to the miner where a competition on price and so this is money that the user pays to have their transaction included and really the main problem is not the sandwich attack but it is that the user isn't aware of the sort of the mev surface of their transaction and doesn't factor it into you know the price that they pay to transact so it's like they are paying a hidden fee that they that they don't consider on chain and i think the example you gave about
you know the rfq system this is actually a way for it to get priced in into the transaction of the user in a very natural way right because um if a market maker can sort of internalize the flow of that user um then they in a sense they they do get paid right and they can in a sense pay that money back by trade paying the transaction fee for the user so it actually and there are competition between these different sort of off-chain market makers for example you end up with a situation where you know the information value of the user's transaction actually does get priced so that maybe is a fun example yeah i think so
um i have a i have a question for you so you know mev is sort of a new industry it's been around for a year and a half but already like bot operators for example just on ethereum and atomic arbitrage have made like a billion dollars in 2021 on on trading activity um if you take in you know other chains you can easily see that the mav industry is already 10x that size i think there's a lot of people in the room here who are thinking like wow this is big maybe this is something i don't necessarily understand where where are sort of the opportunities and areas of focus that um that people should should keep an eye on and and think about yeah that's a great question i mean i think first of all um
mev primarily goes to the producers of block space and on ethereum that is primarily eve holders so i think if you're an e folder then you already you know sort of most of the mev that exists financially accrues to you um and um but it's also like relevant i mean we said like you can no longer ignore me and we think that this really applies to every participant in the stack so if you're an application developer then mev applies to you in the sense like for one you can use searchers as like the piping of the decentralized financial system right so for example decentralized lending markets rely on uh you know
basically collateral being liquidated to recapitalize underwater markets decentralized exchanges rely on arbitrage in order to keep their price in line with the rest of the market so it's not like mev is all bad here but very often sort of bad application design exposes your users to larger transaction costs than would otherwise be necessary so as an application developer it is really important to you know be aware that mee exists and you should factor it into the way that you build your application from day one so you can really give the best experience to your user let's maybe think about it from the perspective of the app developer do you
have any uh sorry of the a wallet developer so if you have a wallet stefan how do you think about mev what do you think wallets should be should be thinking about all right so um so flashback has a product called flashbots protect right and what it does it provides an rpc much similar to all the other rpcs that people use but this one is different in that the transactions are routed directly to the miners on ethereum and so aren't sort of vulnerable to uh to being attacked or exploited for for mev i think you know as a wallet what you should be thinking about is okay i see that the transaction we
produce and the users produce generates a lot of value that the wallet isn't capturing and that the users aren't capturing so how can i make sure that this value can be returned back to um to us to continue funding the wallet and then also to the users to help attract and maybe reduce user acquisition costs i think we're going to see the emergence of a lot of systems that are going to help produce that value and really what i would encourage wallace to think about is avoiding an outcome where um this system ends up being more centralized right you could easily see wallets start to sell order flow to searchers and say i will route all of my order flow to you
in exchange will going to split the revenue that is going to be generated from the order flow 50 50. this is kind of the robin hood model right like robin hood selling order float to citadel there's some contractable agreement that says you know we route the order flow and you're going to pay us some some amount for it over time i would encourage thinking outside of the box and thinking is there a more decentralized way of doing this more permissionless ways of doing this but that doesn't require sort of handshake agreements between operators and wallets and instead leverages an open marketplace that can be freely entered yeah so we we talked about what you have to think about as a protocol developer right don't like
try to say that meb doesn't exist right if it does exist the law of mav conservation says then we will be extracted and if you use an inefficient format for that extraction the result is um very negative uh negative externalities for your blockchain that would ultimately like degrade the user experience and centralize it in the long term and you're missing on all of the revenue that you could get you know for your validators and miners by running an efficient mev auction we talked about application design we talked about wallet design and we talked about sort of the
investment case um do you think that we we are missing anything i mean one one thing about mev that i think is going to be particularly relevant in you know the coming years as we enter sort of a more dull phase of the market is like mev is the fundamental working block that makes a lot of blockchains tick it exists whether you're in a bull market or a bear market it is like very uncorrelated and for as long as there's economic activity on top of blockchains there's going to be mev so the encouragement is really to think about how how you can build new things with this how thinking deeply about the problems
that mev raises will help you resolve some of the questions of where does the industry move to in the next few years and and stay ahead of the curve in the development of of these systems fantastic yeah i that's a good final words according to my clock we are also coming to an end so yeah i would thank you for the great discussion and to the audience thanks for listening all right thank you everyone for listening