#29: Interview with a Searcher – with MEV Senpai and Hasu + transcript

Author

For our latest episode, I sat down with MEV Senpai, one of the top searchers in Ethereum. He gave us the unique inside perspective of someone who finds and captures MEV himself. The result was a long & intense convo, one of the best I’ve had in a while.

We discussed:

  • The structure and actors of the MEV game
  • What is searching, how can you learn it, what edges exist
  • Intro to private relays and transaction bundles
  • The role of Flashbots in DEX trading
  • and, of course, the hot topic of the day: short-term reorgs in Ethereum

Enjoy!

Subscribe to the Podcast 

Summary threads

Transcript

Hasu 0:03
Welcome to Uncommon Core where we explore the big ideas in crypto from first principles. This show is hosted by Su Zhu, the CEO and Chief Investment Officer of 3 Arrows Capital and me, Hasu, a crypto researcher and writer.

Today, I welcome MEV Intern from Twitter, who actually graduated recently to MEV Senpai – so that’s an inside joke. In this episode, we discuss the structure of the MEV game and what actors exist inside it. What is searching? We will get the inside perspective from someone who identifies and captures MEV himself, which is brilliant, in my opinion. And of course, we will also be touching on the hot topic of the day, which is short term reorgs in Ethereum. So without further ado, welcome MEV Senpai.

MEV Senpai 0:59
Thank you so much, Hasu. I’m really excited to be here and talk about MEV searching and all the related topics today.

Hasu 1:05
Perfect. Me too. So let’s start off with something, general to you know, help out our more general audience. So, can you describe for us what actors exist in the MEV game today? And what is the role of you, the searcher in all of that?

MEV Senpai 1:25
So I think that the actors that exist in the MEV game can be broken down into miners, searchers, users, dapps, and then maybe protocol developers. Miners are the block producers of Ethereum today. And note that in other systems, other parties like validators in Eth 2.0, produce blocks. They are the party that actually sequence transactions. And we can talk about what that means for their role within the MEV game. Users are the end users of Ethereum, they are people who are doing things like taking out loans based off of their collateral and systems like Aave or Compound, or they’re trading on decentralized exchanges. And the actions that they make inevitably emit some amount of value that can be captured. By placing transactions before or after, or otherwise doing things with them. Dapps create some of these MEV games by their design, the way that they work and the incentives that they try to create for their users and for searchers. And then we have searchers, and protocol developers, I think protocol developers are an interesting one, because they create sort of the base rules of these games, they create the structure and the abilities for parties like block producers to take certain actions, which is kind of interesting, we can talk about the different designs that there are four protocols if you’d like. And lastly, there are searchers who are parties that express transaction ordering preferences in order to capture some value. So for example, if I see that the price of an asset is low on Uniswap, and high on Sushiswap, I’ll buy the asset at the low price on Uniswap and sell it at a high price on Sushiswap. And I’ll express this preference to a miner using these new MEV extraction systems like Flashbots in order to capture the arbitrage profits from that, which is MEV.

Hasu 3:40
Okay, so we know that, you know, the DeFi activities have you know, dapps and users create these potential arbitrage or profit opportunities, but how do you go about, you know, searching for them, and then getting them included in a block?

MEV Senpai 3:56
I think the first step is looking for opportunities where value could be captured from transaction ordering on chain. So examining new types of decentralized exchanges or new DeFi protocols, and seeing whether there are some incentives that are created. Decentralized exchanges work, because there’s an incentive to bring prices in line with other markets, like other decentralized exchanges or centralized exchanges, which mean that if I can place a transaction in the right place, then I can make some profit. So first, I need to have an idea of where I can capture some value. The second, I need to set up some monitoring infrastructure to pull the data that I need out of the chain. So you know, running on this decentralized exchange example, I need to know the prices of assets across a bunch of different decentralized exchanges. And I need to, based off of the logic of those dapps which is different from different decentralized exchanges. Be able to understand what is the optimal trade that I can make to capture the most amount of value? After I have my monitoring, I’ve parsed that through some logic, and I have identified a trade, then I can put that in what is called a bundle, and send it on to, to miners through networks like Flashbots, where I participate in an auction to have my transaction capturing some value included on chain. And I think that’s a view of the whole process. And is there anything in there you want to dig into?

Hasu 5:35
No, that pretty much like summarizes it well for me. So, for anyone who has listened to our first episode in MEV, I think it was called gas wars, like some 20 episodes ago a very early one. There we were still talking about PGAs is priority gas auctions that were happening in the mempool. So is a searcher basically the same as someone who would play these games before in the public mempool?

MEV Senpai 5:59
I think so, I think searcher is just this general term for people who find MEV on chain and they capture it in different ways. I specifically use Flashbots, or other types of relays like Flashbots, in order to capture MEV. And so I’m not playing the PGA game, which is a very specific one. And in particular, the skills that the PGA game requires are very different than the skills that participating in Flashbots requires. But I think the searcher is the broad umbrella term and then there’s sort of subsets within that.

Hasu 6:36
Can you say something about the motivation to create Flashbots and try to move the PGA game, you know, away from the public mempool to a private one?

MEV Senpai 6:51
I think that PGA bots have a lot of negative externalities that are incurred on users. So working off this decentralized exchange example, if there’s an arbitrage opportunity on chain that is large, let’s just say $100,000. There are gonna be a lot of people who have seen that, and they’re going to be a lot of people competing for it. But only one bot at the end of the day can capture that opportunity, you may have dozens of bots that are sending transactions and trying to capture that opportunity, but only one of them gets it. And every other bot will land on chain, and have a failure or cancellation or their smart contract logic will just check if the opportunity exists, and it’ll cancel if not. And all these failures, these cancellations take up valuable block space, which ends up pushing up gas prices for everyone else, because there’s a limited amount of block space. And these negative externalities are incurred by everyone on the network. But the positive benefits of MEV are just captured by the small group of people who are able to participate in winning these auctions. And moreover, the kind of things that you needed to be good at to participate in a PGA battle are things like having the best and lowest latency view of the mempool as opposed to writing the most gas efficient contracts. And Flashbots was created to move the kind of dimensions of competition from these PGA battles, having the best view of the mempool to things like gas efficiency, as well as reducing all the negative externalities, like the failures, cancellations, and these checks that don’t really provide anything. And so in the Flashbots system, only the winner of the auction, only the bot that is actually going to land on chain and capture that arbitrage opportunity lands, and all the cancellations and failures stay off chain. So there’s all of a sudden, all this extra gas – all this extra block space that other people can now use and in aggregate we should see lower gas prices because of that. And the last thing that I would note is while PGA bots were kind of the dominant form, in the late part of last year, there were these sort of private connections happening with miners, and increasingly, MEV extraction was becoming something that was permissioned and opaque. And it definitely could have gone down that road where people like me wouldn’t have been able to participate in MEV extraction because it just would have been an individual bot that had a connection with a miner or maybe like a quant firm or someone on Wall Street that was eating up all the MEV and no one else had the opportunity to because they had a proprietary deal with a miner in a closed system. And so Flashbots is extremely useful because it has made something like MEV extraction open and permissionless and not devolve into this closed system and I think there were signs that were happening. So to sum that up, I think Flashbots turned the competition from, like having a view of the mempool to, instead operating on gas efficiency, because that’s how you land on-chain in Flashbots and turned MEV from something that could have been closed and permission to open and permissionless for people like me.

Hasu 10:22
Right. And maybe to even to even expand on that a little bit. When MEV is closed and permissioned, then it means that the miners who are better at extracting it what basically crowd out the miners who are not right? It would it would change, it would basically change the Sybil resistance mechanism of the game to elect the next leader in the consensus mechanism from something like proof-of-work to something like proof-of-MEV-extraction. I mean, this can be this can be okay, right? But it’s not the intended design of Ethereum. And so you could say that something like Flashbots returns, or protects, you know, basically the proof of work consensus mechanism itself.

MEV Senpai 11:10
I agree and I think that’s an important point that is lost in our conversations about Flashbots and MEV extraction, it was not a foregone conclusion that a network like this existed and like, people like you, and I – I don’t if you search, but you certainly could – can participate in these things. I think that’s pretty amazing. And the alternative would be a much more centralized network that I don’t think we really understand the full consequences of proof-of-MEV-extraction. But I don’t think it would be aligned with cryptocurrency.

Hasu 11:42
So how did you get to searching? So I’m mostly curious, you talked a bit about your process, how do you identify MEV opportunities. But I’m curious to learn a bit more about that, so what you know, knowledge or skills make this possible for you? Maybe can you walk us through like one particular way of you know, using them, like all the way from, you know, having a particular skill set to landing a transaction on chain or a bundle on-chain and getting paid for it?

MEV Senpai 12:13
So I think the first place to begin is you need a knowledge of DeFi. And Ethereum broadly how it works, how to get information off of it, how to send transactions and sort of the structure of transactions as well. You need to be fairly technical, I think, to do some things, it’s actually not necessary to understand something like the EVM in a deep way, but you do need some base technical knowledge. And, yeah, I think the skills are monitoring. I think you need some sort of execution, maybe even some knowledge of algorithms, and then the ability to send transactions. I like the very concrete technical skills. Let me redo that answer.

Hasu 13:12
The whole one? Okay.

MEV Senpai 13:13
Yeah. So I think the skills you need at the very base are a knowledge of Ethereum and DeFi. And then I think you need to be able to pull data off of the Ethereum chain, you need to be able to parse it in some sort of system according to the logic of your strategy. And you need to be able to send transactions. There are a lot of popular libraries that can help all of these things. So you probably need to know specifically Node.js, Python, Rust or Go, in addition to that knowledge of Ethereum, so I think you need to be fairly technical, but it’s definitely not an extreme level of technical granularity. As for how I personally got into searching, I am a tinkerer at heart, somebody that is super curious and loves learning and as the name MEV Intern would suggest. And last year, I was tinkering with DeFi as it was coming out writing my own smart contracts and playing with it, and I began to realize the kind of opportunities to capture value in these systems. And so I just as a natural consequence of me playing with these things, either locally or on the mainnet, I started to build arbitrage bots. And like that then became a game that I wanted to understand and play out as well. And like a year later, here we are now.

Hasu 14:45
I have to ask this but since you changed your name to MEV Senpai from the MEV Intern, doesn’t mean you have a student now?

MEV Senpai 14:52
I think that was in part an inside joke on Twitter where I was posting a lot of content that was interesting, and revealed pretty specialized knowledge of MEV. And people keep on messaging me that I had graduated, I wasn’t an intern that I was the senpai and the master now.

Hasu 15:08
Can confirm.

MEV Senpai 15:09
You’re right. I’ve had people reach out and ask to be students or interns. I haven’t taken on one yet. But I may take on my own MEV Intern.

Hasu 15:19
Interesting. Interesting. Yeah, so the student becomes the master and takes on their own student, you know, the circle of life continues, yeah. So…

MEV Senpai 15:31
Maybe it’ll be you, Hasu. Do you want to be my MEV Intern?

Hasu 15:35
It’s very tempting, not gonna lie. I may not be technical enough – that could be a hindrance. But other than that, it’s… So, moving on in the text here. So um, we’ve talked about, you know, how you identify MEV opportunities, and you touched on some different ways that MEV can be created, for example, in decentralized exchanges, what categories of MEV exist in general, if you had to classify them into broad categories?

