Don't let your friends do MEV
ETHCC 7 · 8 Jul 2024 · 22:10
Marius van der Wijden of the Geth team argues that MEV infrastructure makes Ethereum more brittle. He describes the chain from validators through MEV-Boost and relays to builders, noting centralization among a few builders and relays, private order flow and timing games that cause missed slots. He recounts two relay incidents he describes, in February and March, where bad blocks were produced. He proposes inclusion lists and enshrined proposer-builder separation, urges running your own node and building your own blocks, and suggests falling back to a local block when the MEV payout is small.
Speakers
Topics
From ETHCC 7, hosted by Ethereum France.
Transcript
Okay, we're gonna get started. This is Marius from Geth, and he's gonna talk to you about MEV. Yes. Uh thank you guys for coming. Um don't let your friends do math. Uh how Ethereum infrastructure uh how the MEV infrastructure makes Ethereum more brittle. Um I'm going to talk to you a bit about um MEV and the MEV infrastructure. And in order to get started, we should probably discuss what the MEV infrastructure actually is. So this is kind of like a sample picture of what's happening.
Usually you you run a validator and you're connected either directly or via meth boost to one relay or multiple relays. Um those relays are connected to builders, and the builders are uh connected to searchers. These entities might be all the same, they might be different entities, and um it's it's kind of a mess. Um and I want to convince you today that this is not great.
Um not it okay. I I I don't really want to convince you that MEV is not great. Uh um, which it isn't in my in my opinion. There might be types of MEV that are okay. But I much rather want to convince you that we are running a lot of infrastructure, that there's a lot of things running on your node and maybe on other people machines that you don't have any access to, that you don't know what's running there, and that might be security or that is security critical to Ethereum as a whole. And here we we have some pretty nice um overview from MathBoost.pix uh where you can see the different the on the on the right side you see the big um staking pools in the middle um you can see the um the relays and on the left you see the builders and you you can see on this like there's some centralization going on, right?
Uh we have a few relays that uh connect the the builders to the to this to the stakers uh to the validators and if you look closely into who is actually building the blocks you will see that there are a bunch of names uh the same because we have a bunch of big builders that are really really good at um at building uh at searching for MEV opportunities and building blocks, and um those make more profit than others. So if you're really good at extracting MEV, you make a lot of profit.
Um but that also means like you can invest more into infrastructure to be even better uh at MEV. And so it becomes a centralizing force on the network. And at some point, relays introduced started introducing optimistic submissions and optimistic submissions. Kind of, I don't know if the if the if the workflow is is kind of if you guys understand the workflow. But the idea is the validator asks the relay for a block and says I want the best block, and the relay then gets a bunch of blocks from different builders from different searches, and the relay will pick the best block for you and send it to you via via MEV boost.
But at some point relays allowed for optimistic submissions. But as we will see, this was also not really happening. And the idea is that the proposer that produced a bad block because they're missing out on the execution layer rewards, they should be compensated by the relay.
Builders have started opening up RPCs where you can submit transactions to them. And everyone can see the transactions, and it kind of levels the playing field for MEV extractors because they are looking into the public pool, they see everyone has kind of the same view of the public pool. But with private order flow, there's a bunch of transactions that never make it to the pub public mempool.
And having access to that gives you a huge advantage because you can extract MEV from it. But this 10% also includes transactions that are actually extracting MEV. So this is not only the juicy MEV transactions, but it's also already transactions that are extracting the MEV. Yeah, but in the future this can lead to a lot of centralization because people will just give up their MEV by going through some of these private relays, and the people who are controlling the private order flow or who get the butt uh the most amount of order flow, for example uh big RPC providers like Infura, they have an outsized uh advantage over everyone else in extracting MEV.
And um now let's discuss some of the issues why this is uh why this is actually bad. And um there are some timing games. Um so the idea behind timing games is like you have a certain time in the slot where you need to propose your block. And the longer you wait, the higher your chances of getting more well-paying transactions. And um we've seen that uh validators have started playing these timing games. Um for example, you can see the bits selected by Coinbase are roughly one trans uh one second later into the slot than the bits that are selected by solo stakers, uh which uh which increases the profitability of them.
Um but the problem for the network, which is kind of fine. The problem is if you select uh a bit way too uh way too um late in the slot, uh then it might not get you might not get the block out in time to the network. And um this happens uh more and more um that we're seeing uh missed slots um because people are playing these timing games. Um and another issue is that uh big validators can can play these timing games better because they have a bigger the higher chance of getting a block um uh than small validators and so for small validator it's it's very important to get the block out in time because otherwise they will uh lose on like a high percentage of their their rewards but if you have a big validator um and you get the block like you're missing one block um then it's only like a small percentage of your rewards and that will be offset by the the higher rewards that you get for for for sending uh sending blocks later um yeah as I said the problem for the network is actually that we are missing slots because people are playing stupid games um and then there's some incidents uh that I wanted to talk about uh on February 6th uh we had nine bad blocks proposed by blocks route and uh the issue is basically what I discussed in the what we talked about in the optimistic submission uh one um the blocks route relay optimistically submitted the the the block to the to the validator and uh didn't really verify it and uh the builder sh itself should have been banned after the first block that they um the the first first bad bad block that they um uh that they proposed um but the banning code wasn't working properly and uh because it had too much too many false positives uh so it was just banning people left and right um and so they decided, okay, let's let's just get rid of it and um not do it.
And the problem is the problem is like we're seeing bad blocks on the network. So it's it's like a huge issue for the network itself. And um and in this incidence, you you can kind of see like there is some bug in some software that is that is not a not the client, it's not the node, it's not even MEV boost, it's some relay software somewhere, um, or some some uh builder software that has the bug. The relay uh the the um the relay software has a bug, so it's not banning it properly, and uh we are having bad blocks on the network.
So um and all of the software that I'm talking about is it's not open. It's not open source, it's not being audited by us, it's not being it's not being tested properly. Um it's not uh when we when we do hard forks, uh we usually try to test as much software on them as as we can. Um but uh these these uh builders and relays uh they're not testing on the test nets. Um they uh they're like they're usually um a few months behind uh what's going on in core development. And so um yeah, it's just not a great uh not a great state to be it.
Um another incident, the March thirteenth incident, uh it was another incident by blocks route. Um I don't want to like like harp on them, but um because uh like other relays also had uh these issues. It's just blocks route um has a has a lot of uh is responsible for a lot of blocks so issues um really show up in uh if if they have them and um they are also very good at um at like going through them and kind of discussing what's going on and and writing a post mortem um otherwise we might like with other relays we we have bad blocks and we don't know what's happening and no one ever checks um so in this uh in this incident um they set uh the commitments in the block um for the blob transactions so blob transactions have the the blob and the commitment like a hash ish uh the kcg commitment of the of the blob is put into the block and uh what they did in the in the relay was just put the same commitment for all transactions um and in this incident 16 slots were missed uh 3.12 uh 2 e 2 point 31 e slost and um yeah so the bad blocks were mined so the slot was not technically missed so the builders were not punished for it um so that that's another problem um they they again were bad blocks, but uh they weren't banned, and it went on for way too long uh in my opinion and um yeah, so and then and another thing that I actually recently, because I I got so fed up with this whole uh MEV ecosystem, I started looking into MEV boost and it's a horrible piece of software.
Don't ever look into it. It's it's not great. Um and um I actually found that before then uh before Dan Kun there was a bug that you could answer as a like as a competing relay, you could answer to another relays um uh query and just uh give a bad block for another relay. So there was a bug there where one relay could kind of denial of service the other relay. Um so yeah, it's fortunately fixed in the newest version, but um it's been there for the whole time before before the last hardwork.
Um I don't have that much time left, but let's quickly talk about uh um solutions. Um one solution or one part part solution would be inclusion lists, and inclusion lists kind of have have two two uh two ways of thinking about it. Uh one is the carrot and the other one is the stick. Um the carrot way of uh of doing inclusion lists is basically as a validator, you say these are the transactions that I want included in my block. Um, and then people can bid on it and say, okay, these inclusion uh these these transactions are going to be in uh I'm I'm going to include them and bid on the block.
Um, or they can say um I don't want to include these transactions for whatever reason, I'm not going to bid on the block. So this is like the nice way of doing it. And the stick version is validators uh specified transactions that need to be included in the block, either in this one or in the next one, and this forces the builders to build block with blocks with these transactions. So the builders are forced to build or they will never build any block ever again, basically. Um and blocks that do not include the transactions are invalid.
Um there are yeah, it's uh it's still a bit researchy because there were some problems with um account abstraction uh where you can invalidate uh where one account can invalidate another transaction originating from a different account. Um and so uh research on inclusion lists uh was kind of um stopped for a while, uh but we recently uh picked it back up again, and uh there might be some uh some answers to some of the problems that we that we had. Uh another one as uh Marek already um said in the in the previous presentation is EPBS, um enshrining the uh builder proposal separation in the protocol, uh which would get rid of the trusted relay.
Um there are a lot of proposals being discussed there that might or might not solve everything. Um it's very active research. So if you're interested in this kind of things, get involved. There's an EPBS channel on the ETHRD Discord that you can just join, or you can send Potos a DM. He will he will love for and he loves anyone who gets into this kind of stuff. And yeah, some practical things to do.
Run your own node. If you're sitting here, there's a high chance you are part of ETH staker or you are a solo staker, so you're already running your own node. If you're running your own node, I would encourage you to build your own blocks. We will at least for the guest team, we decided we want to we want to support solo building block building as long as possible. Hopefully forever. This ignores blocks that come from a relay that have like a like a low MEV payout.
And so you will fall back to your local block that your node has been building for you. Once inclusion lists are available, opt in and get involved in building this these kinds of things. Uh it's it's uh a lot of parts of this is uh very active research and we'll uh people we need people uh really looking into it and and building the these these cool things. And don't let your friends do LSD either. Um drugs are bad uh people and uh so uh yeah it's uh LS LSDs or LSTs um have other problems um that also impact like how nice the chain works and so yeah don't do it.
Um yeah that that was it. Thank you very much for listening. I think we we have time for maybe one question. I'm I'm full of those. Um you mentioned ten percent private. I think yesterday we heard it's now thirty percent because of private um option in some wallet um MetaMask I think. That's that's really great.
So the the the slides are like like four or five months old, so yeah, I should have updated them. Yeah. It's great. It's getting better, it's getting better. Yeah, I'm feeling really I'm feeling really bullish on the network. Thank you. Thank you for that. All right. I just have one quick question. Do you have a um recommended min bed flag size value? Uh I don't know. I think anything below one ETH is like kind of like why are you even even doing MEV then? So like I would I would I would just fall fall to fall back to your local block uh below one ETH.
Uh I don't know. I I would like I would only do MEV for like the really really juicy like 150 MEV uh ETH MVV blocks. Um so yeah like of course there's a trade-off between like how much money um how much money are you willing to to lose or to forgo for the decentralization of the network. Um and that's it kind of depends on you. But I don't know if you if you do like usually the MEV blocks give you like 0.2 ETH or something, um more than your locally built block. And at that point I would say, I don't know.
That's if you have 32 ETH, then I would just forgo that for the security of the network. Cool, thank you so much. Can we get another round of applause for my um and two other things while we're we have a five-minute break right now?
Related talks
- Talk | A Deep Dive into Go Ethereum
- How MEV infrastructure makes Ethereum more brittle | Marius van der Wijden, Geth | ETHTaipei 2024
- How to win MEV and trades on ethereum post merge with Eyal Markovich
- MEV Attacks and how you could mitigate them with Hyperledger Besu
- The Merge: Perspective of the Execution Layer | Merge & Scalability Summit
- Tomasz Stanczak & Marcello Bardus - The MEV in Nethermind in Eth2
- What's new in Eth2 - 01 July 2022 with Ben Edgington and superphiz
- Ethereum Client Diversity, OFAC compliance down - The Daily Gwei Refuel #530 - Ethereum Updates
- Solo staker report, Dappnode supports Rocket Pool - The Daily Gwei Refuel #593 - Ethereum Updates