Epicenter - Learn about Crypto, Blockchain, Ethereum, Bitcoin and Distributed Technologies - Phil Daian & Stephane Gosselin: Flashbots – The Good, Bad and the Ugly of MEV
Episode Date: April 28, 2021Flashbots is a research and development company focussed on Miner Extractable Value (MEV). MEV is the profit a miner can make through their ability to arbitrarily include, exclude, or re-order transac...tions from the blocks they produce. Flashbots has created a fork of the ethereum geth client, MEV-geth, to allow miners to exploit MEV, currently run by 80% of miners.Co-founders of Flashbots, Stephane Gosselin and Phil Daian, recently joined us to chat about the protocol and to deep dive into the good, the bad, and the ugly of MEV.Topics covered in this episode:Stephane and Phil's backgrounds and how they got into cryptoWhat led them to creating Flashbots and what it doesWhat is Miner/Maximal Extractable Value (MEV)A technical deep dive into how the project works with miners and searchersThe progress on the SGX solutionSpam attacks and reorgs on FlashbotsPhil's reply to the perspective that MEV extraction is theftWhat is Generalized Frontrunning?How MEV differs at L1 vs L2What's the plan for Flashbots going forward?Episode links: Flashbots on GitHubFlashbots on MediumMEV...what do?Stephane on TwitterPhil on TwitterSponsors: Exodus: Exodus the easy-to-use crypto wallet available on all platforms and supporting over 100 different assets. - https://exodus.com/epicenterParaSwap: Give ParaSwap a try at https://paraswap.io/epicenter. This URL will allow you to claim a 50% refund on gas fees for your first swap of at least 1 Eth. This offer is available until May 1st 2021 and refunds will be made every Friday starting April 9th, 2021*Terms and conditions apply. - Solana: Solana is the high performance blockchain supporting over 50k transactions per second to power the next generation of decentralized applications. - https://solana.com/epicenterThis episode is hosted by Friederike Ernst & Sunny Aggarwal. Show notes and listening options: epicenter.tv/389
Transcript
Discussion (0)
This is Apple Center, episode 389, with guests Phil Dianne and Stefan Goslin.
Hi, welcome to Epicenter. This is Friedrich Ernst.
And this is Sunny Agarwal.
And today we're here with Phil and Stefan, the co-founders of Flashbots,
which is this very on-trend M-EV project that we'll talk about in just a bit.
Hi, Phil and hi, hi, Stefan.
Hey, great to be here.
Hello, hello.
Before we get started, let me tell you about our sponsors today.
So our first sponsor is Exodus.
Exodus is an easy-to-use wallet, which supports hundreds of assets and has native apps for all platforms, including iOS and Android.
And as a fully non-custodial wallet, there are firm believers in the not-your-keys, not-your-coins mantra.
Go to exodus.com and give it a try.
We would also like to thank Paraswap.
Paraswap is our second sponsor.
today and they just came out with a huge update that's even faster and more liquid.
It's cheaper than Uniswap and comes with a new gas token that can cut your gas fees by up to 50%.
Plus, for our listeners, Paraswap offers 50% gas refunds for the first swap of at least
one eath. Make your trade and go to paraswap.io slash epicenter to claim your refund.
Finally, we have Solana. Solana is a next generation blockchain with lightning fast blocks and fees
less than one cent for transaction.
Scalability is perhaps the biggest challenge facing crypto
from becoming the backbone of the world's financial system.
And today, Solana might well be the best solution we have.
Go to salana.com slash epicenter to learn more.
Hi, Phil and Stefan.
Good to have you guys on the show.
Just for a little bit of background,
can you briefly explain to us how you enter the crypto arena?
And I mean, both of you have been around for a long time.
I know that Stefan, you were at numerous,
before you started flashbots and Phil, I think everyone knows you from your deck studies that
have been around for a while. So maybe Stefan, can we start with you? Sure. I think I've told the story
a couple times, but it's always a fun one, I think, in this context, because Phil's the one of the first
people that I met in this space. And I think it was back in 2017, I just showed up at an obscure
conference in the middle of nowhere upstate New York and was told about smart contracts.
And it blew my mind, given that I had zero idea what the hell anyone was talking about,
but everyone sounded really smart. So I decided to dive in and I haven't looked back.
So I have been working on Ethereum since done, every layer of the stack, and always trying
to find the next problem to solve. And yeah, that led me to M-EV.
Cool. What about you for?
Oh, yeah. I've been in crypto for a little while.
So I've always been very passionate about kind of privacy and anonymity technologies.
I think I first started looking into Bitcoin around 2012 in the very, very early days of the Silk Road, because I was working on tour at the time.
And obviously, it was an application that made some waves in the community and made some real world impact.
So ever since then, I've been working on.
various kind of Bitcoin-related black, white, and gray-hat side projects decided kind of then that
I would transition into full-time cryptocurrency and also that I wanted to do it in academia
because I thought there was really a need for some deeper, longer-term thinking on some hard
problems facing the industry that I saw as kind of blind spots and also to kind of forward
the cause of cryptocurrencies in academia and kind of communicate to people that there is something
interesting here and there is something unique and like your skepticism is warranted, but also
suspended for a second and try to imagine kind of how you would redesign things with these abstractions
and whether that's useful to your life. And so that's kind of been my message ever since.
I've worked on proof of state protocols. I've worked on all sorts of security research on smart
contracts. And that led me to Dex's and that led me to kind of MEV and analyzing user fairness and
security properties of Dexas, which is what we're going to talk about today, I guess.
So you mentioned Black Hat, so Phil Dow attacker confirmed?
No, I'm not the Tao attacker.
I wish.
We've been trying to get you on for a little while, actually.
So, you know, you were working on some other cool stuff as well, like, you know, the gas token stuff and like, you know, just earlier, like, you know, a lot of early MEV research.
How did that, how did that all, like, kind of lead you to, like, working on flashbots?
Oh, God, it's like such a deep rabbit hole and everything connects to everything else.
Like, if you're a listener on this podcast and you're kind of new to MV or you just heard about it in the last few months, like, you will explore all of these topics of like how are resources priced in in blockchains.
How does this relate to futures and options?
How does this relate to market fairness?
What is the market design space?
How does that relate to computer security?
How does that relate to economics?
These are all questions I've spent a lot of time thinking about.
My Twitter bio is grasping for tractability because it's just such a huge design space.
that, like, you know, you can dabble in kind of any corner of it and have some obvious insights that feed back into production and feedback into people's lives.
So, yeah, all my Dex work and GAS token is kind of an example of just thinking through these problems from first principles and kind of coming to certain conclusions about how we can design mechanisms and where weaknesses are in current mechanisms and trying to communicate that to the community.
So that led to my initial work on Dex Arbitrage and how Dex is our unfavorys.
and also to kind of gas token, which is kind of almost an economic exploit on Ethereum itself,
that's getting neutered in the upcoming London hard fork.
Shout out to anyone who holds gas token.
Also, yeah, I'm sorry for not coming on earlier.
It's worth noting I've, you know, made my career ignoring pretty much everyone in the space who tries to contact me.
So if you're listening and that to you, it's like truly not personal and I'm sorry.
I really try best.
I feel it so on it.
So, Phil, can you talk about flashbots and what the problem was that you were trying to solve here?
Yeah, so kind of the original thing that brought me to MEV was thinking about what is smart contract security.
And in thinking about that and in thinking about what people really wanted to build in the early days, which was decentralized exchanges and permissionless exchanges, it kind of naturally brought me to the question of fairness because I don't consider an exchange secure if it's unfair to users.
So if there's systematic and kind of patent unfairness built into the design,
I think we should exclude that from kind of considering it secure as a community.
So I started trying to define what is security from a formal perspective,
which led me to thinking about fairness and fairness in early decks designs and kind of where designs fell short,
which led me into kind of the front running bots, MEV,
kind of consensus layer on fairness and insecurity angle of this,
and really got me concerned about the possible concentration of power
posed to the mining and validation game because of MEV.
So we're going to talk more about what MEV is,
but MEV is basically money that miners and validators can make
by choosing or manipulating certain aspects of the system
they have control over.
Extra money on the table from things like censoring users
or reordering their transactions
or putting one user's transactions in front of another
or putting their own transactions kind of into the transaction stream.
So because miners and validators have all this power,
and because the MEV world is so complex and so hard to programmatically explore, and because it's such a
profitable, lucrative area, it's kind of a triple threat of having the potential to centralize
cryptocurrencies and get rid of these fairness properties and these decentralization properties we all
enjoy and that all brought us to these systems in the first place. And I think that really has
the potential to erode the trust guarantees of cryptocurrencies, the fairness guarantees of cryptocurrencies,
and the effectiveness of cryptocurrencies in the market. So in solving this problem,
became clear to me that we really need an organization that satisfies two properties. Number one is
that it thinks extremely long term. And number two is that it's extremely aligned with all aspects
of cryptocurrency incentives. And we've designed flashbots kind of very defensively. Maybe Stefan can
talk more about that for these two goals specifically. A big part of that is, for example, we don't
have a token right now. And that's because we don't want to bake in certain aspects of the incentive
structure or kind of get ahead of ourselves in designing this network. We want to make sure that
any structure we build aligns absolutely everyone in the cryptocurrency ecosystem. And that's why we've
chosen to do this through open source software, which is kind of the tradition of cryptocurrencies
and free software and open source software before it. That just kind of people are incentivized
to run and people are incentivized to fork and build off of, but also makes people think critically
about MEV and about what this means and about where the future of this industry is going.
and establishes flashbots as kind of a hub for that kind of activity.
So, Stefan, you want to tell us a little bit about, like, what are the, you know,
practical product right now that flashbots is building?
The way that we have been approaching the problem is, one, we know that there's some
extremely long-term research questions that need to be answered and questions for which
we don't have all the answers to yet.
Yet at the same time, we have high conviction that there are,
some immediate costs incurred by all actors in the system, as well as risks that will take
place in a few years' time, if the ecosystem around MEV extraction goes in certain directions.
And we believe that the best way to help guarantee the most positive future possible and the
most healthy ecosystem of MEV extraction is to start building products that
that enable the users to define the kinds of properties that they want to
maintain on their platforms.
So we sort of dubbed the initial blog post that we released front-running the MEV crisis.
And that's very much so because we observed a lot of alternative memel infrastructure
being built out.
So private communication channels between bot operators or traders and miners.
And we were very worried that these communication channels wouldn't have the property of credible neutrality
and wouldn't necessarily be aligned with the rest of the ecosystem participants, including the users.
So what we set out to build initially is a communication channel that has those properties.
So is able to show some level of credible neutrality and efficiency that helps mitigate some of the immediate cost.
as well as is built defensively against some of the more longer-term risks of centralization and consensus instability.
So we call this the flashbots core infrastructure.
We released that in the beginning of the year, so just about January 1st.
And we've seen a lot of interest from the community to start running this open source software.
So I think where we stand today, we have between 60 to 80% of Ethereum hash rates,
so Ethereum miners that have adopted this system and are sort of using it to most efficiently
extract the MIV the MIV opportunities that are available on chain.
Let's get to our sponsor, Exodus.
Exodus is a fantastic cryptocurrency wallet that strikes the right balance.
between ease of use, security and great features. You can get Exodus on the iPhone,
desktop app, web app, Android, whatever platform you use. It's a non-custodial wallet, and that is so
critical. Because what's the point of crypto if you don't control your own assets? With Exodus,
you always do. They're old school, and they've been around since 2015. Over 1.2 million users
rely on Exodus so you know that they've stood the test of time. They have support.
for over 100 different crypto assets.
And from within Exodus, you can easily change one different asset to the other.
They also allow you to buy crypto with Fiat.
And they even have a great offer where you can buy up to $500 worth of crypto through their
iOS app and pay just $1 in fee.
So go to exodus.com slash Epicenter and check out their wallet.
We want to thank Exodus for their amazing support of Epicenter.
Can we quickly talk about what MEV is?
very practically. So basically, I mean, Phil, you already said that it has to do with ordering
transactions and sandwiching your own transactions and so on. Can you give an example?
Yeah, I can talk a bit about practically the kinds of MEV that we've been seeing. So
MEV sort of stands for minor extractable value, but we've been pushing to rename the term
to maximal extractable value. And as Phil mentioned, it's just any value that can be
extracted from the right of ordering transactions and selecting which transactions get included
in the block.
So this exists with miners to date, but it exists with valid errors in any proof of stake
system and with sequencers in any layer two system.
So the idea is typically the incentive for miners on Ethereum is to just order by gas
price, all the transactions coming in, and simply place the transactions in the block
and mine them. However, there might be some opportunities that exist on chain based on the state.
So, for example, an arbitrage opportunity between two decentralized exchanges, which might be
underpriced by the incoming transactions in the transaction quo. And so there's sort of a clear
incentive for a miner in this case to insert a transaction, which takes advantage of this
arbitrage opportunity.
Now, perhaps a way to think about MEV is not as a single concept, and perhaps Phil has some more thoughts on a taxonomy for this.
I like to think about it as information spheres.
So there's sort of realms of MEV strategies that are based purely on the state of the blockchain.
What is the state of all the different smart contracts that are on Ethereum and where the value are?
And is there a way to send a transaction that's able to redistribute value around?
that maximize my gains.
Then there's a layer of information above that,
which is the transaction pool.
So knowing all the state of the chain,
plus the state of the transaction pool,
is there some reordering of the transactions
that I can do to be able to maximize my benefit,
my revenues.
Then one step above that would be to look at third-party ecosystems.
So for example, looking at the price of certain assets
and how they're trading on centralized exchanges
and then comparing that to the decentralized exchanges.
So then we quickly get into a situation
where MEV encompasses essentially all the information in the world.
And it becomes who has the belief
on what the most accurate state of the world is
and how to represent that on a immutable blockchain
to extract the most amount of value possible.
You asked about specific examples.
So I think there,
categories of MEV that we see the most, we try to label them on a dashboard called
MEV Explore. It's available at explore.flashbots.net. And so far, we've seen mostly arbitrage
being the largest source of MEV activity. But other types of strategies have been on the rise.
So on the one hand, we have liquidations, which happen whether there's sort of a lot of volatility in the market and large drawdowns in price.
We've seen a lot of white hat type of rescues that are trying to either secure a protocol or perhaps black hat activity that are trying to exploit a protocol.
And we've also seen more and more decentralized exchange sandwiching.
So using some of the specific mechanics in decentralized exchanges like Uniswap to be able to make a cut based on the mechanisms that are used for allowing variable pricing in the quoting mechanisms.
So these are all strategies that honestly change on a daily, if not weekly basis.
So another interesting sort of thread of stories, and I recommend you guys follow one of our new product manager, Robert Miller on Twitter.
He's been putting out really great threads that highlight some of the more exotic types of MEV activity that we've seen,
like certain MEV bots turning evil against other MEV bots and trying to attack them for profit.
So it changes on a daily basis, weekly basis, and there's always some really interesting stories to follow in this space.
Yeah, to kind of expand on that a little bit, I think MEV is something that's really fundamental to permissionless systems to get a little bit more philosophical about it.
What we're trying to build here is systems that people can audit, that are auditable cryptographically without requiring trust in certain third parties and kind of minimise.
the trust assumptions that we use and making as many of those trust assumptions kind of automated and easy to audit and verify as possible.
So that being the philosophical goal and us wanting this concept of decentralization where people all over the world contribute to outcomes and have a voice,
there's kind of going to be this natural value distribution among all the possible outcomes of the system, right?
So like whether I get mine before Stathon or vice versa, all the possible kind of inputs that,
that all these people have into the system and the related output that comes from combining
their inputs has value to kind of everyone in the world as these systems grow.
So what's new in these systems is kind of the ability to condition payments based on this
fact in a really efficient way that, again, requires no additional trust assumptions,
which means fundamentally the security of these systems, and this is something Vitalik really
explored a lot in like 2017, 2018, when he was trying to create a framework for how to secure
Ethereum from like a theoretical point of view, the security of a lot of these systems has to be
done in a bribery kind of model. And while bribery is a dirty word, all that really means is that
people can really efficiently condition payment on preferences in a way that kind of structurally
doesn't really care about necessarily the moral implications of that. And we want to use that
infrastructure to build systems that are fair for users and build systems that are better than
existing financial systems anyway. So MEP kind of comes from this ability for validators to kind of
have different economic values of their different choices in the systems. And as DeFant says, it happens
in proof of work systems. I recommend the paper Flash Boys 2.0, which was kind of the paper that
defined MEP. It does a deep dive into the arbitrage and decentralized exchange case of MEP. But as
these systems grow, MEP is kind of everywhere in all of their operations and anywhere different people
might prefer different outcomes. Not only that, but it's also fundamental to how a lot of these things
are built. So the reason why Uniswap works as an exchange and the reason why it always offers
users a market price at any time without requiring a counterparty is because the counterparty is basically
all of these bots and all these miners that are being paid and incentivized through systematic
rents to do trading activity that brings the price to a market price or to some reasonable margin.
And we've set up these activities and they kind of execute
because they're profitable. And that's a fundamental component of why uniswap is permissionless,
right? Anyone can come in and anyone can arb uniswap back to the mean and anyone can profit from it.
That introduces robustness more than having a certain permission order or a certain sequencer or a certain
centralized source of authority. The same is true for liquidations. So MakerDAO is a system that
tries to build a stable coin with a token that's kind of floats in price with the dollar against
Ethereum. And the way they do this is through debt positions that are collateralized by
cryptocurrencies and other assets. And as the price of these assets changes, sometimes
this debt needs to be repossessed in a liquidation event. And this collateral needs to be
sold to maintain the stability of the system. If that process fails, the system collapses.
So that process is fundamental to the goal of this system. Now, the question is, how do we
decentralize this process? So everyone has input. Well, that's very hard to do without economic
incentives. And then that's very hard to do without creating this preference distribution over
these economic incentives and therefore this value that comes from these validators and which
kind of input they provide to the system. And this value is kind of where flashbots is focused,
especially in Ethereum today. How do miners kind of interact with this value and how does this
value flow in the system? And it's a very complex space. And there are many, many different types.
Basically, any kind of smart contract has MEP. So I encourage all users and DAP developers,
Think very carefully.
Where is the MEV in my transaction, in my system, in whatever I'm interacting with?
You know, most people book flights on travel aggregators to get more options and the best prices for the travel plans.
So when you're making defy swaps, use pair swap.
It beats market prices across all major dexes.
And thanks to the network of professional market makers, you'll get zero slippage on your trades.
They just pushed a huge update that's even faster and more liquid,
thanks to a brand new algorithm. It's cheaper than Unoswap, and it comes with a new gas token
that cuts your gas fees by up the 50%. It's no wonder Metamask, Argent, and monolith all rely
on the Paraswap API. So give Paraswop a try at Paraswop.io slash Epicenter. This URL allows you
to claim a 50% refund on gas fees for your first swap of at least one ETH. This offer is available
until May 1st, 2021, and refunds will be made every Friday starting April 9. We'd like to thank Paraswap
for their supportive epicenter.
So would it be fair to define like MEV as this sort of edge that minors have in this like
value game because they don't play by the same rules as everyone else?
Exactly.
Yeah.
So minors are in somewhat of a of a privileged position if you want to call it that.
I don't, I think that word is like legally and trust loaded.
So maybe not the best one.
But they're in an advantage position to take advantage of this.
And that's why it's called minor extractable value.
Right? So a lot of people are confused. They're like, oh, there are bots extracting this value. The miners are not playing this game. We have a leaderless protocol. There are no miners. All these kind of gut reactions to MEV. The reason that it's called minor extractable value is because in proof of work, blockchains, the miners are in the ultimate position to have the ultimate advantage. So in the game theoretic long-term equilibrium, it's the miners who are able to extract the value. Any permissionless value is best extracted by the miners because the miners can do any permissionless stuff.
from a better vantage point than the users.
So that's why even if today bots are taking it
or it's being left on the table
or it's a hack no one's discovered,
it's still value that is able to be extracted by miners,
and it's still relevant to things like the consensus meta game
and the blockchain network security
and the properties users are getting from their protocols
and how we design DAPS and how DAPS interact with each other.
So all these kind of follow from viewing MEV in this framework
and thinking through that to its logical conclusion.
This is super fascinating.
And I think we'll dive into the moral consequences of MEV in just a bit.
But maybe let's take it from the top.
Maybe let's talk about how exactly it actually works.
So you said that 80% of the miners currently run the flashbots.
The flashbots fork of the guest client, I think is probably the right way to put this.
So can you tell us about the Ethereum client that you forked and what exactly it does differently than the
the regular Geth client?
Sure, I can get into that.
So basically, FlashBots built the system called M-V-Geth,
which is a patch on top of Geth.
And really what we did was write a reference implementation,
and each miner actually builds their own version of it.
We sort of entered a level of sophistication on the minor side
where all these companies have teams of developers in house
that build custom infrastructure.
And so it's very difficult for them to introduce any sort of third-party code.
That's not a core Geth code.
And they'd prefer just write the code themselves in many cases.
So we essentially published a reference implementation for a patch on top of Geth
that opens a new RPC or a new communication channel for third parties to submit arrays of
transactions instead of only being able to submit a single transaction.
Then inside of the the death node itself, we created a new worker.
So workers are essentially parts of the node that are in charge of producing blocks and
validating blocks and determining how much value those blocks contain.
So by creating a new worker, what we've been able to do is in parallel, create both a regular block as well as a block that contains some of these arrays of transactions that are submitted from the flashbots network.
These arrays of transactions all compete against each other for being included at the top of this new block.
So instead of relying on gas price and competing in the memory pool, basically what we're saying is we're replacing the typical gas auction that orders by gas price with a new auction which evaluates the value of each of the bundles and only includes the best one at the top of the block.
One of the core properties that this new approach gives us is users no longer have to pay for reverted transactions.
And so this saves a lot of the space that is used by PGA bot operators that tried to aim for an opportunity, but get beat to it.
That's all block space that can be reused for other types of transactions in the network.
So to summarize, basically MEV Geith, a patch on top of Geith, it's a new communication channel,
which allows for submitting transactions directly to the miner in a private fashion and removes any sort of reverted transactions from the Ethereum blockchain.
And so who submits the transactions or the ordering of the transactions to the minor?
Can anyone do that?
So right now we're in the alpha stage of the system.
So we have some technical limitations around privacy and spam protection that have to be mitigated through trusted relay operators.
So FlashBots operates a relay that collects bundles, as we call them, arrays of transactions, from a network of different participants.
These participants, we call them searchers, and they really are just any.
Ethereum user that wants to, for whatever reason, communicate their transactions directly to the miner and sidestep the typical mempool.
So these can be existing bot operators who are doing arbitrage or liquidations, but they can also be regular users who are looking to get their transactions included in the Ethereum blockchain without being front run.
So without anyone else in the network, seeing their transactions in the pending transaction pool.
So once they submit those transactions to a relayer, the relayer is able to validate them and forward them over to the miners.
And then what happens then?
So basically the miners then get these private orderings and private transactions.
And how do they decide what to include in which block?
Sure.
So they evaluate all the different transactions, and they look at both the gas price, as well as the direct transfers of ETH to the Coinbase.
And they essentially do the seal bid auction.
So without any of the submitters knowing what is the value of the other bundles that they're being compared against, the miner just picks the most profitable bundle and includes that at the top of the next block.
And how is the searcher then compensated for this?
So the searcher is actually the one that defines the price that they're willing to pay to the minor.
So Phil mentioned the concept of a bribe, and that's very much so the equivalent of a fee payment for regular transactions.
As a searcher, what I have to do is I see an arbitrage opportunity or any other opportunity on chain.
and I determine how much that opportunity is worth to me.
Then I have to determine how much of that value I'm willing to transfer to the minor
to bid for inclusion in the block that I want.
So the payment is conditional on how much the,
how valuable that opportunity is to the searcher,
as well as how much competition there is for that opportunity.
Let's get to our sponsor Solana.
Now, this is a special ad for me to read because I've been a deep supporter of this project
since meeting the Solana team back in 2018.
I invest personally in the project and my company, Course 1 is super deeply involved in the
Solana ecosystem, including running the biggest validator.
So what's so cool about Solana?
Well, we all know that scalability is the single most important issue facing the
blockchain industry today.
And the Solana blockchain is an amazing solution for it.
The network supports thousands of transactions per second with 400 millisecond block times
and over 500 validators.
The special thing about Solana is also that it's not a sharded blockchain.
It's a single blockchain hyper optimized for performance.
So that makes it really easy to maintain compostability between all of the apps on Solana
so that they work together seamlessly now and forever.
The Solano ecosystem is growing at a rapid pace and it's a great place to build your project
or just get involved with the community.
So go to Solana.com slash Epicenter to learn more.
So Stefan, how do, I would assume that the opportunities are fairly standard and bots
will kind of find them by just looking at transactions in the MAM pool.
So I would assume that different participants kind of find the same opportunities.
So how do you prevent them from grim triggering each other?
Yeah, great question.
So there's, I think, a very, very, very extremely large set of types of opportunities.
We have this nice graph, I think, that we put out in our February transparency report.
By the way, you know, because we want to make sure we are aligned with the community,
we publish sort of on a monthly basis or as much such as we're capable to stick to that schedule.
reports on the state of the network.
And we're always looking for feedback and questions for how we can improve the transparency of the system.
So in the February transparency report, we have this graph that shows the theoretical MEV,
which is sort of this large circle, the current MEV that gets extracted,
which is a somewhat smaller circle, and the MEP that we've been able to map using with MEV Explorer
as an even smaller circle.
So the point that this chart aims to make is that MEV strategies is extremely broad
and is defined by the complexity of all the different possible combinations of smart contracts
that you have on chain and what is the most complex set of interactions that you can have
to be able to extract the most value.
So under this framework, an arbitrage and a liquidation are very simple interactions.
right, that only target maybe one or two protocol.
But you could have MV opportunities that span hundreds of different protocols.
I think in the typical financial markets, right, there was a lot of concerns that too many
exchanges would create too much arbitrage opportunities.
And we were looking at like 10 exchanges or like 15 exchanges.
But then you go into a permissionless system like Ethereum and anyone can fork Uniswap and
create a new exchange out of it.
So you feasibly have thousands, if not hundreds of thousands of different exchanges with arbitrage opportunities between all of them.
So it becomes extremely computationally complex and computationally demanding to be able to identify what the optimal extraction value is.
And so there's a lot of room for competition and specialization.
Now, that being said, there are very simple strategies.
So the uniswap sandwiches or the uniswap to sushi swap arbitrage are very simple strategies.
And we've actually published an open-source trading strategy for uniswap to sushi swap arbitrage.
And we've seen really interestingly over time, right, the percentage of the value being transferred to the minor being bid up towards nearly 100% for the minor.
So this is something that we expect to keep happening, where whoever does the most amount of research up front and discovers, quote unquote, new alpha is able to extract it for a very little fee, right, is able to keep most of the value.
But over time, as other searchers become aware of this alpha and the alpha leaks, we expect the value to transfer to the minor to be gradually bid up.
to 100, which is sort of this grim trigger that you're speaking of. So the end results for a lot of
the very simple strategies will be to have the full payment being sent to the miners. But this might
change depending on the complexity of the strategies. So the speed of the alpha decay may will be strategy
specific. So hopefully that gives some insights on how these different strategies evolve over
Tom. Yeah, and it's also worth noting that I think this is the best for all ecosystem participants.
So as we mentioned, our goal is to align incentives. I think it's inevitable that miners will
extract most simple MEV because if we build any system where that's not the case, they will build
their own bots and they will run their own bots and they will extract the MEV because it's
more profitable. So we actually want it to be the case that MEV that's kind of well known in the
community is fully extracted efficiently by the miners and all the profit goes to minors. That's actually
the best for a consensus security, too. It turns MEV into the most predictable and stable form of
minor fee that helps rather than hurts potentially network security in some cases. So that's kind of the
best case scenario for those simple opportunities. We want kind of an efficient engine that at all times
is sending as much profit to the miner, which is naturally what's going to happen when either you have
a lot of bots competing and margins go really low, or the opportunity is simple enough that
miners actually run their own bots that send all the profit to themselves. So when they mine their own blocks,
they'll kind of make all that money.
And when other people mine their blocks, they'll also kind of be in that competitive
landscape.
So we're not against that kind of participant participation either.
We want to make sure that even from a minor point of view, if they are kind of tempted
to develop MEV infrastructure, they're incentivized to do that in an open, permissionless
decentralized way as well.
So that's kind of how we think about incentives.
Of course, we also want to incentivize a robust, decentralized network of worldwide participants
and smart people who are thinking about what is the latest MEV and how do we optimize things.
If we don't have that, it'll actually open all our defy systems up to attack, right?
Because any group of smart people like that can then come in and kind of wreak havoc on the entire system.
So we want to incentivize people to constantly be at that bleeding edge.
And we think that the flashbots kind of decentralized searcher competition model,
at first, when there's not that much competition, pushes people towards that bleeding edge where all the profit is,
It incentivizes development of new strategies and a more robust infrastructure.
And over time, that infrastructure kind of gets naturally folded into the open source
and into the kind of corpus of MEP strategies that's efficiently going to the minor and subsidizing network security.
So that's kind of how we view the incentive landscape playing out in kind of the short to medium term.
You mentioned that part of it is the most predictable.
So I agree with a lot of what you said, but I don't understand why you think it's the most predictable.
Isn't it actually perhaps one of the most unpredictable forms of like minor incentivization where like, you know, something like block rewards is actually what's, you know, probably the most predictable. And then something like EIP 1559 fees are like, you know, probably more predictable. Like this seems very unpredictable because you actually have no idea of like really knowing what the MEV on a chain is. Yeah. So MEV is inherently less predictable than these things. I really meant predictable like from the perspective of MEV. Like, like,
if you have some blocks where you're extracting 100% of MEV and some blocks where you're extracting
10% of MEV depending on the miner, I consider that like a less predictable ecosystem than like
every single block has 85% of available MEV kind of extracted. So within the MEV infrastructure,
it also depends how various participants are kind of extracting it, where that value's going,
and how efficiently kind of what's being left on the table is being collected rather than being
left to accumulate and fueling kind of more variance and more unpredictability in the system.
So what's stopping the miners from just using the information given by the searches on how
to order things in an optimal fashion and just using that without paying anything?
Sure. So it's really interesting, right? Because miners have this privileged position. They would be
able technically to front run any arbitrary transaction that gets sent to them.
And one of the challenges that we wanted to solve is that we saw a mounting incentive for
miners to do so, especially as transaction fees would potentially go down, as E2 sort of looming
around the corner, the incentive for miners to become active participant in this MEV extraction
becomes greater and greater. The best way to mitigate that is to create an efficient
auction mechanism that makes sure that the miners are sort of fairly compensated for the
opportunities and have minimal incentive to perform the extraction themselves.
Now, within the flashbot system itself, there's still some risk of the miner being able
to front run the flashbots bundles as they're coming in. Because at this point in time,
in the flashbots alpha, it essentially relies on trust and guiding principles.
to ensure that the system is operating in a stable and fair fashion.
Over time, what we want to do is develop some cryptographic approaches
that provide the same guarantees, but without the aspect of trust.
So basically, what's required for MEV extraction to become completely trustless
is a private transaction pool where a user of Ethereum can communicate a certain set of
preferences on transactions and their ordering to a minor without the minor having any idea
what is the content of the transactions until they are mined in the chain. And at that point,
it becomes economically infeasible for the miner to extract it. So there's a number of different
approaches to achieving this. Some of them use commit reveal systems, but some other ones
use sort of purely, you could say off-chain or transaction pool encryption to be able to
achieve these properties. Now, why aren't miners doing it today if this is still something that's
actively being researched? I think miners are very smart and they are actually trying to
minimize the amount of risk that they pose to their business. And they see that being compatible
with a healthy ecosystem for MEP extraction is actually long-term beneficial to them.
So if they are found to be front-running the transactions of their users, users can quite easily
decide no longer to send transaction to these miners and instead point transactions to
those that operate in a more fair fashion.
So there exists some economic reasons why miners sort of behave in the way that they do.
today. I know one of the solutions you guys were exploring is this like SGX based solution to do
this hidden mempool. How is like the progress on that? And what are other cryptographic solutions
you've like considered? Sure. So Sunny actually came on and did an MEV roast with us. So
MEV roast are community calls that we have at a regular interval. And we invite great minds in the space to
come host them and present some of the core challenges.
around MEV and what is the potential solution space.
And I think that's a really interesting video to go watch
for what are the different alternatives to Memple level privacy.
So the one that we're the most excited about right now
and the one that we're exploring is based on an SGX permitive
that essentially performs the validation of transactions
on the user side in order to mitigate some of the
concerns that we have for privacy and spam protection. The reason why we think
SGX is a good solution is it's backwards compatible with Ethereum as it functions
today without requiring any consensus level change. And it's also highly, it has good
latency properties. So it doesn't introduce unnecessary computation that would
prohibit some of the more time-sensitive use cases like a
arbitrage. We'll be releasing a design for this MEVSGX approach very, very soon, and we encourage
community feedback. So we are at sort of at the stage of the proof of concept in determining if this
is a viable path forward. I think an other interesting approach that has a lot of merit and could be
implemented on Ethereum is a crypto-economic one. So instead of having some sort of cryptographic
guarantees on privacy, you would have some economic guarantees where the entities or the searchers
that are requesting for block space would be economically bounded for the blockspace that they're
targeting. And if they submit invalid requests to the miners, they would have to have some
kind of slashing mechanism that punishes them for submitting invalid requests. So this is another
promising path forward. It's not the one that we're exploring immediately, and that's because we think
that a purely cryptographic one will always be strictly superior to an economic one, but it's
one that we may explore and further in the future if the SGX-based approach seems less promising.
So currently, does flashbots actually increase minor site centralization? Because basically, it creates a
barrier to entry for anyone new who's not part of the flashbots branch?
You could frame it that way, but I think it also decreases minor centralization by
letting people be part of the flashbots kind of boat and profit is same as everyone else who's
in the flashbots boat proportional to their hash power. So I think MVV really is best and
works most efficiently when miners and validators have access to value in proportion to their
input, their economic input into the network in kind of a linear way. So if you have 10% of the
hash power, you make about 10% of MEV revenue. If you have 40%, you make about 40%. That just works the
best from kind of a system stability and economic analysis perspective. What you really don't want
is kind of a super linear function, where if you have 10% of the hash power, you make 5% of the
MEP. If you have 40% of the hash power, you make 80% of the MEP. You don't want that because
that's an enormous upward centralization pressure. It's a direct economy of scale.
and it kind of works against decentralization in many ways.
So the goal of flashbots is to keep that curve linear and keep the barrier of entry low.
So we are kind of introducing centralization towards this social barrier to entry.
We basically are kind of, you know, admitting people on the minor side manually into the flashbots
network because there is such a trust-based component and because we're still building out
and testing so many different aspects of the system.
That's not the ultimate goal.
and we know we can build something that's not that,
that has much better decentralization properties
and doesn't rely on any central actor or third party.
And that is kind of the long-term goal.
That being said, MEV is already a centralizing force.
So because we have so many competitors,
when FlashBot started, that curve that we want to be linear,
was already moving into that super-linear mode.
And we were already seeing larger miners and larger pools
that had the engineering resources to do so,
start to both run their own M-EV bots,
internally, as well as to offer products to people who are running MEPB bots that were tailored
to their bots and tailored to their operation.
So that was already kind of driving the curve away from linear.
I think FlashBots has flattened that a lot.
Yes, at the expense of kind of this momentary faith that we will be good actors and that
we will decentralize things and that we will be able to kind of maintain this equilibrium
and this balance between all these miners to kind of keep this curve flat for as long
as possible. And I think that's to the benefit of all miners and everyone in the ecosystem.
So how are you looking to decentralize this in the future? And what's the timescale on that?
So I'm not going to start like an ETH2 meme of trying to define what the timescale for releasing
these hard research questions are. But I will say the path is quite clear. It is about replacing
these trust guarantees for
privacy and
spam protection
into cryptographic guarantees.
And once we're able to
do that, either cryptographic or
cryptoeconomic. And once we're able to do
that, basically we can set up the network
in such a way that it's fully
decentralized.
So for what it's worth, right, we are actively
researching this internal, but we're also
doing a lot of
research with third parties and issuing grants to help move forward the different approaches
to transaction pool privacy.
So if this is a hard problem that you're looking to work on and interested in contributing to,
you should definitely reach out to our research team and participate in those discussions.
So two questions I have about the architecture before maybe we move on to some of more into
the MEV.
but the first is like, I guess you can say one of the things that changed here and why this
says like, you know, the current gas prices on Ethereum have dropped, you know, probably significantly
because of flashbots is the reason this works is because, you know, the bribe, the fee being paid
to minors is not done until after the transaction executes and is successful.
And this is, you know, like you mentioned, preventing all these reverted transactions from happening.
And meanwhile, in normal Ethereum transactions, the GASP is paid regardless of successfulness of the transaction.
But that's done for a reason in order to prevent spam attacks, right?
Like, doesn't this open up a large spam vector on flashbox if, like, the miner doesn't get paid until they execute the transaction and find out that it, you know, if I just spam them with a bunch of transactions that fail, they have to execute them to figure out that they fail and realize they don't get paid?
Correct. So that's sort of the trade-off that's being made when you think about privacy
is you need a way to validate that the transactions that you're receiving is a valid one.
The way that the regular transaction pool does this, right, is essentially every single
node in the network does its part in doing spam protection. So when a node receives a regular
transaction, it sees the full content of it and is able to assert that the account sending it
is able to pay for the amount of gas it requests and has the amount of value sort of on hand.
And like you said, it does pay that through reverts.
Now, by creating both a private channel for communication and keeping the reverts off the chain,
it creates an additional burden on the miners to be able to validate the fire hose of
transactions that they'll potentially be receiving.
So in the short term, during the flashbots alpha and possibly the beta as well, the solution to that is to have highly scalable relays that are able to do that simulation work by essentially just throwing hardware at the problem and protect miners from mining nodes from that kind of workload.
In the fully decentralized version, either some cryptographic proof or crypto economic bonding would be able to mitigate.
the spam factors.
How do a crypto economic bonding work here?
Because isn't the challenge that the tender doesn't know whether their transaction will succeed or not?
Yeah.
So basically what you'd have is at a high level.
Again, these aren't designs that are fully thought out.
But at high level, what you need is for the miners to be able to sort of submit a proof that the request made by the searcher was invalid.
and for that proof to be able to unlock or slash the bonded value of the searcher.
So obviously those proofs aren't specified and how they actually settle
and on sort of which layer and which chain they settle is not specified.
But that's the sort of high-level architectural design that would be required.
The other question I wanted to talk about as well is how does FlashBoss deal with Reorgs?
So, you know, once a, you know, Ethereum doesn't have like this like finality is that like, you know, other chains, some other chains have.
And so like once a transaction is published in a block, it's widely available, what's to prevent another minor from like purposely reord that transaction?
Because now that data is already available and they can, you know, profit off of that.
I'd say in the spirit of incentive alignment, what really stops miners is long term incentive alignment.
You are right. It is kind of immediately economically viable in the short term to kind of fight over MEV.
There's kind of two things in the metagame that I think work against this. Number one, and no one's really studied this or formalized it, but there's probably some sort of competitive game between minors that if they're all trying to orphan each other and attack each other for MEP, the profitability of this activity kind of reduces drastically.
because if they're all ignoring each other, they each have kind of success that's proportional
to their hash power anyway, which is the same probability they would have had of capturing
that original opportunity.
So in that way, it's kind of not, it is marginally beneficial to kind of go down that short-term
kind of path in the same way as like a prisoner's dilemma.
But for the ecosystem, I'd say it's long-term even less beneficial.
And not only does it cause instability, it erodes kind of the long-term value and it reduces
the amount that's like even in the medium term on the table for minors.
So economically, if there's any stickiness in kind of their hash power investment and their
infrastructure and their loyalty to the network or any kind of thing like this, they kind of have
an incentive to not grief each other and not really degrade service for users and not collapse
the MEB market in doing so.
That being said, this is kind of a viable attack vector.
And it is a viable thing, especially if maybe a minor is desperate and they're willing to try
some kind of short-term tricks to get out of.
of a whole or some other kind of desperate situation. So it is in the long term one that we are thinking
about on the research side and that we want to mitigate. I don't think it's unique to flashbats. I think
MEV just introduces this incentive in general. In fact, that's why we originally defined
MEV to kind of study how much incentive there was for reorgs at the consensus level. That being
said, I do think it's like very important to come up with mechanisms that formalize this
metagame and harmonize these incentives and make sure that there's kind of direct economic
incentives for long-term stability as well as indirect incentives and metagame incentives.
Yeah, it would be super interesting to see whether this actually happens because I think,
I mean, in the short term being the loan defector obviously pays.
So whether the long-term viability of the ecosystem or the long-term flourishing of the ecosystem
is good enough a reason against this.
I'm not sure.
So I guess we'll have to see how this pays out.
I think a lot of things, though, are relying on their altruism and are relying on these diffuse
incentives, right?
Like, miners could easily, and not that I'm trying to make this alternative happen by vocalizing
it, but like their incentives are not to mine beacon chain transactions in like the margin,
unless they kind of believe someone else may mine it for like metagame reasons.
But if they all were acting kind of rationally and colluding through this informal chance,
even if not directly, they would probably not include beacon chain transactions and try to
degrade doing things like staking eth and try to mess with this transition in more active ways
and try to, you know, extract as much value as they can while they still can.
I think miners, first of all, mine many other currencies, so they have reputation that goes
beyond just eth and they have plays that go beyond just eth.
And second of all, I do think that even for people who mine just eth, that messing with
the system is not likely to be long-term more profitable than participating for anyone who has a
significant stake. But that is, it remains to be seen, like you said. Cool. So this is super
interesting. I'd like to kind of move on to the legality and morality of this, though. So,
Ari Jewel wrote an article a couple of weeks ago in Coin Desk, I think. It was cited front-running
as a service as theft. And it had this allegory about the
police force of a city that I would actually kind of like to quote because it is pithy in many ways.
So he writes as a suggestion how to see this in real life or parallel in real life.
So he writes, we'd like to announce a great new idea we've devised free from the police.
Today, cities direct their police forces to prevent and prosecute theft.
But crime is a tough problem and policing is costly.
What cities should do instead is auction off the rules.
right to mug people and burglarize homes. Sure, burglaries would become more professional to take
advantage of any vulnerable property. But on the bright side, cities can use theft auction money
to pay city workers' salaries, offset shortfalls in tax revenue, and fund new policing
initiatives, including prosecution of unauthorized theft. So how would you guys respond to the
assertion that you're kind of institutionalizing
exploiting the users.
Yeah, you know, I think that's a very common gut reaction to things we're doing,
and one we almost try to bring out in people because it generates interesting and deep moral
discussion that we really welcome and embrace here at FlashBots.
Ari is my PhD advisor, obviously, he's like a long-time collaborator and friend.
I've talked for many thousands of hours with him on MEV.
I think we have our respective opinions and our respective positions and conclusions that we both
have derived from first principles and we both feel strongly about and we both just like
differ on some axioms and some some kind of philosophical and kind of qualitative opinions on the
world. That is all to say. I think our viewpoints differ less than is expressed by him,
you know, kind of characterizing flashbots in this way. And I like to think that that was kind
of an attempt at lighthearted trolling to get people in the community to engage these issues and to point
them out as serious. And you know, we do plan on continuing that threat of discussion.
in our rows. Obviously, I don't think FlashBoss is very similar to theft. I think, you know,
theft is a very kind of emotional word. It kind of relates to using force to overpower someone's
personal property. I don't think Flashbots uses force. We publish code. And I don't think we
erode people's personal property in that way. Like, I think if by running, if by writing a hundred
line very obvious that was kind of being developed anyway, patched to Geth and releasing it to minors
and saying, like, here, look at what we wrote, if that leads to widespread theft and burglaring of people's
cryptocurrency balances, then the experiment has failed and it was never going to succeed because such a
weak attack, such a small expression of existing incentives, was able to lead to loss of value.
That being said, I don't think it's the case.
Like, I don't think the real security of value in cryptocurrency really relies on minors.
I think there's a number of articles going back, since I've been in the space,
debating who really has this power? Is it the users? Is it the node operators? Is it the miners?
Who is responsible for enforcing norms and for enforcing value? It's a complex question and the answer is
like probably all these parties, but ultimately the users. And MEV does not rob users of control.
It just changes the landscape in which they're expressing transactions to a more kind of efficient
machine. That yes, maybe worse for them when they use certain mechanisms in outcome. Certainly
mechanisms that were not designed to handle this and certainly mechanisms,
which would be insecure if you kind of left all their MEV on the table,
things like Uniswap and like MakerDAO.
That being said, I don't think a user using these things in the FlashBoss world is getting robbed.
I use Uniswop all the time.
You can look up my cryptocurrency address.
I'm very public about it.
I always have been.
I use Uniswap.
I use MakerDAO.
I use systems that have MEP in them.
And over time and in doing a lot of thinking about these issues and using these systems,
you realize that really the truth is more complicated than any single gut
reaction to what kind of activity looks like or what behavior looks like in the space from a
cursory glance is. And so I have a very detailed response to kind of those claims and kind of my
philosophical argument for why we need to extract MEV and what we should do about it on my blog.
It's called MEV What Do? It's also on my Twitter. If you're interested, I encourage you to read that.
The basic premise is that we're trying to build systems that are economically secure and without
extracting MEV and without aligning these incentives, that's not possible. And the cryptocurrency
experiment has already failed. And so, so yeah, we do have some philosophical differences on
this, on this kind of point and on kind of what the best solution is and on how powerful
fair protocols are and things like that. I encourage people to get into the weeds and to engage
us in this conversation, but I also encourage people not to kind of go with their first emotional
reaction and to let that guide them and to kind of keep that and use it to engage these
questions, but also kind of engage these questions on an intellectual level.
look at the resources we're putting out and kind of all the thinking we've been doing.
Because I think nobody in FlashB is looking to make a world where theft is normalized.
I don't think that's an accurate characterization of anyone who's building in the MEV space in any
organization, really, except maybe on the fringes.
I'd like to engage with it now, then, if possible.
And so it's like, you know, in your blog post, like, you mentioned that you think
MEV is unavoidable.
why don't I understand why you think that's the case.
I guess for me, like the larger thing for me is that like, you know,
it seems that MEV has like all these like negative side effects,
such as like consensus sensibility, these PGAs, like price spikes.
But then it also like, you know, I think there's negative impact of the like of the MEP
extraction itself, not like as externality, but it's like, you know,
entire, the term itself has the word extractable, right?
You know, you're clearly extracting something from someone.
And, you know, I feel like the flashbots architecture does a really good job at, like,
helping solve some of these externalities.
But it's not really, like, doing much to reduce N.EV at all and itself.
And, like, you know, like, Phil, you mentioned at the beginning, like, you know, you started down
this journey with, like, you know, thinking about what makes a secure exchange.
and making sure everyone has like this like fair pricing and all this kind of stuff.
I mean, this flashbots really help solve that?
I'd say yes and no.
So you're right.
I did start down that rabbit hole.
And that rabbit hole led me into things like bash auctions.
It led me into things like traditional financial research, you know, papers like Eric Buttig's,
you know, HFT's unfairness, will the market fix the market?
Which I highly recommend to anyone who's just getting into the deck space or into the market
design space. It led me into like a number of conversations with people at exchanges all around
the world on how they viewed fairness and what their market requirements are. It led me to
very deep and very long conversations with projects like Uniswap and other Dexes in the space.
Pretty much all Dexes in the space, I think, have been like yelled at by me at some point or
indirectly or directly. So this is something I feel very passionate about. And I agree that
MEV Geft itself as a product does not speak to this question.
That being said, I think I drew two conclusions in my journey of like really trying to show fairness and trying to get batching and get MPC and get all these designs that we're now seeing coming out now that MEP is accelerating into the mainstream like two years ago.
Right. And my conclusion is that like some people like the idea of these dexes, but there are UX tradeoffs involved in all these mitigations. And the UX tradeoffs make the systems more complex more often than not.
So my thesis following that and like trying to get these projects to adopt fairness, even ones that I advised, right?
We spent some time at various decks as like thinking through like how can we combine liquidity from like fair and unfair protocols.
What does this even mean?
Right.
And this led me kind of down market design rabbit holes.
Things like why don't batch auctions dominate the world of finance?
Why do we still use continuous limit technology?
Is it really just political inertia or do certain classes of users prefer these?
market designs. Is it really just political inertia or is it possible that this kind of mathematical
analysis of fairness in these papers is making kind of modeling assumptions which aren't exactly
born out in the real world or there's some kind of misalignment when you combine these systems
with other designs or run multiple versions of this single system in parallel that just escapes
the on-paper analysis. So in trying to study these problems, I literally went crazy, like no joke.
I encourage anyone to try and like maybe you'll be better than me at it. But my conclusion is that
like the design space is infinite. And there is a lot we can do to reduce MEP. And there's a lot we can do
for concrete fairness gains, right? Stopping users from being brutally sandwiched or like screwed for like
multiple percentage points. There's a lot of low hanging fruit there. And there's a lot of market
designs that are possible in that tradeoff space. That being said, this concept that like we can just
promote one solution or that any solution will kind of encompass and bring all MV to zero is not
something I view as a realistic outcome anymore. Something like uniswap, where the UX is that you
want a trade to be able to be executed in the middle of any function call. There's inherent reasons
that introduces MEV, right? Because you don't want to know what trade you're going to do before the
transaction is mine. That's the whole point of that U.S. That being said, if you don't know what trade
that you're going to make before the transaction is mined, you're handing control to the miner to choose that
for you. And maybe you want to do that in some cases. Certainly, we've seen many, many types of bots that
do that every single day on Ethereum. So that is all to say, like, I think there's a lot of potential in
reducing MEV and exploring new, more fair market designs, especially for different use cases.
Like, that's one thing I concluded in my kind of traditional exploration in talking to different
exchanges for different products, futures exchanges, derivative exchanges, securities exchanges,
commodities exchanges. They all have different designs. They have different rules, different pathologies,
different actors with different trade-off preferences, different time horizons, different regulating
agencies, different requirements. And I expect the same to be true across fairness protocols.
I expect the same to be true across any kind of MEV-B.
That's not to say these things are useful and that they won't help, but I don't personally have faith, and I'm open to being challenged on this, but I don't have personally faith that any of this is a silver bullet that reduces MEV to zero, especially because MEV as maximal extractable value really cares about what happens when all your assumptions break and when the only thing that matters is like the brutal reality of the optionality of your decentralized participants and their incentives. And in those ecosystems, fair market assumptions break down and any kind of boot
strapping assumptions you might make to try to reduce MEP also break down. And so I think there's a lot of
space in the U.S. space for MEP, and a lot of it I do personally think is fundamental. And I encourage
people to kind of read my blog post on that if they want more detailed and kind of textualized
arguments for that. But at a high level, I really do believe that. We can reduce MEP and we want to
reduce MEP at FlashB. That's an open research challenge. We're funding something we're working on
internally. We're thinking about whether to do that at the DAP layer. We're thinking
about whether to do that at L2. We're working with companies like optimism and other kind of
MEPE actors in the space. So we're doing a lot of work to try to think through fairness protocols.
And we're open to working with anyone in the space on that. So please reach out.
Have you guys thought at all about, you know, if you're building this like sort of private
mempool using the SGF solution, instead of using it as an MEP for MEPB searchers, like
why not just open, like try. It's more about a positioning thing, right? Anyone can go ahead and
push to this private mempool, are you going to try to promote like all Ethereum users to like
push to a private mempool? So that way like that that kind of helps solve, you know, a large amount
of the MEV, especially at least a large amount of the extractable MEV, like the one that's being
extracted from users. Yeah, I think that's a really good point. And actually one that is like vastly
underrecognize. I think the interesting thing about MEV is like who is it serving, like especially
private transaction pool.
Who is actually going to be willing to pay for the development of it and who are the number
one users?
But is there a way to convert the work that's being done for these entities into work that
benefits the broad population?
I think that's generally the answer to that question is yes.
So while FlashBots is designed to be incentive compatible for all sort of parties in the
MEV game to utilize. It also opens up a channel for regular users to send their transactions
in a way that's protected from any sort of front running. Now, this gets into quite a deep
requirement of analysis on what are the types of transactions that are going on Ethereum,
and what do these transactions care about? So I think this is quite actually a useful framework
for thinking about the future of Ethereum transactions post EIP 1559 as well.
There are some types of transactions that are just inherently more vulnerable to being
reordered than others.
For example, a uniswap trade, highly sensitive to reordering, but a Cryptokitty transfer
is relatively low sensitivity to reordering.
And so these two different transactions and the users that send these transactions care about very different properties, right?
Perhaps the Uniswop trader cares about fastest possible execution and for their execution to sort of be private and for no one to manipulate them.
Whereas maybe the CryptoKitty transfer care mostly about censorship resistance and making sure that their transaction is propagated through the network and they know for sure that it's going to be mine.
and there's no sort of intermediary that can interfere with that.
I think what we're going to see is different types of transactions will be routed
through different networks to be able to reach the miners who ultimately include them on the chain.
So these more inclusion transaction, I call them, the CryptoKitty transactions,
are likely to continue using the typical transaction pool and it will meet the requirements much better.
under EIP 1559, they'll probably also get a better U.S. from more stable base fee payments.
And it's unlikely that they would have to pay a significant amount of tip to be included.
Whereas there's these other transactions, the Uniswap trades or the arbitrage transactions,
that I refer to as priority transactions.
These transactions are much more sensitive and likely that the user sending them is willing to pay a lot
more for them to be included where they want in the in the in the in the in the in the box space so um by
pushing these uh out out of the transaction pool there's sort of a number of different uh advantages
that it causes for everyone else in the network one of them is that it removes a lot of the
variance in transaction fees that we've been seeing lately and it makes inclusion transactions
generally more predictable and how much they will cost and the second one is that it provides a
a channel for competition of inclusion to like really tailor itself to the properties that those
users provide on or care about.
Like do those users who are sending arbitrage transaction, do they care about censorship
resistance or do they care about minimal latency?
And if there's a tradeoff and design in the communication channel between them and minors,
which one will they prefer?
I think this is where having a variety of different solutions that are able to provide different features to various different transaction centers becomes particularly interesting.
I think one of the other interesting things that we learned about the MEP in the last couple months is this whole dark forest thing and this idea of generalized frontrunners.
Do you like tell us a little bit about what these are and like, you know, Phil you mentioned you had some really fun stories about that.
I'd love to hear, like, what are, you know, some of these wacky situations that we see on chain.
Yeah, I would love to describe it.
So by journey kind of started, I think it was like 2018 or something like that when I published the Etherdelta blog post with a bunch of co-authors.
I think if you Google EtherDelta in my name, you'll probably find that piece of, you know, archaeological M-EV history.
But basically, we'd been running trading bots for some time at that point to kind of validate,
for ourselves, are these real economic flaws in the protocols, how much power is there in
transaction ordering, and can it really be profitable for miners, and can it really be
profitable for bots through the mempool who aren't directly colluding with minors? So those are
kind of the questions that that blog post set out to answer through very practical experiments of
actually running these bots and measuring our own success rate. And pretty early on, we noticed
that there was a pattern of bot that was using all sorts of different tricks to kind of profit.
So there are two kinds of bots that we noticed very early on. One of them was a bot that had a
strategy or an intent that was kind of to extract value in some way. And another was a kind of
copycat bot, which would do a more generalized strategy. That was the kind of name that started
being introduced for them in blog posts when people started seeing this on chain. So early on,
these generalized strategies were very simple. It would be something like every transaction that comes
in on the mempool, I'm going to run the same transaction with the same data payload and the same
contracts and the same everything, but I'm just going to replace the sender with myself.
And if I have more ETH at the end of the transaction than at the beginning, then I'm going
to calculate how much profit I made, let's say $50.
And I'm going to fire off this minor auction with like a $50 profit parameter.
So I'll bid in a certain way, depending on like how much profit I get and everything like that.
So that was kind of the first iteration of bots.
And there were all sorts of sophisticated techniques.
Even in 2018, we started observing with these bots going back and forth with each other
and back and forth with bots that were specifically designed to do certain things.
A big place people noticed this early was CryptoKitties birthing, because CryptoKitties' birthing is
very easy to kind of just swap yourself into and make the same amount of money.
So those kind of early transactions were pretty much always being taken by these copycat bots.
Then people started kind of building protections in to protect against these bots, things like,
for example, when Geth simulates transactions that aren't in a block yet,
to see whether they're profitable like these frontrunners would do,
it might use a simulated value for block hash, or it might use a simulated value for the timestamp,
rather than using the real value. And if you condition your transaction flow based on this,
you can trick these bots into making the wrong transactions that lose them money or into
missing transactions that could potentially make them money. And this kind of war back and forth
started escalating really, really drastically, like with EtherDeltha, with zero X with all these
early Dex protocols. The experience I kind of had with it was I can't really disclose much
specifics because they are, you know, kind of a company in the space. But at some point, I was called
in to help deal with an exploit. And this was like about, you know, six months to a year before the
Ethereum is a dark forest article came out. I'd been kind of dealing with these strong runners for a while
and running bots and like had some experience in like on chain kind of stuff. And so I had a company
I was advising call me and say, look, we found a bug in something that we've exposed. And like,
there's kind of this amount of money at stake, let's say a straw man, $5 million at stake.
And what do we do, right?
And so that's when we started really getting to the hairiness of permissionless systems.
There was an open question of like, do we tell people?
Well, if we tell people, we don't know who's people this money is.
It's just random addresses, right?
If the hacker sees this exploit before the people whose money it is, the hacker is going
to steal their money and we've contributed to that.
Does that open legal liabilities on our front for like exploiting people?
money that are using the network. Should we instead try to recover it ourselves now that we found
this as like the most economically advantageous solution? What about the risk that some bought on the
M-Pool or anyone on Ethereum will see these transactions, especially if they fail and especially if we
fuck them up and do something wrong? We'll see these exploit attempts because this is a public space
and try to front run. And then all the user's money will be lost also that way. So we spent like
two days kind of coding an exploit, which was the eventual decision we went with, and adding all sorts
of different protections that I could think of for front running bots, things like doing weird,
like modular arithmetic on like the block hash exponentated and like, you know, just as much as I
could think about to use as many inputs as possible. And with the idea of tricking their static analysis,
using different contracts, different call frames that called each other, all things kind of Dan
described in his article. We tried to do. And then we crossed our fingers and we did all the test
at transactions and they all worked and we fired these transactions off to Mainnet with 10 million
bucks in the Mempool and a very high gas price to try to not get mined, not get front run. And there were
four different vulnerable contracts that all had the same code but had different kind of crypto pairs,
four or five. I don't remember something like that. And wait a few seconds, the block is mined,
kind of suspense in everyone's stomach in the war room, open the block. And of the five transactions
we did, four of them have the red exclamation point next to them on Ether Scan, which if you
run arb bots, you know, that means you fucked up or someone else beat you. It's like the last thing
you want to see. So I was like, oh, crap, we've just lost, you know, millions of dollars of other
people's money. Ended up not being the case. So the art bots got really unlucky. They had a
bug in their own code. It's purely due to a bug. They were not able to front run the bulk of the value.
And actually, of our five different transactions, they had slightly different interactions with the network.
So some of them ended up going through, some of them not. Basically, all the money ended up being
recovered in like a very lossy, stressful process. But what really blew me away at that time,
and it's something I actually wrote a blog post on and never really published it. But the sophistication
really is impressive. And in that time period, which was about 2018 to 2019, from when I first started
dealing with these bots to when this story happened, like the level of analysis and the level of
tooling that was brought was so obviously so much higher that it really speaks to how powerful these
incentives are and how robust this ecosystem is. So yeah, I think that's a cool story. And
you know, that's happening on flashbots every day. So I'm very excited about that.
I had, I posed a philosophical question on Twitter, like I think maybe a week or two ago,
where like, if you're running a generalized frontrunner and you accidentally frontrun a hack,
are you like, is it ethical to keep the money? And the overwhelming answer was like, no,
you're supposed to return it. But then, you know, what if you take it a step further?
What if you automate the spending of the money as well?
Like, what if, you know, you donated it to Gipcoin?
And, like, people are like, oh, okay, well, you know, then the Gitcoin people should give it back.
And I'm like, okay, fine.
What if I thought that MEV is like, you know, I'm trying to return the value back to Ethereum?
It's something that came from Ethereum.
I'm trying to give it back to Ether holder.
So I take all it, convert to ETH, and burn the ETH.
And I do this in an automated way.
So that, and now there's like no way for any.
And what if I did this to a hack by accident?
is this like ethical?
And I guess what I'm trying to get at is like, is the notion of like inherently automating what you do with money somewhat unethical?
Ooh, that's a question for Vlad.
So I'd love to hear Stefan's ethical perspective on this because I've been talking a lot.
I will just make a practical point, which is that these are all questions that I've like struggled with since we started this and research in the space.
And that, you know, in 2018, we were trying to get answers inside Cornell from like researchers of like,
even us running an R-Bot and measuring how profitable it is, that is active intervention.
That's kind of changing user outcomes in the name of an experiment.
What should we do with the money?
Should we fund research?
Should we give it back to the users who are front-run?
Should we burn it?
What if we're not profitable?
These are all kind of very heavy moral questions that the computer science research and engineering
process is very ill-equipped to handle across the board, in academia, in industry everywhere.
And like, that's something I really want to build in FlashBots is an organization that's able to robustly tackle in the long term those hard questions.
Super interesting in hard questions. I have a, I have an easy technical question, I guess. So we've, we've concentrated on layer one so far. So what happens to MEV on layer two? This is different than layer one MEV? Or is it pretty much the same only in green?
Yeah, so for layer twos, I would sort of classify layer twos as a very still undefined design space.
There's a variety of different approaches to transaction ordering in those frameworks.
But broadly speaking, perhaps I can give my intuition of how to think about the problem.
So MEV exists whenever there's some kind of ordering.
And for as long as there's a specific party that has the,
the ability to decide the order arbitrarily without any bounds.
And the entity is a profit-motivated entity.
And what they're looking for is to generate the most amount of value.
And so they're rationally incentivized.
They will have some kind of desire to be maximally extractive so long as it doesn't
compromise the system and the guarantees that they provide in their system.
So there's sort of a bounded rationality, which is going to be how much embalmary.
can I extract without losing all my users?
That's sort of, I think, the game that a lot of these layer twos are alternative
Ethereum infrastructures are going to be asking.
And so it will be really interesting to see how they tackle this question and engage with
answering what is okay to extract and what is not okay to extract for them.
And if there's some competition around like providing these various different guarantees
that emerges.
Interestingly enough, it's actually much easier to.
to limit the MEV extraction in a permissioned protocol than in a permission less protocol.
And so if any of these layer two systems rely on some sort of decentralized approach to sequencing,
where there's multiple different entities that are able to perform these orders,
usually that also relies on these entities being profit maximizing,
and there's some kind of crypto economic incentive for them to play that role.
these parties can also be expected to want to extract as much as they possibly can.
And so there will be sort of a similar dynamic to what we've been seeing in sort of
permissionless proof of work mining that we expect to emerge.
Yeah, I mean, I have a lot of thoughts on this as well because, you know, I've been working
on a lot of similar things.
I mean, I personally think that at L2, I think just because of the amount of flexibility,
I really like Flashwatch as like a solution at layer one because I think like the
at least Ethereum is like very slow moving to upgrade its protocol and like they've made certain
design choices that I think like block off the ability to do a lot of like MEP reduction.
But I think at layer two, you just have so much more flexibility on your design and like, you know,
just the fact that you can use like finality favoring protocols like tenderband and you can, you know,
you can use like fixed validator sets rather than like, you know, a, you know, proof of work.
And even an ETH 2.0 wants this like, you know, more lightness-favoring protocol.
Like I think that actually limits you from a lot of things.
So I think the M-V story on Ler2 is actually going to play out quite differently than on base chain Ethereum.
But we'll see how that goes.
I'm really excited to see how these systems develop.
I think we've seen definitely a significant amount of interest in MEP, both.
on ETH-2, proof-of-stake systems and layer two systems.
The sort of narrative that I think I'm really excited to see if it becomes more prominent
is for miners or validators, sequencers, to subsidize essentially all the fees for their
users depending on the amount of MEV that they expose.
So you could see a framework where you have a pure MEV chain that is completely free to use.
and users only pay through exposing some MEVU with their interactions.
That would be a really interesting chain, I think, to have some experiments around.
I would agree with that.
And I'm also interested in, like, the practical comparisons of the different L2 design spaces.
Like Arbitram is trying to use a fair sequencing protocol.
They're trying to make trust assumptions and see if those trust assumptions can lead to more efficiency for users
and if to design tradeoffs are worth it.
Optimism is trying to optimize for MEV extraction
and work with approaches like flashbots
and kind of engender similar bot ecosystems in their layer twos.
So I think in many ways, layer twos are like microcosms
of the layer one design space.
These are also all things layer ones can and probably will experiment with.
I get tagged on Twitter, you know, at least three times a week
of someone who's like, here's my L1 protocol, it solves MEV,
literally since 2018, at least three times a week.
So if you've sent me such a message,
and I didn't reply, I apologize.
It's not because I don't love you.
It's just because, like, it's very hard to evaluate all these designs,
and they all have very complex tradeoffs.
The only way to see what will happen is when the rubber meets the road.
So I think L2 is like a perfect sandbox for that to start happening,
and I'm very excited to see how those interactions play out.
On At the Center a couple of weeks ago, we had Joey Zackerel from Keeperdao,
which is a project that kind of allows a group of people,
or the Keeper Dow to kind of counteract MEP.
Last night I saw the Archer Dow project for the first time.
So basically kind of projects that have grouped around this MEV area
in kind of trying to counter it in some way or other.
What are your thoughts on these?
Yeah, so I can give my perspective here.
I think it's really interesting to see these,
what I would call application level mitigations to MEV.
And I think like this is the only.
only the start of the exploration of the various different design patterns that we can do by essentially
sandboxing who is able to extract the value from ordering of transactions and redirecting that
in various different ways and creating various different financial products using these cash flows.
Basically, the way that I see MEV mitigation is there's three potential layers.
There's the application layer, which is where these sort of smart contract based designs are
playing. There's the transaction pool layer, which is where FlashBots is playing. And then there's
the consensus layer, which is where a lot of the layer twos and alternative blockchains are playing
in trying to insert some kind of mitigations and alternative approaches to MEP. I expect the
application layer to be where we see a lot of blossoming and experimentation and all kinds of
different approaches to creating sandboxes for these cash flows.
Though I don't expect these to be able to capture all of the MEV that is available on a chain.
There's just going to be some dynamics where there's some interaction,
and the interaction space is too large to be able to sandbox everything.
And so ultimately there will always be some value that flows back to the ultimate sequencers,
which are the miners on ETH one.
Cool, that's a very comprehensive answer.
So as for your own business model, so I know you guys collected VC money and you're collecting another round right now.
So what's the FlashBots long-term business model?
Because so far, as you said in the beginning, you don't have a token.
You're not extracting value yourself.
So what's the game plan?
Yeah, we're like the least interesting VC back company because we don't have a token.
we don't have a business model and we essentially made zero promises that we will have one anytime soon.
And I think that's actually critical for us because what we see ourselves as building is a long-term
focused research organization that's tasked with trying to answer and solve some of the hardest
research questions that the space is faced with. And taking such a long-term approach
requires all of our stakeholders to be sort of aligned. So our initial capital,
partner, right, paradigm.
They sort of, we selected them because they both have a proven track record of alignment with the ecosystem.
They have a very long-term focus.
And they have a very research-oriented team and thesis.
So that's essentially how we go about selecting capital partners and bringing them on board to our mission.
There's, I think, a really interesting approach to thinking about,
company building, which is it's actually a sort of a coordination technology, and it can be
used for many different objectives. If the core objectives of that organization is to produce
some kind of social good, there's nothing that says it can't produce that, as well as generate
some kind of value for the contributors and early backers of that company. And I think that's
very much so a direction that we're hoping to go with the organization.
So both generate a lot of good research, build some really useful products, and create the opportunity for a broad ecosystem of stakeholders to participate in the value we create.
So what's the plan for Flashpot for the next year or so?
We'll just keep building.
Yeah, I think, you know, we started the year with zero hash rate and now we're in a very different place.
And I think as the adoption and ecosystem of MEV continues to evolve, our sort of roles and responsibilities and the stakes that are at play continue to increase, we are extremely focused on building things that aren't reactive, but instead take into consideration what we expect the incentives to play out in five to ten years.
And that continues to be sort of the approach that we take in solving these problems.
we think what is the specific actions, what are the specific products and what are the questions that we need to answer today to be able to make sure that we achieve the objectives that we have in the long run.
So, you know, more practically speaking, what are we focused on right now?
So some of the questions that we mentioned around SGX, around privacy and spam protection are some immediate sort of concerns that,
And we really want to engage with the community and get a whole group of people to help us answer.
The way that we sort of think about our approach to solving these problems is to create the most interesting group for anyone to be working with in the space.
We sort of see flashbots as being a talent black hole, where if your interest in solving large problems that have a large impact and have some level,
a skin in the game and being able to solve them will be sort of the no-brainer organization.
And so really our focus is continuing to build an organization that's be able to attract
these kinds of individuals.
Yeah, completely echo everything, Stefan said.
I think we're entering kind of a political minefield and it's only going to accelerate
as cryptocurrencies increase in value and intensify and become increasingly important to
geopolitics and ordinary users and all these kinds of different scenes we have. I think a lot of
these stories will play out in the MEV world. And having an organization that's really focused
long term on the ecosystem is super critical. And yes, we are VC-backed. We've been very clear
that we don't know what our business model is, as Stefan said. We invite anyone who's listening to this
who wants to help us figure it out to come in our Discord. We're operating as kind of a hacker collective
in principles and organization and in how we plug people into our mission.
Our focus right now is kind of solely on solving this incentive alignment problem that we've
identified. And our broader agenda is to kind of advance the fairness, efficiency,
and feasibility of cryptocurrency mass adoption. From that front, I think all of our venture
capital partners are extremely aligned. We would only consider partners where there was no
strong expectation or pressure to profit, especially not through certain mechanisms.
mechanisms. Tokens is a very popular one. If anyone's raised VC in crypto, you know every VC wants
a token because it's an easy liquid exit and blah, blah, blah. We resist that pressure because we
don't know if a token is the best design. In fact, we think we've gotten so far as a critically
neutral organization to 80% hash power in just a matter of months because we don't have a token
and because the incentives of our token are not counter to those of ETH and because of our reputations
as kind of being aligned with ETH. So I think any partners we choose kind of are going to share
that position. I think there's a lot of venture capital in the space that has money because of the
bull market, and that is aligned with cryptocurrency. That believes in cryptocurrency, and that's
invested in cryptocurrency hundreds of times over what they're invested in flashbots. And I think the
problems we're solving are so critical for the space and touch every single investment and every
single project in the space to such an extent that any investor we have should understand that
the upside on their other projects is much more than like having a specific business model in flashbots.
So that's kind of how we're thinking about it and what we're building and how we see the next case of really laying the groundwork for this long-term, unstoppable organization.
Cool. I look forward to see where it's going, Phil and Stefan. Thank you so much for joining us.
If people want to join the FlashBats team or find out more about you, where should they go check?
Unfortunately, we still don't have a website. So that's not something that we're good at is building websites, but we are good at writing Ethereum code.
So if you go check out on GitHub, you'll find all the information that we have about our organization.
It's GitHub.com slash flashbot slash PM for product management.
And it'll have all the resources you need to learn about MEV, learn about the organization,
and start engaging in the conversation.
Perfect. Thank you both.
Yeah, thank you for the conversation. I appreciate it.
Thanks so much for having us.
Thank you for joining us on this week's episode.
We release new episodes every week.
You can find and subscribe to the show on iTunes, Spotify, YouTube, SoundCloud, or wherever you listen to podcasts.
And if you have a Google Home or Alexa device, you can tell it to listen to the latest episode of the Epicenter podcast.
Go to epicenter.tv slash subscribe for a full list of places where you can watch and listen.
And while you're there, be sure to sign up for the newsletter, so you get new episodes in your inbox as they're released.
If you want to interact with us,
guests or other podcast listeners,
you can follow us on Twitter.
And please leave us a review on iTunes.
It helps people find the show,
and we're always happy to read them.
So thanks so much,
and we look forward to being back next week.