MEV Senpai 16:08
I think broadly, there are three big categories of MEV, I almost feel like these are more strategies rather than categories of MEV. But if I had to give three categories, I’d say: arbitrage, liquidations and sandwiches are the big three, that’s where the majority of MEV that you see going through Flashbots and on-chain comes from. And then there is an extremely long, long tail of other MEV strategies that don’t really fit very well into those three categories and, like I think are oftentimes very specific to a protocol or they kind of resist naming in any broad categorization.

Hasu 16:53
And which of the four are you specialized in?

MEV Senpai 16:57
I specialize in arbitrage; so I do a bunch of back running, as well as top of the block. That’s some jargon people won’t know. I specialize in arbitrage, as well as the longtail I do a bunch of weird kind of MEV.

Hasu 17:17
I’ve talked to a couple of searchers you know, off the cuff, and none of them have admitted to being specialized in sandwiches. So is that some kind of you know, you’d rather not talk about it because that it feels more extractive than the other tools, which like, purely feel beneficial to the user? But you know, are they just not that public facing?

MEV Senpai 17:39
Ah, I think some of them if you look, are public facing – like I know, some searchers on Twitter who have just sandwich icon or sandwich emojis in their location, for example. And like, people will talk about it in the Flashbots Discord, but it’s definitely negative-sum like, I don’t even think it’s zero sum, it’s extractive and negative-sum. Some people look on it pretty poorly. I think people want sandwiching to go away and so it’s not really a high status thing to say that you do. And I’m happy to talk about it. I wrote a sandwich bot – I don’t run it but I wrote it just to understand how they work and maybe look for opportunities of MEV that are created by sandwich bots themselves. But I made the conscious decision that I wanted to do things that I felt like were positive sum and value creating. So I don’t run a sandwich bot or anything like that.

Hasu 18:28
It makes sense, yeah. I mean one could argue that even sandwich attacks, at least in the bundle market, are value creating, because they protect like the decentralization of Ethereum and the properties of proof of work, but I get it, yeah. So um, how efficient is this the bundle market across these different categories, how many searchers compete in them, and you know, make, like non-zero amounts of money?

MEV Senpai 18:59
Less than you might expect, I think. So there are many people who try to be searchers and who may land a bundle every once in a while. But I think that it has become very quickly an extremely competitive game within those three big categories, arbitrage, liquidations and sandwiches, and it’s very top heavy as well. So I’d say that there are probably 10 teams that take something like 80 to 90% of the MEV within those categories, at least on Flashbots. And I think it is pretty efficient as well, if you look, the average amount of gas that’s used to capture an arbitrage opportunity or a sandwich is going down over time, which implies that the structure of the market that Flashbots is seeking to create is working and these MEV extraction opportunities are becoming – or rather, MEV extraction overall is becoming more efficient.

Hasu 20:02
Okay, that’s one way to sort of define efficiency. What is the on-chain footprint of MEV the extraction, and I think that’s very important one. But another one would be, you know, how much of the MEV created goes to miners vs searches? And, you know, one reason I’m asking this is because in the Flashbots Discord we have seen some searchers publicly pressure other searchers not to bid more than, you know, say 70% of the opportunity, even though in a competitive market, you know, they would bid themselves up to like, whatever, 90 – 95%. So, what do you think about that? How common is this cartelization between searchers who you know, enter a cartel and basically, say we wont bid any higher, and so, you know, take away the MEV from the miner?

MEV Senpai 20:56
It’s a complicated topic. So speaking, as a searcher as someone that actually participates in the arbitrage market, I spend a lot of time and put a lot of effort into these systems. And it sucks seeing that, like, all this work that I’ve gone and done, ends up getting paid to big miners, and like, there’s this emotional reaction, you’re like, well, I did all this work, I found this arbitrage I created this complex system. Why is Ethermine or SparkPool getting all this? But you know, intuitively, I realized that the rules of the game are such that miners are in the privileged position to extract this value themselves if they would like, and, you know, those, those are the rules of the game that we are playing. And I think, most MEV in those big three categories are like what I just described, where 80 to 90% of profits, sometimes even 95% plus are paid to miners. The places where cartelization happens are more towards the frontier. So newer types of strategies where less people are participating in and where it’s easier to coordinate those groups. So in particular, a lot of cartelization started around Uniswap v3. It’s pretty easy to get data from Uniswap v2 or its forks, reason about it, arbitrage it. But v3 has a much higher barrier to entry, it’s just more difficult to reason about as well as deal with that data. And so for a while, there was only like one or two bots on v3, and they found each other on the Discord. And so you could coordinate bids and not bid up to like 100% on them. Now, there’s a little bit more, but it’s still low enough on those particular sets of strategies whereby everybody can actually find each other in the public discord and coordinate their bids. And in the long term, I don’t think that this is something sustainable, and I’m almost leaning towards, we need to condemn this. And I’m a searcher, too, because I think it could lead to miners becoming more aggressive and extracting some of this MEV on their own permissioned and closed systems. And it could lead to divergences in the amount of MEV that the miner is able to get per average block. So in particular, there are miners that have searchers, they’re pretty public about it, you can find their addresses, and they participate in some of these strategies where profits are cartelized by searchers. If you’re a miner and you are arbitraging Uniswap v3, you will make 100% of MEV for that block. But your other miners who don’t have searchers that are playing on Uniswap v – who don’t have searchers that are arbitraging Uniswap v3 are going to get whatever the cartel is playing. And so there’s inherently going to be this delta between miners with searchers and miners who don’t have searchers. Lastly, I think it might just piss the miners off and maybe get them to do something more aggressive.

Hasu 24:09
So hasn’t Flashbots done anything to curtail cartelization? I mean, it’s happening like in broad daylight inside their own Discord server.

MEV Senpai 24:20
I don’t think so. I don’t think they’ve ever commented on this, either in the Discord or in any other forums. So they’re pretty hands off in their Discord. I don’t think I’ve ever actually seen any moderation.

Hasu 24:33
Okay. So how – I now I have some questions prepared, how specialized are the searchers and kind of, you know, trying to go so where do the edges come from, how sustainable they are? Now, one thing that you already mentioned is the use of gas tokens. So could you give us you know, quick rundown of what a gas token is and why searchers use it?

MEV Senpai 24:56
Yeah, so I think that searchers are pretty specialized, and in particular, because of the structure of the market, where searchers are competing, not on having the best view of the mempool. But instead on having the most gas efficient MEV extraction, you need to get pretty in-depth in each of these three big categories, liquidations, arbitrage and sandwiches and understand them very well and be able to really make your MEV extraction as gas efficient as possible. So this is one dimension, one piece of edge that you could have. And like you mentioned, sort of table stakes within this are gas tokens, which are these tokens that you can mint when gas prices are low, and then redeem when gas prices are high in order to push down your total gas use. And to give your listeners a little bit more insight into that. On a Ethereum, there’s a mechanism whereby if you, if you destroy or delete some on chain data, you get a refund in terms of gas. So when gas prices are low, people will mint and create some data on chain. And then in their bundles, their MEV extraction, they will destroy this data that they’ve created when gas prices are low, in order to get the refund of extra gas, which actually acts as a subtraction to the total amount of gas, they used in performing any transaction. The net effect is that you can reduce your gas used and push up your gas price and be more competitive in the Flashbots gas auction. And there are a bunch of other things that people do. So it takes less gas, actually, if you have a bunch of zeros in your address. So people will create hundreds of thousands, millions of private keys just searching for an address that is 0x00000 like 16 times in a row. That’s marginally more gas efficient.

Hasu 27:17
Why is it more gas efficient?

MEV Senpai 27:19
The reason why is that it takes up less storage, as I understand it to store 00. Like that’s empty as opposed to 01 you need to actually stores some bytes on chain. I think that’s like the high level description. That makes sense?

Hasu 27:37
Yeah, fascinating. Yeah.

MEV Senpai 27:39
You can do all sorts of these games. Yeah, but one that increasingly we see is Solidity has a bunch of guardrails on it. And if you’re writing in Solidity, it then gets compiled in a lower level languages like assembly. But it uses these guardrails by default. And so if you know the EVM very well, you can just forego Solidity altogether and write straight into low level languages. You don’t have on any of the guardrails and the guardrails take up gas. And so searchers increasingly are writing in the lowest level language as possible, like assembly for the most gas efficiency. And just not very many people can do that. Right?

Hasu 28:23
Interesting. Is this something that you think will replace Solidity in general like, in the sense that it will be used even by dapp developers to make their contracts more gas efficient?

MEV Senpai 28:39
I would expect not in general by dapp developers, because it’s so difficult to read and reason about unless you have really specific knowledge. And there’s a much higher barrier to entry with reading assembly than reading Solidity. And if you think it’s important to be able to go and look at a contract on Etherscan and reason about it, check it, audit it, then I think the conclusion is that you can’t do all of these things in assembly. But I think it will be table stakes in this weird future financial system where MEV extraction is hyper efficient, and you have professionalized funds doing it, it’ll be table stakes, that you know how to write assembly and like get as close to the EVM as possible.

Hasu 29:30
So we mentioned gas tokens, you mentioned space efficient address format. We mentioned writing in assembly instead of Solidity without giving you too much away. Are there any other general edges that searchers can have that you can share?

MEV Senpai 29:49
Sure, like I said, there is a huge long tail of MEV extraction opportunities, all kinds of things that weren’t made with MEV in mind or DeFi protocols that may not on face value look as sexy because their TVLs are not as high on DeFi pulse or somewhere else like that, you know, you don’t see the million dollar liquidations on those all the time, and so people just don’t pay attention to them. And by finding these opportunity and capturing them, you may actually make more money than anyone is in competing in the big three. So I think strategy is a huge source of underexplored edge.

Hasu 30:26
And an example of that could be Liquity, right? The new Maker competitor that had some huge liquidations but virtually no searchers were set up to find them.

MEV Senpai 30:38
Precisely, yeah. And it was relatively new. And so searchers also didn’t have the opportunity to battle test their bots. But if you had spent a lot of time like creating test nets, testing your system, making sure that it worked, you could have made a ton of money back in May. But no searchers have. So there was a ton of MEV there that just no one was watching and in a position to capture. The strategy I think is super important. I think the other dimensions are latency matters a little bit. It’s definitely not as much in PGAs, but there are gains being made by being really fast. I think we’re increasingly going to see things like arbitrage bots that take risk, just sort of non intuitive from saying they’re arbitrage bots. But you know, intuitively, if you could close an arbitrage or say ETH to DAI to ETH in one transaction, it doesn’t seem like this is optimal, because you might be able to go from ETH to DAI and then 10 blocks later sell that DAI for even more ETH. But almost all searchers right now are not in the place to be able to take on that kind of risk. And so I think you have a big competitive edge if you can. And lastly, I think having a view of the mempool that’s better than your competitors could give you some kind of edge as well, because you could spot some transactions, include them in your bundles that other people might not.

Hasu 32:18
Okay, so the one about risk, let’s unpack that a bit, because I think it’s quite interesting. So Ethereum has something that the traditional financial system has in some places, but you know, mostly not, right; which is atomic transactions, and atomicity creates riskless arbitrage. But if you look in the regular financial system, you know, most arbitrage that’s performed, it’s not actually riskless at all. And that’s why it’s like fitting the ‘risk arbitrage’. And I would agree that, you know, there’s a huge amount of risk arbitrage as well, in DeFi, especially once we talk about, you know, arbitrage between DeFi and different off chain protocols like exchanges, for example. But also inside DeFi anything with regards to time, for example, right? A basis trade automatically is risk arbitrage, right? Stuff like that. So yeah, I feel like that, you know, just not being you know, not being willing to take these risks already leaves a huge amount of money on the table.

MEV Senpai 33:27
I agree. But as somebody that will probably get competed out of the game, when there are players that are able to take these risks, it kind of makes sense to me that why people are not able or willing to take these risks, like, I’m really good at tinkering with systems, pulling data out of them, you know, doing some logic to find where the opportunities are and executing on them. I’m not necessarily the best at managing a complex portfolio in a bunch of places and understanding my risk and like, being able to optimize my max drawdown and like when I’m selling what and where I think that game is much closer to traditional finance and it’s not something that I or other searches aren’t necessarily that great at. Which is a huge area for people who do know how to take risk to come in and like dominate the arbitrage space. And that’s also why I’m focused on the long tail as opposed to arbitrage because I don’t expect atomic arbitrage in the long term to be a sustainable searching strategy.

Hasu 34:34
So basically, you’re saying that there’s a huge incentive for trading firms to hire searchers. Same as, you already said, you know, that’s a big incentive for mining pools, for example to hire searchers.

MEV Senpai 34:50
Yeah, I think so. And I think that that’s already happening, like, I’m MEV Intern on Twitter, and I get people in my DMs, like the people that I talk to are also trying to get poached by trading firms as well. It’s an interesting Catch 22 because, like the best searchers right now are making so much money that they don’t want to join trading firms. And the people who do probably aren’t the best searchers. But increasingly, like I think that these trading firms will get into the game, and it’ll make more sense for top searchers to join those firms. Maybe… – I won’t speculate on a timeline.

Hasu 35:26
Okay. So, um, let’s talk about the sustainability of edges here for a moment, because especially like you said, okay, some stuff about like latency, that’s like, pretty proprietary, if you have a very strong connection and set up, then, you know, that’s an advantage that probably you can retain for a while. But once we talk about sort of stuff, like, okay, having, like a shorter address is better, using gas tokens correctly, is better, and just knowing what protocols to look at is better, but would you know, once you put such transactions on chain, other searchers are going to look at it, don’t they immediately copy what you did?

MEV Senpai 36:12
The interesting thing is that Flashbots has started with this goal of eliminating the dark forest. And I think they’ve been pretty successful with that, at least in the Big Three, because searchers, to your point, will watch very closely what kind of transactions land on chain through Flashbots. And there’s actually an API that anyone can listen to, that Flashbots creates, that will identify all the Flashbots bundles for you to go and analyze. But if you don’t send something through Flashbots, it’s like looking for a needle in a haystack. And there might be some kind of qualities that you could identify like having zero gas price transactions, or maybe some other weird things. But it is pretty difficult to identify a random new, longtail MEV opportunity kind of by definition, that it’s a long tail and it’s weird, and you don’t necessarily know what to look through; if it’s not being emitted by the Flashbots API. So there’s like this Catch 22 with Flashbots, where I don’t really want to – the best kind of long tail MEV that I have, I don’t submit to Flashbots, because I know it’d be put under the spotlight in their API.

Hasu 37:30
Oh, wow, really? So you, you just get it mined regularly, because you know, it kind of blends in with the rest, right? You want to maximize your anonymity set?

MEV Senpai 37:39
I do that. And then in some cases, there are other ways, there are private relays of that you can send your bundle to and have it mined by a miner. And that doesn’t always end up on Flashbots’ API.

Hasu 37:56
Interesting. I see. So for the next section, I think we need a little bit more canonical knowledge of how Flashbots works. So let’s start by saying you know, what is actually a bundle? And what guarantees does it give to, you know as a searcher or to other users who might submit their bundle via the Flashbots relay.

MEV Senpai 38:23
So a bundle is a group of transactions that a searcher submits to a miner. And that group of transactions can be my own as a searcher. But it could also be someone else’s that I found in the pending mempool or some other source, we can talk about those other sources later. And a bundle has to be executed in the order that it’s provided. And so I can tell miners in a very granular way, I want my transaction to be executed precisely behind someone else’s. And that gives me the ability to integrate in a granular way, do things like arbitrage a particular decentralized exchange in the wake of a large trade. So the first property of a bundle is this extremely granular way to express transaction ordering preferences, and that enables a lot of new types of MEV extraction that is not possible when you don’t have that level of granularity. And I think the second important property of a bundle is that all of it needs to be executed and included on chain or none of it is included on chain. The third thing that I would note is that bundles are sent through the Flashbots relay and then to a miner and not through the public mempool. If it went through the public mempool you, it could be seen by hungry sandwich bots, could be seen by other people that do malicious things. But since it goes through Flashbots, to the miner, or maybe through a different relay to the miner, there’s less opportunity for malicious parties to do things with your bundle. I think those are the three important properties of bundles.

Hasu 40:19
So one, the targeting of transactions at precisely the right spot. Second, it’s executed atomically. So either entirely or not at all. Meaning also it cannot be unbundled. And the third being it’s private. So the miner sees the bundle, and the contents of it but not other searchers.

MEV Senpai 40:40
Yes, and I feel like Georgios will yell at me, if we don’t caveat this with it’s not entirely private, like, it is direct to the miner in that it doesn’t go to the public mempool, but the miner and Flashbots both can see my bundle and the transactions in it. So it’s not truly private, but it is direct to the miner and it’s private from sandwich bots and like other bots in the public mempool.

Hasu 41:06
I see, so basically this guarantee that a bundle executes atomically. It’s not cryptographic or anything. It’s basically a social contract between the miners that participates in Flashbots and, you know, the the Flashbots relay.

MEV Senpai 41:26
Yes, precisely. And I’m always mindful of this non-cryptographic guarantee; this guarantee that’s more based on social incentives and trust rather than cryptography.

Hasu 41:41
What do you think would happen if a miner unbundled the Flashbots bundle and broke this, you know, social contract?

MEV Senpai 41:52
It’s a good question. I don’t know if it’s happened, I guess I don’t know… unless it has happened to me how you would figure out whether that happened or not. I think only Flashbots would be able to say definitively or the searcher that it’s happened to whether someone had unbundled a bundle. But what I’m guessing would happen is we would hear some kind of like summary of the evidence of what happened from the Flashbots team on their Discord and Twitter and then nothing else would really happen. And in particular, because Flashbots is not the only game in town, like I was hinting before that I was submitting bundles to other places other than Flashbots. I don’t think that they actually have the power to take remediative action, like removing a miner from the relay, because that’s just going to force miners to look for other sources of private transaction flow, and it could devolve into that permissioned and closed system that we were talking about earlier. I’m not really sure what the team could do other than kind of naming and shaming the miner.

Hasu 43:11
I mean, yes, there are other relays but they have the same problem, right? The relays also lose their usefulness when their miners start to unbundle. So doesn’t every relay have the incentive to kick out miners who break the social contract?

MEV Senpai 43:26
You are right, every relay does. But what I would note is that, some MEV extraction strategies are at more risk of unbundling than others. So in particular MEV extraction strategies, which have multiple transactions in their bundles are at risk of unbundling. But there are a bunch of strategies which only have single transactions in them and they’re not really susceptible to any kind of messing around by my miners. And these parties that are not as susceptible to unbundling will be very happy to go direct to the miner, and to send the miners their bundles. But miners are extremely sensitive of searchers going direct to them, because there is an opportunity for miners to be DDoSed by searchers who are sending them bundles. And the reason for this is that it’s not a guarantee that a miner gets paid for bundles that they accept. Oftentimes, you’re paying for your bundle through an internal smart contract transfer instead of gas price. And so because of this, a miner has to expend computational resources in order to find out whether a bundle is good or not. And a malicious searcher could send you a bunch of bundles, which are not good, don’t pay the miner anything and force them to expend a bunch of resources. So there’s inherently a trust relationship that exists between miners and searchers if they’re sending directly to the searcher. And only searchers which miners trust, would be able to get the direct to miner kind of relationship with a miner and I worry that in a world where relays cut off miners from bundle flow, the system devolves to these high trust relationships between miners and searchers, and in particular only for searchers which are willing to send their bundles to miners who will be the ones that, you know, aren’t at risk of unbundling and then the miners maybe are the only ones that are able to extract things that are at risk of bundling.

Hasu 45:38
Interesting, but doesn’t Flashbots have the exact same DDoS problem in accepting untrusted searchers?

MEV Senpai 45:46
Flashbots does, and they do get DDoSed actually. Like if you’re a searcher you’ve noticed this over the past few weeks and they’re – it’s not a problem now, because they’ve implemented some measures that help with DDoSing. But it probably will be a problem again. So Flashbots is taking this DDoS problem instead of the miners. And they will simulate every single bundle before sending it onto the miner to know whether that bundle is good or not. And that’s like the core role of the relay and the system today.

Hasu 46:14
Interesting. So they are basically DDoS protection as a service for miners. That’s interesting. And so what what measures did they integrate, I read about a reputation system for searchers?

MEV Senpai 46:26
Yeah, so there’s this reputation system for searchers that splits the relay into a high priority and low priority queue. Essentially, if Flashbots has a record on-chain, and in their relay of you submitting high quality bundles on a regular basis, you’re put into the high priority queue. And if they have no record if you’re a new searcher, then you’re put into the low priority queue. And so what we’ve seen is like the DDoSes that would previously cripple Flashbots are now just crippling the low priority queue. And the high priority queue gets to submit their bundles on freely.

Hasu 47:06
So the queue is just a different endpoint? If that gets DDoSed it doesn’t affect the other one.

MEV Senpai 47:12
Actually, it’s the same endpoint. I don’t know how it works on the backend on their side, but they filter bundles by high priority or low priority depending on who sends them. So the DDoSes will just go into low priority queue and then like that becomes unusable. But if you are a high priority searcher who’s quality your stuff goes into a high priority queue where there’s no DDoS landing, if that makes sense.

Hasu 47:36
You mentioned that Flashbots, they simulate the block and they do this for a couple of reasons, right? So how do they ensure that multiple bundles that are submitted; and because the searchers can’t see what other searchers submit, right? So how do we ensure that one bundle doesn’t compete with another or that they don’t compete two mutually exclusive bundles or even bundles that damage each other.

MEV Senpai 48:03
So this is actually both Flashbots, and the miner. So it happens at the level of the client that miners are using to decide which transactions to include in their block, specifically, MEV-Geth; if your listeners are interested in digging into the details, and MEV-Geth will run a bunch of workers in parallel that are trying to make multiple bundle length blocks. So you have one worker that is trying to create a block with a single bundle, you have one worker that’s trying to create a block with two bundles, a third with three, you know, all the way to end. However…

Hasu 48:44
And the worker is just one instance of the software running basically?

MEV Senpai 48:49
Yes. So each of these workers is taking bundles, and trying to add them on top of each other. Let me take a step back, actually. The first thing that happens is when a bundle is sent to a miner, it’s simulated locally, and you find out what the gas price of that bundle is. And then in these individual workers, they will look at the simulated bundles and their gas price. And take the top gas price bundle and place it within a block and say, ‘Okay, how much profit as a miner am I making if I mine a block with one bundle?’, then on the second worker, it’ll look and say, ‘Okay, this is the top bundle, I’m going to add the bundle that has the second highest gas price right below that and look and see how much profit am I making if I mined this?’ and is it higher than just mining a single bundle together and then the third as well – and note that if two bundles conflict, then one of them is going to revert. It’s either going to fail and have like a failed, cancelled transaction or it’s just not going to pay the miner to anything. And so the protection against conflicting bundles is that miners won’t make profit from mining them, and it will send off an alert in the system if there’s a failed transaction in like this parallel worker kind of system that I just laid out. Did that make sense?

Hasu 50:24
Yes, it did. Yeah. So um, why did Flashbots start by creating these bundles in the first place? I always thought before Flashbots was was created, that the endgame would be that absolute, like block production, or the game that miners play between attestation and sequencing of transactions in a block becomes definitely outsourced, like, there will be division of labor between those two, and the miners will focus entirely on the attestation part. And then you have a marketplace where they can choose the best block contents. And it always felt like to me that the way that it’s done right now with the bundles is basically like a stopgap to the real solution, which is an actual block template market.

MEV Senpai 51:20
I think you’re totally right. I think that is the end state of the market is block-template, block templates. And I think that there are many more things that you could do with full blocks, if that were a possibility. But I think there’s two problems with that. The first is, is I don’t think many searchers are actually sophisticated enough to create full blocks, both… oftentimes, searchers will specialize in an individual category like arbitrage, liquidation or sandwiches, and they don’t actually know that much about the others. So I know something about a sandwich bot and how it operates. But like, I have no idea how the nuances of the most efficient sandwich bots operate, nor do I really know anything about liquidations, or the other weird long tail stuff that’s out there, right? And I also don’t have a great view of the mempool and miners, like, that’s their job – to get transactions. So they have better views in the mempool, so they may be able to create better blocks than I for those reasons. So we just haven’t developed the kind of sophistication that a block producer market needs in the market and I think that’ll happen over time. And the second is I’m not sure the politics are actually palatable in proof of work. And in particular, block producers, a lot of them having also been miners in Bitcoin, are used to being the party that creates blocks. And I don’t think that they want to relinquish that kind of control. That’s, that’s my reading on the politics of it. But we have this opportunity to reset that in proof of stake. Right?

Hasu 53:04
What do you mean, by miners you mean mining pools, right? Because miners neither in Bitcoin nor Ethereum create their own block templates, but they get it from the pool.

MEV Senpai 53:13
You’re right. I’m not being precise here. But I do mean mining pools.

Hasu 53:13
Yeah, so we do have this division of labor, just to a smaller degree where miners are already sort of separated into mining pools, and the pool operator and the workers basically.

MEV Senpai 53:33
Right. And I think, to your point, the way that the market is moving is we’re going to turn mining pools into the equivalent of miners today where they won’t know the contents of the blocks that they’re mining.

Hasu 53:46
Yeah, they only then responsible for, yeah, basically smoothing the payout curve.

MEV Senpai 53:54
Yeah, and I think, like to loop this back to the previous conversation with bundles, and privacy, in an ideal block producer market, the job of the mining pool, or whoever is producing a block will just be, you know, performing the necessary work to ensure that that block is like a valid block to the network, and they won’t actually see the contents of the block. So it gives more guarantees to searchers that they actually have privacy, their bundles aren’t going to be broken up. And I think that’ll lead to a more efficient marketplace in the long term.

Hasu 54:28
Yeah, so um, this is sort of the question how Flashbots and other relays can actually create bundle atomicity and prevent miners from seeing the contents of the transaction. So are you following what plans exist in order to guarantee that?

MEV Senpai 54:50
Think we already talked about one, which is full block production and separations between block producers and mining pools or validators. That’s one. But I think long term you’re going to want to have bundle atomicity at the protocol layer like, intuitively, it doesn’t really seem like there’s any reason why we shouldn’t be able to sequence transactions at the protocol layer. Maybe there are some reasons why…

Hasu 55:20
By sequencing, you mean, my transaction gets sort of another validity condition, meaning it’s only valid in position x of block y?

MEV Senpai 55:33
Yes.

Hasu 55:33
Yeah, yeah, I think that would be extremely useful, and pretty much solve a lot of MEV issues that exist today.

MEV Senpai 55:42
Yeah, I agree. I think that there’s a lot of room for new types of transactions at the protocol layer that we’re sort of experimenting with, with Flashbots right now, and just makes more sense to eventually upstream into the actual protocol itself. But I don’t know of like the concrete plans that exist to make this happen. The one thing that I could point to is Vitalik wrote this post on using Flashbots for account abstraction on the Flashbots Discord, which is kind of a related but separate thing. And that’s the only concrete thing that I know about.

Hasu 56:22
That’s actually my next topic that I want to talk about. But I have one more question in this section. So we have seen some instances of unbundling that caused a small ruckus in the Flashbots community, and these were instances when you know, when sort of people inspected what actually happened. The block that included the original bundle had become stale, meaning it was no longer part of the heaviest chain, and yet it had become an anchor block. And this allowed, you know, the network to see the transactions in the bundle. So do you think that miners have… first of all, what do you think about this? And do you think miners have anchored blocks in the past, as like a way of unbundling without, you know, angering Flashbots?

MEV Senpai 57:27
That’s a contentious question Hasu, but I will do my best to answer it. I think that so I think this is fair game. As a searcher, I need to be mindful of the risk that I ended up in an uncle. It’s like a normal operation within the network, just because of how proof of work and propagation of blocks work, right? And so anybody that didn’t know about this just wasn’t paying attention. And at this point, you should put guards on your contract to make sure that you don’t get wrecked. And moreover, I would point out that, for single atomic transactions, like arbitrage, this isn’t a very big deal, because your arbitrage transaction really can’t get wrecked. Like there’s not anything that at least I can think of where a miner would take your arb put it in the main chain, other than just generalized frontrunning it themselves. But if you are a sandwich bot, there’s like, there are many ways that you could lose money. The only parties that are at risk are the ones that could have their bundle unbundled, like sandwich bots.

Hasu 58:39
Yes.

MEV Senpai 58:41
If I think that any miners have uncled blocks in the past to unbundle? If you put a gun to my head and force me to answer I would answer yes, actually. And I think it is under-investigated as a topic and there’s a lot of on-chain analysis that you could do as to who is uncling high MEV blcoks and who is capturing them? I would guess that it has happened in the past, whether it’s deliberate, like one block deep reorgs to uncle a high MEV block and I’m guessing if this has happened, that there is evidence of it happening, but I want to be clear that this is an intuition, and I don’t actually have evidence of this happening.

Hasu 59:29
Yeah, and um, Flashbots actually, I don’t know if it was today or if it’s launching somewhere like next week or something, but they have put out a or about to put out a reorg monitor as part of their dashboard which I think will help you know getting some more insight into this. Yeah. You mentioned that as a searcher you can protect against uncling by putting like, basically safeguards into your smart contract. Can you give An example of how that would work?

MEV Senpai 1:00:03
Yeah, it’s like three words: require(block.number == desiredBlock). Well, three words if you like, count a whole variable. Definitely more than three words, when I actually said it, but maybe I’m demoted MEV Intern again?

Hasu 1:00:21
No, you’re good.

MEV Senpai 1:00:23
Thanks. So I think one simple protection is that you can require that your transaction only pays the minor if it lands, or only take some action, if it lands in a specific block. So if you get uncled, then the miner cannot bring it into the main chain, because the block number has moved on past that. I think the stronger protection, actually, and we’ll talk about this later in the conversation around reorgs, is requiring that the hash of the previous block is equal to some, you know, hash that you are observing when you’re sending on your bundle. So it’s like I think require(block.hash == desiredBlockHash), something like that is the actual code that you’d…

Hasu 1:01:13
Ok, why would the hash of the previous block change if the next block gets uncled?

MEV Senpai 1:01:19
Well, if you’re worried about more than just uncles, you’re worried about deep reorgs, then you want to make sure…

Hasu 1:01:24
Ah okay, okay. Yes, that makes sense. Yeah, it would definitely protect you against the reorganization of the block before that.

MEV Senpai 1:01:32
Yep.

Hasu 1:01:32
Okay. So I’m asking my listeners might know, I’m very interested in trading on decentralized exchanges. I’m also very interested in the design of decentralized exchanges. And so let’s talk for a while about trading, and how that relates to, you know, transaction relays and Flashbots. In the very beginning, we talked about some of the advantages of having, like, a relay, like Flashbots, that replaces the public mempool or acts as an amendment to the public mempool. And we talked about how it preserves Ethereum’s decentralization, how it, you know, reduces the negative externalities of PGAs. But there’s also one very big benefit that sort of nobody expected all of a sudden it was there, and it’s incredibly useful and you already mentioned it as well. And it’s account abstraction through the backdoor, basically, Vitalik has written about this. So what is account abstraction first of all? And second of all, how do other mempools or relays enable it?

MEV Senpai 1:02:47
So account abstraction, as I understand, it is like a very specific technical term and I don’t know the specific technical details, I know the high level. So please don’t @ me if I, if I get the extremely specific technical thing wrong. But the high level is that you are able to make transactions from one wallet and pay for those transactions with another wallet. And the way that this is enabled is that the MEV-Geth client that miners run and Flashbots has created in all of these relays support allows you to pay for your transaction through a smart contract call, specifically block.coinbase.transfer, which just transfers some money from a wallet to the miner. And in evaluating whether to mine a bundle or not, the MEV-Geth client will look at the total amount paid by the bundle through either gas price or block.coinbase.transfer divided by the total gas that is used. And it actually doesn’t discriminate inside of the bundle as to where that is coming from. So you can have one transaction that is paying with a really high gas price, or really high block.coinbase.transfer, and another transaction which doesn’t pay anything at all. And since MEV-Geth looks at both of them together as a bundle and evaluates whether to include that or not, you can actually sponsor transactions with one transaction sponsoring the other that actually doesn’t pay anything at all. So that’s the idea of account abstraction it’s like abstracting the account that you’re sending transactions from or abstracting away who is paying for transactions themselves.

Hasu 1:04:42
Yep, very, very good explanation. Thank you. So what are the benefits of using account abstraction as someone who trades on a decentralized exchange?

MEV Senpai 1:04:54
So as a person that trades on a decentralized exchange, not necessarily as a searcher actually, but as just a user of a decentralized exchange. I can have some ERC 20 tokens in a wallet with no ETH in that wallet. And I can trade directly between those. So I can swap from USDC to DAI without having any ETH in my wallet. And I can pay for that swap from USDC to DAI with a different wallet. I think that’s one really interesting thing. Another thing is that if you care about privacy, you can use systems like Tornado Cash, to deposit some ETH into a privacy system and then withdraw it on the other end, and not have to have third parties sponsor or pay for your transactions or not need to have ETH in a wallet in order to execute some transaction. And I think that’s like a very interesting quality.

Hasu 1:05:57
Okay, okay, yes. Especially the latter one I actually didn’t know about. But I had two other things in mind as well. And I guess you’re not an active trader, so, like, you don’t make much use of those, which makes sense. So…

MEV Senpai 1:06:15
I have a lot of volume on decentralized exchanges.

Hasu 1:06:17
I can believe that. So yes, for me, the biggest one is, basically, if you use a bundle, and you believe – if you submit your trade not into the public mempool, but into a private relay, then you also get the benefit of bundle atomicity. So you can submit a trade and not get sandwich attacked unless the block gets uncled, at which point you get sandiwich attacked. But basically it allows you to complete freedom from sandwich attacks, which to many traders, is a big deal. This is one big benefit. And the second is, and this sort of ties into the first, so why do sandwich attacks happen in general? It’s one because trades have price impact. But second, because traders select a nonzero amount of slippage tolerance. And they do this because the market moves in front of them so that the market fills out that trades and you know, if they set zero slippage tolerance, and the price moves against them then that transaction fails. And you know, they land on-chain, and pay the cancellation fee, basically. So this makes setting a low slippage tolerance, especially for trades where the fee is like non negligible compared to the trade size, very unattractive. But if you have account abstraction, and your transaction only pays a fee, if the transaction succeeds, which you can guarantee in two ways, one via using a smart contract. And second, just by paying from the output of the pool, right? So you give one token in, and you get one token out and you pay from the out token, then this would also fail. If the trade doesn’t succeed, so you can guarantee that your trade only pays the transaction fee if the trade succeeds. So those two are actually you know, they completely revolutionize, in my opinion, trading on decentralized exchanges. Because they, you know, completely removed the ability to get frontrun or to have transactions fail.

MEV Senpai 1:08:33
I think those were excellent descriptions. You just asked me about account abstraction, not bundles in general. So I misunderstood what you were asking.

Hasu 1:08:39
Right! You’re right, yes. That was my that was my bad. I was targeting the use of private relays as a trader, yes. I guess like one of those benefits has to do with account abstraction if your transaction can’t fail. Yes, but yes, the bundling benefit purely comes from what the social contract between the relayer and the miner. So as someone who actively watchers, many different relays, how many people actually use the benefits that we just discussed and submit their DEX trades through private relays?

MEV Senpai 1:09:19
I’d say it’s on the order of hundreds of transactions a day and millions of volume. So non-trivial amounts, but it’s not the majority of market share of DEX volume or something like that.

Hasu 1:09:35
Okay, okay. But it’s I mean, 100 transactions a day is more than I was actually expecting. So that’s pretty cool to see that it’s catching on.

MEV Senpai 1:09:42
And Sushi, I think, just integrated Archerswap and they called it the MEV protection service or something like that, natively on their interface, so a user can go to the settings I think, and then click Like Archerswap MEV protection and it will send through the Archerswap relay, which also sends to Flashbots as well. And this is actually a great point, I want to pressure all wallets out there to support Flashbots bundles, because technically, it’s not easily possible to do in Metamask today, and I think they could absolutely change the way that you sign transactions to allow users to more easily send transactions directly to miners. So like, this is my personal vendetta, wallets – get on your game change the way that transactions are signed and support Flashbots bundles, so more people can get MEV protection in this way.

Hasu 1:10:44
Yes, 100% signed, for me as well. So anybody who has used something like Archerswap, maybe remember the scary, scary message that you get, when you try to sign this in Metamask that says if you sign this transaction, you have to trust basically the, you know, the application because it could steal all of your tokens. And it’s just scary as hell so it would be nice if you could have some protection against that.

MEV Senpai 1:11:14
Yeah, and I think well, there’s like a lot of things that wallets could do, and they just don’t seem to care enough to go and do them. So I think we should put more pressure on wallets to do that.

Hasu 1:11:25
Yeah, DEX trades, they create a lot of MEV, they create, I mean, clearly their create backrunning opportunities, if someone trades on one exchange and you know, moves the price on one exchange, but not another. But sandwich attacks are clearly the bigger risk. And recently we have seen in the DeFi trading space, you know, two forms of transactions will catch on that, to my knowledge don’t leak any MEV, namely batched options and more importantly even RFQ, so request for flow transactions. As you know someone who looks at the mempool all the time and does this arbitrage, can you confirm that this is really true like that these transactions create no MEV and if yes, why is that the case?

MEV Senpai 1:12:20
It is an interesting question. What I will say is that I have found no way to make MEV from these, at least the same way that you can with AMMs. So I haven’t seen any way that you could game a batched auction and like frontrun users or make RFQ orders have worse execution than traders expect. So in this way, I think that they don’t leak MEV at least in the same way as AMMs. You do see top bots on Flashbots, in particular the top bot, 0xA57. You can find on-chain pretty easily by going to Etherscan’s gas guzzlers, they’re like in the top 10. Oftentimes, they will be interacting and like taking things from 0x to get better execution, I presume. So there’s probably some MEV there. Maybe if you’re making really large trades, it makes sense to fill part of the trade on 0x and the RFQ system that they have. But I don’t think that it’s MEV that creates user harms in the same way that frontrunning and AMM does. And specifically on batched auctions, I think it really depends on the implementation. And you may have systems where the incentives break down if there are off chain actors that are facilitating these batched auctions and like to give an example, I think the way that Cowswap works is through these solvers who are running off-chain logic in order to give users the best execution price. And I think that is pushing MEV to the solvers and it becomes like solver, extractable value. And certainly they don’t want to; the whole premise of Cowswap is giving users fair execution price, right? But what happens in the edge case where like, Su tries to trade a billion dollars through Cowswap, and maybe there are some incentives for solvers to screw with Su’s order in a way that it isn’t for the median trade. And how does Cowswap prevent solvers from extracting value from its users? So I think MEV still exists in that system. It’s better and I think it’s able to ameliorate user harms when compared to AMMs but it’s certainly does still exist and I suspect that we haven’t really found systems that don’t break down at the edges.

Hasu 1:15:09
Yeah, great answer, I also – I think Cowswap is a good example. Chainlink’s fair sequencing service might be another, like, they are actually the exact same thing, right? Cowswap is a fair sequencing service, you know and Chainlink is an off-chain oracle. or an off-chain sequencer it’s basically the exact same thing and you pass on the MEV to the solver and just hope that, you know, they play according to different rules, than, you know, the searchers/miners would. And that’s how you sort of, try to minimize the MEV, but yeah, it has its own just assumptions, for sure.

MEV Senpai 1:15:49
Yep. Yep. Yep. I saw Phil on Twitter once, Phil, who’s like the godfather of MEV, for your listeners who don’t know, Phil Daian I think it’s how you pronounce his name? Who created the term “MEV”, and he commented that all these systems are just creating protocols that negotiate the terms on which MEV can be extracted. And I thought that was a good framing of it, you’re never really, you’re never completely removing a MEV, you’re just changing the terms on which it could be extracted, maybe easier, or harder to do in some systems.

Hasu 1:16:25
That’s interesting. We’ll come back to that quote, in like five minutes. But before that: so, sandwhich attacks – they were very prevalent in Uniswap v2, but now Uniswap v3 has launched, and it has affected the ability to perform sandwich attacks on traders, can you talk about in what sense it has become harder on Uniswap v3 to sandwich someone, even when they’re not using a private relay?

MEV Senpai 1:16:59
The big innovation for Uniswap v3 was to allow liquidity providers to concentrate their liquidity within certain price ranges. And this makes it much more capital efficient, and gives traders much deeper liquidity within those price ranges. So as a result, users can set tighter slippage, and they have less price impact on their trades. And that gives less room for sandwich bots to front run them and push them to their their slippage limits and extract value from them. Moreover, on these really large pairs, it can take an extreme amount of money to move the price. And that means there’s this higher upfront capital cost to run a sandwich bot. And that actually just prices out a bunch of bots, so you need like $30 million to significantly move the ETH-USDC pair on Uniswap v3. And as we were talking earlier, there’s this inherent risk to being unbundled in the Flashbots system, where a miner may be able to take one part of your bundle, remove it, do something with it. And sandwich bots are at risk of this. And they’re also at risk of being wrecked, like in the Salmonella attacks. And so sandwich bots actually don’t want to put up a high amount of capital, because they’re worried about losing it all or like being unbundled and being stuck holding $30 million of USDC when they don’t want to. And so just this this amount of capital that you need prices out a bunch of people and the amount of risk that it takes with that amount of capital prices out a bunch of people as well. And then lastly, like I ended up not implementing v3 in my arbitrage bots, because it’s much more difficult to reason about. And it’s not something that like I think hobbyists can easily engage with. And I know a bunch of other sandwich bots that, well I don’t run a sandwich bot, but I know a bunch of sandwich bots didn’t end up upgrading and it took like, a month and a half for me to see the first sandwich bot come on. So I think just the difficulty of engaging with v3 has led to less sandwiching in addition to the lower price impact that users are making, and like the upfront capital costs that it takes to frontrun on v3.

Hasu 1:19:24
You mentioned something interesting that I kind of forgot to ask about in the very first part. So where do – as a searcher where do you get your capital from? Like you mentioned some have inventory. But what about the use of flash loans, for example?

MEV Senpai 1:19:39
I think almost all top searchers have inventory. Actually, I’ll make that stronger. All top searchers have inventory. And in particular, using flash loans is very gas inefficient. It adds like 200,000 to 300,000 gas depending on the service you’re using.

Hasu 1:19:57
Oh wow.

MEV Senpai 1:19:58
And it also add a fee. So you’re paying like 0.3%. I think on Aave, if you are taking out a flash loan from it, I’m sorry, 0.3% for Uniswap for flash loans, it’s like 0.09% on Aave. And so you’re never going to win the gas price auction on Flashbots. If you’re adding 300,000 gas to your bundle, right? So for that reason, a person that has capital is always going to be able to out compete somebody that doesn’t and uses flash loans.

Hasu 1:20:33
Damn. This is something that I didn’t know about this is interesting. I mean, I had observed that, I mean, not for every pool, of course, there are flash loans available, but one pattern that when I first looked into sandwich attacks deeply there was one pattern that I spotted. That is, if you trade in a smaller pool, some smaller coin, when you trade it from, let’s say, ETH into that coin, then the likelihood that you would get sandwiched was way higher than if you trade in the other direction. So if you traded from the small coin into ETH. Why? Because it would require the sandwich attacker to have inventory of that coin that you want to sell right? Because they want to sell it in front of you, and then buy it back cheaper. So if they and if you trade – if you sold the small coin, then they would needed to have inventory of the small coin, which they don’t want to because it’s more balance sheet risk, right? Interesting.

MEV Senpai 1:21:30
There are sandwich bots that get around that by using ETH to buy the coin that they don’t have on a different exchange, and then selling that on the exchange that you’re trading on to create price impact before you trade. So like it’s not, it’s way more complex to do that. But there are definitely sandwich bots that get around that if they can if they’re like two markets for something.

Hasu 1:21:52
Yeah, makes sense. Makes sense.

MEV Senpai 1:21:54
I think you’ll enjoy this. This is an alpha leak for all you traders out there. But one edge that some searchers have is keeping one token one way of every single thing that they trade on or sandwich, because it costs some gas to initialize storage associated with an address of a token. So if you are trading on something for the first time, it costs a little bit more gas, then if you have that token in your wallet already.

Hasu 1:22:29
And by trading on something you mean the token contracts?

MEV Senpai 1:22:33
Yes. Yeah, just interacting with it in general. If you look at top bots, they’ll have wallets that have like a thousand tokens and they only have one of each of those tokens.

Hasu 1:22:45
Holy shit. I love it. I love it. Yes, this is great. Very cool. Okay, instead of sort of, sandwich attacking users, like we have seen that this has declined due to the rise of Uniswap v3, and I mean more people using a private relays as well; so private relay transactions cannot get sandwiched, Uniswap v3 transactions, much more difficult to get sandwiched, RFQ transactions cannot get sandwiched. But instead we have seen like a very new creative way of sandwich attack that doesn’t focus on the trader, but instead focuses on the LP of an AMM. Can you talk about that?

MEV Senpai 1:23:33
Absolutely. So the top bot on Ethereum and Flashbots, I’d say, 0xA57 – they have started to sandwich by getting in front of trades and adding a ton of liquidity, then the trade will be executed and then they’ll immediately remove their liquidity from a pair. So it’s like providing liquidity just in time, and then immediately removing it as well. So the user actually gets better execution than they would otherwise. But it is this bot that is able to capture the fees that that user is creating. And it’s at the expense of liquidity providers that this bot is making MEV as opposed to the users themselves, which is like a super interesting twist on the sandwich game.

Hasu 1:24:33
This may be, you know, a very obscure question, but one searcher submits a sandwich attack around the user order and another submits an AP sandwich attack around the users order and they both submit it to Flashbots, then what happens?

MEV Senpai 1:24:49
That’s a good question. You would need to look at the gas that is used by both bundles and then the amount that the bundles are willing to pay the miner? And one of them will be more gas price efficient than the other? I’m not immediately sure which of those would be, I’m guessing that the sandwich attack is going to be more gas efficient than the liquidity provider like sandwiching thing.

Hasu 1:25:20
Could you in theory, do both? I think yes, right? You would first do the LP sandwich attack and then sort of sandwich the other sandwich attack. And you would get strictly twice the fees, right? With no worse execution?

MEV Senpai 1:25:39
Yeah, I think you could do both, that that intuitively makes sense. Or you could backrun the trade and arbitrage it too. But I think something that will not be immediately clear to your listeners is that this is effectively a limit order for the bot that is providing just-in-time liquidity. So they start with some composition of like Ethereum and USDC, as an example, when they provide liquidity, and then given that their portfolio rebalances with the pending trade, they end up with a different composition of those two assets. ETH and USDC, in my example. And so it’s effectively making a trade on some small order usually. And in order for this to make sense, you need to have a broader perspective on the market of like, where the ETH-USDC pair is going, for example. And so it’s not atomic in the same way that regular sandwiches or arbs are. And I think it’s a tool in the broader toolboxes that bots can have in order to, like, have the optimal portfolio according to what their view of the market is, but yeah, it’s not atomic in the same way, although to your point, you should be able to, like backrun it or sandwich it and extract some more value.

Hasu 1:27:07
Okay, that was a very interesting explanation. Now, I think it’s finally time to come to the hot topic of today that everyone’s been waiting for. That dominates Twitter and the various Discord and Telegram groups in crypto right now. And can you summarize for us sort of the recent, yeah, the recent discussions about short term reorgs in Ethereum, like where this is coming from?

MEV Senpai 1:27:37
So in proof-of-work systems, miners are participating in this kind of probabilistic lottery. And the first miner to win this probabilistic lottery based off of the amount of times that you’re able to perform hashes of some function and when you solve this math puzzle, is the party that can create a new block in the system. But two miners might win this probabilistic lottery at the same time, around the same time. And because of network propagation delays, you may not know that another party has won this lottery, they’ve they’ve created, successfully created and sealed a block. And as a node in the system or miner, you need to decide which of these two, winners of the probabilistic lottery, which of these two new blocks you should append to your ledger. And the way that this is done is by looking at the total amount of computational work that has gone into either block and choosing the one that has more computational work. And there may be cases also where some miner quickly mines two blocks in a row and someone else without knowing that has only mined one, and so you would choose the one with more computational work, so the one with two blocks in a row over one. But the problem with this is, that means you might be able to go back in time a couple blocks, quickly perform more computational work than the actual canonical chain, and then reveal that to the network. And because of this choice, this rule that the network follows the chain that has the heaviest amount of use, or the heaviest amount of computational work associated with it, that would now be the canonical chain. And there’s a lot of really bad things that you can potentially do if you are able to go back many blocks in a row and perform this. I would note that this is like extremely difficult to do and to pull off. But if you could theoretically make this happen, you could go back in time. And maybe take a liquidation that someone else got and now as a miner you know, perform that liquidation yourself and capture all the MEV from it or maybe sequence users’ transactions in such a way that you capture a ton of MEV or play some other kinds of games in order to capture MEV. And this is called a time bandit attack. If it were to transpire, it would be super destabilizing. But there was some discussion at a recent research summit called MEV WTF. People were discussing this and like some of the speakers thought that this either already happens or that it was inevitable. And it would happen on a very short term, like one before block kind of reorgs. And personally, I heard whispers in the community and like there’s some public discussion about people who are pursuing software that would programmatically enable miners to facilitate these kind of attacks on the system, reorganizations and – you know, if you start with the premise that a couple people said at the research summit, that this is inevitable then I think the question that follows is should this be accelerated or democratized and that conversation wasn’t happening? I think actually, like a lot of the discussion started, because I tweeted about it. And then like, a Twitter conversation escalated to a fever pitch. But then, over the coming days and thinking about it, I came to the conclusion that this wasn’t inevitable at all. And that actually, like a small group of searchers, and people with a vested interest in this happening, were pursuing creating the software to programmatically reorg the network. And that really, like reframed the conversation, for me, and I think for everyone else, and maybe revisit how I was thinking about, like the natural conclusions of whether this inevitable or not, or what to do.

And I think, were this to transpire, and if people created this kind of software, it would be stupidly, destructive and value destroying, in gaming it out, I don’t even think it really makes sense. Like, if you were to pay a miner to try to go back in time, build on top of a block and reorg the system, then simply another miner would try to reorg you in order to capture the MEV and say, Okay, now you’re going to need to pay the other miner, some of your MEV in order to build on top of your chain. And then someone else decides, well, I’m going to try to reorg you again, and I’m gonna pay more forward to other miners to build on top of my chain, and then you respond by saying, Okay, well, I’ll pay you even more to do that. And there’s like this tit for tat, back and forth, where you’re just like, escalating paying more and more. And at the end of the day, I don’t even know that it’s profitable to do these kinds of reorg tactics at all, because you just – I think the game theory is you end up paying miners to build on your chain, until you don’t capture any value at all. And like, meanwhile, the chain stops moving forward, users are like, what is happening, my transactions aren’t going forward, I’m gonna stop using ETH. And the end is like a lot of instability, users probably use the chain less, the fees go down, MEV goes down, price of ETH goes down, and long-term miners would make way less money. I don’t think it actually makes sense for miners to do this. I think it would be bad. And I hope that the people building this kind of software, don’t do it. I think it’s actually yeah, insane. And it would be insanely value destructive if it were to happen.

Hasu 1:33:35
Right, I think yeah, there’s a lot to unpack here, which you will. Super fascinating answer. So first of all, you laid out reorgs happen naturally, like, blocks become stale, then the chain reorganizes. We have this fork choice rule to you know, select between different forks that might be viable, in order for the network to stay, in consensus with each other, which is the most important thing in like a network like Ethereum that everyone stays in consensus with each other. And we tolerate short reorgs in order to reach this goal basically. But somebody can use this mechanic that other nodes in the network will always switch to the heaviest chain, without any regards for you know, throwing away blocks that they have already mined or accepted – that somebody can use this as an attack. And this has sort of received a new name in Ethereum because like, let’s be real everything has a new name in Ethereum, as a time bandit attack but it’s like it’s already like known in sort of long before Ethereum as sort of a reorg attack or a double spend attack. Except that in this case, who’s double spent wouldn’t be an exchange, which is sort of the context in which most users know, this type of attack, but it would be a miner, at least in some instances. So now let’s talk about why this is actually destabilizing for the chain and what the negative consequences would be. So you gave a good example, there’s a big liquidation, you know, one miner takes the entire liquidation penalty, which I don’t participate in the liquidations, but I feel like it should be like something like 10%.

MEV Senpai 1:35:37
I think it’s like 8 to 10% on some protocols.

Hasu 1:35:39
So if it’s like a $100 million loan being liquidated, and it can be 8 to $10 million – which is a lot. It’s understandable that miners would look at this and say, the previous block has a $10 million liquidation, for me, a liquidation penalty to take, why should I build on this block, instead of, you know, building on the block before then also try to get this liquidation. And yeah, you painted sort of the picture of, you know, miners reorg-ing each other, until some resolution is found. And what this would basically achieve is sort of the liveness of Ethereum would stall. Basically, the chain would not make progress until this is resolved. And the thing is, you don’t, you don’t actually know if it is resolved like with very high certainty, so users will generally like lose a lot of confidence. So (A) you don’t know if this is happening right now, because miners might not release their blocks immediately, which would be a valid tactic known from selfish mining. So you never know if such a race is actually taking place right now. And second, you don’t know when it’s resolved. So like, it would basically it would reduce the user’s ability, in my opinion, in the settlement assurance, so Ethereum, like, instead of like, looking at a transaction, in Etherscan, or Metamask, like after one or two confirmations, they consider this as confirmed, they would probably demand much higher numbers of confirmations, in order for you to see their transactions as final. And you basically would increase the latency of Ethereum.

MEV Senpai 1:37:30
Yep, yep. Probably some function of the total MEV that your, your transaction creates, right?

Hasu 1:37:40
Yes, I’m kind of worried that there might also be other ways that this could be used to not just like, double spend another miner, but break, you know, DeFi protocols, as they exist today. You know, someone, you know, sort of pointed out to me yesterday on Twitter, that oracles, and this includes both Chainlink, and the Maker oracle, their oracle updates are not actually tied to a specific block height, or block hash. So you could use – and this is sort of what you pointed out, right? You cannot enforce the sequencing at the protocol layer right now. So someone could, there could be a user who closes their liquidation – sort of who closes a loan, close to liquidation, you know, in block zero. And then five blocks go by, and then you know, Compound or Maker or Chainlink publish the price update, and the user, now a couple of minutes later would have been liquidated. And then a miner could take this oracle update, go back five blocks in time, and liquidate the user with a future oracle update before they can close the loan at a time when it was not actually liquidatable. And this strikes me as insanely destructive.

MEV Senpai 1:39:08
Yeah.

Hasu 1:39:10
I mean, I hope…

MEV Senpai 1:39:10
Like, who would want to take a loan on that system?

Hasu 1:39:13
Yes, exactly. Exactly. And sort of, you know, lending and borrowing is at the heart of DeFi. Without this, everything sort of breaks down. I mean, but this goes to, like why should miners do this, right? I mean, you could argue, ok maybe they will reorganize another miner and leave all actual user transactions untouched. So you know, there’s at least minimize the fallout. But if you actually go about like stealing money from users, then I think, like we crossed the line where miners could as well go to the data center and set all of their hardware on fire.

MEV Senpai 1:39:53
Yeah, I think you might as well hey, it’s so destructive to the ecosystem long term and I think to their businesses, that It’s like effectively an exit scam, I think equivalent to it, you may make like $10 million, liquidating and stealing a bunch of money from people who have loans, but your business will be over forever. And you might as well, like pack up and leave. And it’s not even clear to me that this is legal either beyond the social consequences, like, I’m sure that if a bunch of people were harmed this way, you’d see legal action taken against the parties, because all the mining pools are doxxed, right? Individual people at the head of them that make these kinds of decisions. So…

Hasu 1:40:34
Yeah, I mean, fortunately, we have seen for example like Ethermine, one of the largest pools right now already come out and say that they will never participate in something like this, which I think it’s important that some mining pools, you know, step up and create a Schelling point of behavior for other mining pools to follow.

MEV Senpai 1:40:54
And actually, if you ask searchers, which mining pools worry them the most or which they think are the most aggressive or willing to take kind of action in this line. I think 99 out of 100 people would tell you Ethermine. And so it’s a pretty big deal that they particularly said that they weren’t going to do this because they have that perception as being technically capable, as well as aggressive.

Hasu 1:41:20
You said it’s, it would be basically an exit scam from miners. How do you think about this, in the context of the upcoming proof-of-stake merge isn’t it the case that miners will have less and less future revenue at stake, the closer we get to the merge?

MEV Senpai 1:41:40
This is true, but a bunch of the top pools actually have staking services as well. I think F2Pool, I want to say Ethermine and SparkPool are doing things in that area as well. And that people should do due diligence on that before you quote me on Ethermine and SparkPool. But F2Pool for sure with Stakefish, so a bunch of the top pools also have vested interests in proof-of-stake, as well. And I think they’re structurally long ETH. And I’d also note that like this is, in part a social game, and these are individuals who got into mining more often not because they’re nerds like me. And they really care about Ethereum. And so there’s like some ideological component as well to miners, and I don’t necessarily think that they’re this giant monster that some people seem to think that they are I mean. Yeah, I haven’t seen them do anything that would lead me to believe that. I think there are social incentives, as well as for the large ones, some business incentives, too. But I do think, as we get closer to the merge, it is more dangerous. So I don’t want to completely minimize that.

Hasu 1:43:00
Yeah, I think one more argument could be made is that many pools also mine other chains, right? So many or a couple of the largest Ethereum pools also mine Bitcoin. And a couple mine other GPU-mineable chains. And I think like this was normalized in the second biggest proof-of-work coin. Like this would have a fallout across the entire remaining proof-of-work ecosystem and probably accelerate like a crypto-wide transition to proof-of-stake, at least seems possible. This would be something that I would worry about as a miner, even as Ethereum proof-of-work mining comes to an end.

MEV Senpai 1:43:48
And one last thing on that note was, I was listening to a podcast by James Lovejoy and Nic Carter on the topic of reorgs. James Lovejoy was a master’s student who wrote this great paper on reorgs and like empirical evidence on whether or not double spend attacks and reorgs are happening in chains. And he said, one of the reasons why miners don’t reorg these smaller coins, is because they think of the market in terms of the hashes as opposed to the individual coins. And they don’t want to make the overall market for that hash like SHA-256 smaller and they felt that by double spending and performing these like more malicious types of behavior on an individual client, it would make the larger market for that hash smaller, and that wasn’t in their interest.

Hasu 1:44:41
Yes, this is exactly right.

MEV Senpai 1:44:43
It precisely maps to what you’re saying.

Hasu 1:44:45
Yes, a lot of Bitcoin maximalists were also saying – and yes, in this case, I’m using this as a derogatory term, thank you very much. Were saying after their BCH-BTC split that the Bitcoin miners or many like miners loyal to Bitcoin should or will attack you know BCH anyday now and it will just become an inevitability like the smaller hash it would get. But like what you said is exactly correct, like, as a BTC miner, you have zero interest in attacking BCH because by like destroying it, you’ve just reduced the value of every hash that you produce, as simple as that. So, yes, every BTC miner has a vested interest in seeing BCH succeed. And every BCH miner has a vested interest in seeing BTC succeed. Yeah, I think that’s just about the reality.

MEV Senpai 1:45:39
Yeah, yeah, more eloquent than I could put it, thanks.

Hasu 1:45:45
So we talked about why it’s very unlikely that miners will actually participate in this. So I think it’s important to say, even if someone wrote the software, and by the way, we can talk about a bit more like how that would work, we talked about, you know, how Flashbots is a market for bundles, transaction bundles for miners to include, we talked about how the endgame of MEV or just of mining in general might be a separation of attestation and, you know, block template markets. So this is sort of the next step, and this – and I think you could like mentally combine both of these concepts in a bundle that consists of several transactions and a block template that is like one block full of transactions, you could combine this into like, block template bundles, right? And this is what we are talking about here. So it’s basically Flashbots but where someone can propose several block templates, if you will, in a row to replace, you know, existing blocks that exists in the Ethereum chain right now.

MEV Senpai 1:46:52
And you know what, I just thought in the same way that you can unbundle bundles of transactions, miners will be able to unbundle bundles of blocks.

Hasu 1:47:00
Yes. This would, this would even be like completely unpreventable, I think.

MEV Senpai 1:47:06
Yeah, because you can enforce the transaction bundles at the protocol level, but you, you wouldn’t be able to enforce the bundles of blocks. Yeah, that’s interesting.

Hasu 1:47:16
Yeah. This has a lot of intricacies to think through. But point being, like, this software is not easy to write in an incentive compatible way, where it makes sense, you know, for miners to adopt it. Like, even if they were interested in doing this, which I believe firmly that they are not – I mean, it just goes to show that even if someone was to, you know, write the software and release it, the likelihood that, you know, it would still need to get adopted by the miners – by a significant number of them. And the chance or the risk that this happens is very low, just to put like, this recent drama into a bit more context.

Yeah. And I would also note, looking out into the future, the way that Eth 2.0 works will mitigate all of this, I think, at least it’s it’s much more difficult to perform these kind of attacks in Eth 2.0.

This is correct, yes. So the way that Ethereum and both Bitcoin work, they have basically – no not basically, they have the exact same consensus mechanism, we’ve got Nakamoto consensus, and the Nakamoto, there’s one leader who proposes a block, and then everybody else, which is to the heaviest chain, right? And how it will work in Eth 2.0 is that there’s a two step process to the consensus mechanism, where you have one person still who is the leader to propose a block in a particular slot. But then you have sort of a voting or it’s, I think it’s called attestation game happening on top of that block in Eth 2.0, and you have like a whole number of different stakeholders who all attest to the block at a particular height, and that gives the block its weight in the fork (?) route. So what was previously the work, the amount of computation giving a block weight in the fork (?) rule is now the number of attestations by different stakers. And someone who attested to a block once, to one block at a particular cannot attest to another block at the same height because that this would be detectable by the protocol and they would get slashed. So that’s why you cannot actually have one person, you know, change their mind about what block they attested to. And yeah, so that’s why I think like particular forms of you know, liveness attacks become much easier in proof-of-stake, but the tax on sort of the safety of the system, which includes these reorgs become significantly harder.

MEV Senpai 1:49:57
Exactly, exactly. And so this kind of has a element of a timeout on this, whereby the distant risk of this happening as low as it is will timeout after the merge happens. And I think that there’s like, probably some game theory to be done there. And I don’t really know what the status of the merge is. But maybe it’ll accelerate the merge that we’re even having this conversation too.

Hasu 1:50:22
Yeah, agree, but not withstanding, what defensive options, you know, because we talked about why it’s like super unlikely someone will actually finish the software and then it’s unlikely that someone will adopt it. But what if it were adopted, sort of what defensive options exist beyond that? What would you do, like, if you are a miner what would you do to protect against this?

MEV Senpai 1:50:51
If I was a miner?

Hasu 1:50:53
Not necessarily just as a miner, but I mean, many options sort of touch all kinds of participants.

MEV Senpai 1:51:00
Yeah. So I think, like, the final word is probably on the social layer. And I think you were more eloquent than I am on that I’ll just like, let you answer in a moment. And then I think that there are all kinds of games that can be played that give more incentive for miners to build on your chain, or the, you know, the canonical chain. So in particular, paying some future value to the next miner, which gives them more of an incentive to build on top of your block as opposed to going in the past. This can either be done by the miner themselves, maybe they received like a 1000 ETH liquidation and so you’re just gonna pay a bounty to the person that mines the next block. Or you might be able to do it at like the MEV-Geth level and Flashbots as an organization, getting all miners to agree to smooth their MEV payments out over time. And so there, there’s not like this huge variance in any revenue from miners. And instead, the liquidation that’s 1000 ETH today, that goes to one miner is instead paid out over 20 blocks, and so it’s 50 each or, you know, adjust your numbers accordingly. And that can be done, I think, at the Flashbots level, or the protocol level as well. And then lastly, I think dapps should immediately start thinking about this and design, in a kind of more reorg-aware way. So I don’t have a concrete suggestion. But I think oracles in particular should be thinking about reorgs more and how to design them such that you can’t play the kind of liquidation oracle update games that you described earlier Hasu.

Hasu 1:52:45
Yeah, I think that that makes a lot of sense. Yeah, the solution of paying rewards forward, I think that like ties nicely into sort of the example that we used early on, where you have a large liquidation of 10 million, whatever, and, you know, miners fighting over it. But if you only took like 500k and paid 500k, forward to the next 19 miners, right? Then you would still have, I hope I got my math right here, but you should have also 10 million total. But the much larger incentive to build on every future block of this, of this chain. So you get at least 500k, even if you don’t get 10 million. But I mean, this has some – this is not as trivial as it sounds to implement. It is actually like if reorgs are actually happening. And you as the 10 million liquidation miner have to be worried about getting reorged then you don’t even have to implement anything this is to the miner can just do this, you know, individually and still be better off. And then the solution is extremely obvious. So that’s why if it actually happened, then we would see this solution getting kicked, like kicked in immediately, pretty much. And then the problem would sort of, you know, at least for like these liquidations and so on would fix itself. The problem is basically when they are not happening, like when there are no reorgs and so there’s no individual threat to miners. And then you could argue Hey, why don’t we sort of implement a defensive measure, you know, to even prevent this from happening. And here’s where I like only in the last day sort of realized that this is actually prisoner’s dilemma. Because as a miner, you’re not actually incentivized to share your revenue with anyone else. As long as you don’t fear the individual threat of getting reorged so you cannot do this as a preemptive measure very easily, and that is because miners who don’t participate will always be better off than, as long there’s no reaction happening, than those who do participate. Yeah, they’re a bunch of games to be played there around like, how do I, like, receive money out of band, for example from a searcher that doesn’t get included in, you know, this big pot? That’s being paid forward to everyone else, so yeah, it’s very alluring but tricky.

MEV Senpai 1:55:28
Yeah. I think like all these mechanisms to pay miners to reorg the chain are not reorg resistant themselves. And that’s like, the core problem about these. I think it’s all way more complicated than people are making it out to be in the Twitterati.

Hasu 1:55:44
Yes, I mean, optimally, you would have, like a, basically an auction system, an offchain auction system, where miners decide on what the, you know, the next change should be. And they, you know, get money according to their hash power. Wow, we’ve just reinvented Ethereum congratulations.

MEV Senpai 1:56:07
I think the big difference there is there’s an argument to be made for Flashbots being aligned with Ethereum and like cryptocurrency more broadly in the long term, but I struggle to see why building that kind of system would be long term aligned with crypto. So yeah.

Hasu 1:56:27
Yeah. You mean, the reorg system? Yeah. I mean, this could sort of be the last question in this vlog, but it’s really an open question like, how Flashbots should react to this, and how proactive they should be about sort of navigating the discussion on this. And especially considering that, you know, the person who started all this is working for Flashbots. And Flashbots, like, at least according, like to their own communication has, you know, the mission of allowing safe and democratized MEV extraction, that’s actually like protecting Ethereum consensus, than on harming it. So I mean, I must say I was I can say very openly, like how disappointed I was, by their communication, the first few days. I mean, to me this sort of put into question, you know, how strongly they actually stand behind the values they proclaimed?

MEV Senpai 1:57:29
I agree, I think it’s been pretty dark from the team, like there’s there’s that one loud person on Twitter’s communications, and then maybe one tweet from Phil and Robert. And I think that’s about it. And it’s not immediately clear what the relationship is; what they stand for at this point.

I’m not immediately certain how they should react on the broader issue, too. I think, actually, what they should do is being the experts on the subject of MEV, they are, like Phil has probably thought about this more than anyone and what the defensive measures are. So I think they should rally the horses, so to speak, around how to defend against these reorg games, if they are to transpire. And they should probably prepare for a world in which it happens, but not release any software that could possibly lead to reorgs happening regularly on Ethereum. I think the moment that the games start and it becomes certain with hard evidence that this is inevitable, I think they should launch into some action plan on how to defend against this and how to make it like as not harmful as as possible, either through defense, or maybe there’s an argument for writing the software themselves. If it is inevitable, and you know, that this is happening and making it democratized, then. That would be my take.

Hasu 1:59:06
That’s, yeah, I think that’s a very sensitible take, and to Flashbots credit, after a few days, I mean, at least behind the scenes they’ve started really to ramp up, I think the effort around finding solutions. You know, they’ve started work on gathering information about if reorgs are happening today, at the margin, you know, the reorg dashboard, and you know, they have had several meetings, public meetings about possible countermeasures and you know, the position that they should take on this. So, even though I would say like the initial reaction was far from perfect, I think they are now on the right track, at least I hope so.

MEV Senpai 1:59:55
Agreed.

Hasu 1:59:56
Okay. Then let’s let’s put a tie on that. And move to a slightly more optimistic and final topic. Sort of, I like this idea of, sort of the future of MEV. And starting out, you mentioned you’re using Flashbots. But as a searcher you’re also submitting to several other relays. Can you talk about sort of what are some of the top relays that you work with and that people should know about?

MEV Senpai 2:00:30
So I submit to Flashbots, that’s first, like you said, I also submit to Archer DAO’s relay. And they also run Archerswap, which we mentioned for MEV protection. And then I also submit to BloXroute. BloXroute I think works slightly different than the other relays, I think that’s the best way to describe BloXroute? I think they are a lot more mindful about direct connections to miners and latency. And so if, if that’s important to strategies, then you should be also sending to BloXroute. And Archer DAO, I actually haven’t verified this, but they claimed to have some percentage of hashrate, which is exclusive and different from the miners that Flashbots supports. And so I just have better coverage on average of the blocks that my bundles will be included in. And then lastly, I also have direct-to-miner relays, so I submit some bundles directly to a set of miners that like we have a pretty high trust relationship, I don’t DDoS them, they take my bundles directly and I want dox those miners, I don’t think they would like that.

Hasu 2:01:47
Do you, if you have a bundle, do you submitted – you mentioned like getting high coverage? Do you submit it to all relays, all the time?

MEV Senpai 2:01:55
It depends on my bundle. So if I’m doing something long tail, I probably won’t submit it to Flashbots. For the reason that I said before of like all of the sudden it’s under this giant spotlight and it’s like pretty easy to see in the Flashbots API. So I’ll submit it to Archer DAO, BloXroute and direct-to-miner. And like there’s – do I leak this alpha, do I not? I’ll leave a crumb here for smart future searchers…

Hasu 2:02:23
When in doubt… we have a responsibility here to water our listeners.

MEV Senpai 2:02:28
So here’s a crumb that your smart listeners can pick up on is at least direct-to-miner and BloXroute as relays they have different properties than the Flashbots relay does. And it enables you to do different types of strategies, that the way that Flashbots works isn’t possible. There are some long tail strategies which just are not possible to do through the Flashbots relay that you need these other kinds of relays for. And of course, I don’t submit those to the Flashbots relay.

Hasu 2:03:05
Interesting. I see, I didn’t pick up on the crumb, I will hopefully listening back to it.

MEV Senpai 2:03:12
I hope you don’t this is like my livelihood as a searcher.

Hasu 2:03:17
Okay, yes then. Understood. Okay.

MEV Senpai 2:03:21
You can included that I said it, that’s fine.

Hasu 2:03:23
As long as I don’t become the MEV Intern, there’s probably no, probably no risk of me picking up on it. Okay. Um, you know, in the MEV WTF conference. I also had a presentation on, you know, the future of MEV. And, you know, I said, well apart from some obvious things like, Hey, we should minimize MEV, where we can, what we can minimize we should democratize. I was like, I was probably the most hopeful person at the entire conference. I felt so, about our power to minimize MEV, like everybody else was saying, you know, it’s completely inevitable, like, we have no chance. We have to, like use fair ordering or whatever, right? And as you said, this stuff doesn’t serve anything, right, it just, you know, gifts, basically the MEV to the sequencer, and then hopes that they don’t act on the incentive, which still exists. But one way that we have already started to, you know, effectively, completely, like mitigate MEV is via mempool segregation. So instead of one mempool, you mentioned at least four different relays that you use, and these relays all have an incentive to bid for your order flow that you submit as a searcher, right? So who’s actually in the privileged position here, like if there’s one mempool then you have many searches, and by searcher it can be anyone like not even just searchers users, right? You have many users bidding for inclusion in the one mempool. And they’re in intense competition with each other, and that’s why miners capture all the MEV. But what if there’s one user and many mempools? Right? Doesn’t that sort of change the whole dynamic of who competes with whom and who gets to capture the movie. And like you said, in our pre-discussion to this conversation, you said something very interesting. And I hope it’s fine if I sort of quote you on this, you said that you’re basically bidding to receive private transaction flow from certain wallets, or applications.

MEV Senpai 2:05:53
So this is something that isn’t in place now, but I’m in discussions and like these kind of relationships are happening with different either wallets or applications in the ecosystem. Yeah, that is, that is true, I do offer my arbitrage services. And the way that that works is, if I get sent a transaction from these other wallets or applications, I will look to see if I can arbitrage the user in their wake and kick back some amount of the profits to the user in order to give them a better execution price. Or maybe to pay for gas or something like that.

Hasu 2:06:36
Right. This is sort of what like, BloXroute’s sort of, backrunme.com does. And I think some other exchanges, are also thinking about this, in order to make it cheaper for users to trade on the individual exchange, rather than using an aggregator. Because if you trade on Uniswap or Sushiswap, like most of the time, you’re actually making a big mistake, you should be using an aggregator who fills your order across many pools, but if you’re using a single exchange, a single market then you create a backrun opportunity. And if you just publish your transaction to the public mempool, then you give away this opportunity like you gave away the MEV for free. But if you take the same transaction, and say, Hey, here’s this transaction, it creates this amount of MEV and have different searches or miners, doesn’t matter, bid for who gets to mine this transaction and fill the arbitrage opportunity, the backrun opportunity, then all of a sudden, the user can capture most of the opportunity.

MEV Senpai 2:07:45
I totally agree. And circle back to that comment that Phil made about different protocols either on the base layer, like a fair ordering system, to replace the way that transactions are done for Ethereum, or these arbitrage-me, backrun-me games that you’re playing, they are negotiating the terms on which MEV is extracted. And they are negotiating them in better favor of the end user.

Hasu 2:08:16
Yeah.

MEV Senpai 2:08:17
You’re just sort of changing the rules of the game in a systematic way that benefits the user and I think what you’re hinting at here that, like the party in the privileged position to extract MEV doesn’t necessarily have to be miners. And there are all sorts of structures like private mempools, that can help users or other actors in the system, maybe a DAO or a protocol, capture that MEV instead. And I think it’s a super under-explored design space today.

Hasu 2:08:46
Yeah, exactly. So the basically that the protocol can kickback or the wallet can kickback a lot of the MEV to the user, because there they are starting to realize that they are actually in the privileged position to extract it. Right? So one quote from our conversation we had earlier is, and this is also a citation, I think, from the Flashbots 2.0 paper – is that miners are in a privileged position to extract this value and that’s why it’s called MEV, right, because the endgame is for miners to extract it. But I think what we are learning today is that this is not true. It’s simply not true, like this has always been wrong. And basically the person who submits the transaction, they are in a dominant position to extract the MEV because they get to choose who to give it to right? As long as they don’t blindly give it away as long as they negotiate who gets it, their unpublished transaction has financial value and they are the one like if they do it right, then they are the one who can extract that value.

MEV Senpai 2:09:54
Agreed, and this is why you see the Flashbots people call it maximal extractable instead of miner extractable value. Like other, there are many actors that are in privileged positions to capture some value. Although, at the end, I do agree that users are in the ultimate position to choose where their transaction flow goes. But you need to have either wallets or dapps that are set up such that they like have that negotiating power at all. I think we’re just beginning to think about this and you know, wallets, dapps, other parties are just beginning to build around this. I think in Ethereum, like a year ago, users didn’t really have any ability to negotiate or to capture the MEV themselves. So if those options exist, I would agree with your argument. But they need to and we need to build MEV-aware systems first.

Hasu 2:10:51
Yes, exactly. Yes, so as a user, who is educated, who knows how MEV works, and how to capture it, like you can use, I would argue, I would posit that you can use DeFi today, while causing zero MEV basically, almost zero leakage to miners. And I think the fact that this is possible for one educated user proves that it will be possible at scale. That’s my thesis to end this conversation.

MEV Senpai 2:11:25
Do you think that will always hold? Like, is there no condition under which a wallet decides to do something? Yeah, maybe there’s an edge case but since like a wallet is an iterative game in the long term, you would think not? Maybe, maybe they don’t do something to screw you over, but I’m not sure that I fully agree that there is no MEV in that transaction, even for the most educated user possible, but it’s provacative at least.

Hasu 2:11:51
Oh, yeah. Yeah, let’s the people talk about it. Okay. I’m happy to be proven wrong. I agree it’s a bold thesis. Perfect to end on this. So, MEV Senpai, this was the most fun conversation that I’ve had in a few months. So thank you very much. I’ve had immense fun today.

Thank you so much. Likewise, Hasu.

Take care.

MEV Senpai 2:12:20
Take care.

Other episodes

Share this post

Share on twitter
Twitter
Share on facebook
Facebook
Share on linkedin
LinkedIn
Share on reddit
Reddit
Share on email
Email

Leave a Reply

Further reading

Bitcoin and the intolerant minority

The concept of the intolerant minority is frequently misapplied in Bitcoin. Bitcoin is less defended by an intolerant minority than it defends against an intolerant minority.