MEV and Ethereum - Alex Stokes
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
Speaker
Join Alex Stokes for a talk titled "MEV and Ethereum". Thank you to everyone who joined our first in-person appearance in 2023! We are incredibly grateful for the support and contributions of all the hackers, tech mentors, judges, partners, and volunteers who made the ETHGlobal Tokyo event such a huge success. Without your dedication and expertise, this event would not have been possible. We would also like to extend a special thank you to the attendees who traveled from over 59 countries to participate in the event. Your presence and involvement made it a truly international weekend, and we are thrilled to have had such a diverse group of participants. With over 1070 hackers it was a pleasure walking into Toranomon Hills and seeing such a talented pool of individuals. With over 22 workshops, 9 talks, and over $375,000 USD in prizes we hope you enjoyed the weekend full of hacking, meeting all our incredible partners and learning from enthusiasts of the space. We are proud to have welcomed over 35% of attendees who were new to Web3. We hope this event sparked your interest in the world of blockchain and provided you with valuable insights and knowledge. We cannot express enough gratitude to everyone who contributed to the success of ETHGlobal Tokyo. We are already looking forward to the next event and hope to see you all there! 🎉🚀 ----------------- Follow us: https://twitter.com/ETHGlobal Check us out: https://ethglobal.com Email us at: hello@ethglobal.com
Transcript
foreign [Music] we'll go ahead and get started uh this talk is about Mev and ethereum so either you probably already know what Mev is uh or if you don't that's okay we'll cover and give like a small example and then I'm going to talk about a lot of stuff uh just right outside the protocol and it's interplay between say like the actual core protocol and all the applications we've got on top of it it turns out at least there's some like pretty wild stuff uh so yeah what does this thing Mev again many of you have probably heard of it uh if not so you know it sort of used to be an acronym and kind of still is originally it stood for minor extractable value and the idea was you know we have miners of the protocol they're the ones who are like Germany consensus and making the blocks and it turns out that when you go to make a box add a block in the chain uh this minor actor had this like complete freedom to take whatever attraction uh transactions they saw in the mint pool and put them into a block I really chose right and it turns out that when you have this freedom to have uh you know the ability to include transactions exclude transactions or reorder them uh it has implications especially for blockchains like ethereum which have this like very rich day plus so you know now we're in this like proof of stick World we've gotten rid of these miners so now we still have this acronym and people have tried to come up with different names like maximum extractable value or something like this either way we can just call it a maybe um and yeah it's again this this ability of a Bach producer to choose the exact sequence of transactions if you're familiar with like Layer Two stuff I think there have been some talks you know even throughout this weekend about that everyone talks about the sequencer actor and it's again this this uh agent in these protocols that's selecting how these transactions actually are sequenced in the chain and like the history that we all agree to so you know how could it really matter maybe if you just think about it like let's just say we have a few like ether sins from like you to me to you too then like you know why does it really matter what are they happening um but here's an example where the matter orders a lot so uh you'll hear this a lot in this like niche of the space called sandwiches and the idea is that you have a transaction some like quote victim transaction another transaction after and so this is where the sequence is important so the places comes up is with say uniswap at a centralized exchange uh you have a pool affiliation tokens say ethos DC and eth and let's just say for example the price in this pool is 1656. uh meaning that many like usdc tokens to get one Heath back uh and that's basically what you want to do you're like okay this looks good to me so I tell you to swap hey I want to do this uh along with that I have to tell you to swap hey uh there's this other thing called a slippage that I'll accept and here it's like half a percent uh the idea is that by the time I look at the pool and then I'm able to transact against it the price may have changed a little bit and this is just because like there's this like fundamental discrepancy between when I see the chain and you know when I can interact with it because again we have this like open professionals network uh it's changing all the time honestly and all sort of things are happening so in order to do this and use uniswap you need to you know have some some tolerance here is called the slippage and for example saying half a percent means you know I would like to only pay like the 1656 but worst case I'd pay have to half a percent more right the 1664 number is there uh I was looking for a laser pointer but either way uh this number over here and yeah you know sort of our happy default case we're the only ones interacting with you know Swap and so we get that price and we're happy the problem though is that kind of as I laid out there's time in between like when I might see this price and when I'm able to actually execute the trade right so like let's say everyone in this room wants to make the same trade but the way that these blockchains work today is like there's a single sequence where like we have to go in some serial order and so you know that's part of this problem is having this block producer figure out what that sequence is so let's say then uh you know half of us trade before we can you know give it to this price that I had here and so what that means is that the the price in the pool will move against us so now we can see where this idea of an attack comes from because what you do is basically you see a trade with a lot of slippage you say okay I went to basically front running so I get in front of it and I drive up the price uh against the user up to their slip Edge right so if this uh transaction accepted half a percent then basically I drive the price up you know just under the 1664. and then their trade will still go through but at the worst possible execution and then as an attacker I can turn around and really sell the tokens I just bought at the higher price and I'm guaranteed profit uh yeah so you do this front run victim transaction back run that's the sandwich and yeah so again like the reason why this is here in the first place is because otherwise you like couldn't use uniswap like you basically have to say you know not having slippage is kind of identical to setting to zero but if you go do that almost certainly you're you know almost all your trades if not all of them are just going to to revert they won't go through because again it's like too precise between when you make the trade and when the you know trade can be settled that being said it also opens up this Mev situation which you know is in this situation we like got a worse execution so that's not good so what do we do about that um and this is just one example there's many of these basically you know I'd say pretty much every on-chain interaction like you're supposed to some sort of Mev uh then the question becomes what do you do about it and that's actually a very uh active r d topic as we'll kind of gets into the rest of this talk it opens up this whole design space for everywhere you know ways of thinking about how we design the protocol both consistency execution layers how we think about applications how they interact with each other layer one layer two the the whole the whole Space honestly um yeah so that's like it may be kind of broadly and we'll kind of zoom in a bit to like ethereum specifically and this is more or less the picture today uh this is the transaction supply chain as we've come to call it uh put together first by the ghost up and we see sort of these like boxes with these like uh types of actors they'll have very like important and different roles going from I'm a user who wants to like make a transaction say you know I want to trade some tokens all the way to a validator and proof of stick ethereum or they're actually the ones making the box that determine you know what happens on chain so we'll just walk through you have a user they have some intents like again I want to swap my usdc for Heath uh they usually then we'll use like wallet software metamask something like this uh and that will Author a transaction transactions go into like a public or even these days private pool and there we have entities called Searchers and Searchers jobs are basically to like find these like different strategies they have so for example like a sandwich strategy is one type uh you could have a different one for example you could specialize in liquidations you could say oh like here's a CDP and maker and uh you know it's suddenly undercoateralized I need to go liquidated for like the health of the system and yeah side note uh that should just show us that like not all Mev is necessarily bad there's like good Mev because it keeps our protocols healthy um and kind of points this bigger picture of having this whole design space of again just programming with these types of incentives so Searchers are the ones who are uh you know collecting extracting this Mev depending on how you look at it or the example uh the way they do this is having bundles and so a bundle is again just like a you know stack of transactions again with our 702 sample you would have my trade if I'm being sandwiched the front run in the background and that's like the bundle that then goes to a builder Builders are kind of like Searchers they basically specialize in just making complete box versus having like one or two specific Mev strategies that they specialize in so Builders build blocks which they then need to hand off to validators already this picture is getting more complicated uh this diagram is put out around the time the merge for proof of a stick ethereum uh I updated this today actually because it's uh again already getting a little more complex you've probably heard of erc4337 this is a abstraction uh it's been a pretty hot topic the idea here is that rather than me as a user go to make sort of raw ethereum transactions that go on chain I can now have this thing called a user operation a user up and the idea is that uh rather than like use the chain directly I can abstract what I want to do and basically use the full sort of power of the VM to determine how my intent or operation again the the language here gets a little blurry but I want to do something and then now I have the full power of the VM to like program how that thing can happen um yeah so now you have users talking to wallets they might make transactions they could also then for example if you're if you have a smart contract wallet they'd make these user Ops there's now another actor called a bundler in the 437 world that's then collecting the user operations they make their own bundles for 37 bundles which go into transactions that then would go to builders or validators there's a bunch of other arrows just not even on here it quickly gets very airy uh but yeah point is things are getting uh complicated quickly and it keeps going so uh 4327 adds like something to the picture there's uh I think a pretty Frontier research uh sort of Direction right now I was thinking about an order flow auction so you know if you have this picture where users are like trying to use the chain and there's already all this like infrastructure infrastructure in the middle people want to think about ways to like auction off these these have been essentially rights to like uh execute these different user intents and you know one way you thought about this is just you know literally having an auction uh now we have another actor here like a solver an OFA if you've heard of Cal Swap this is kind of essentially the idea um yeah and as you can probably guess you know it just keeps getting more and more complicated every day of course you know this is just that one layer of the stack you could have this at Layer Two so you have to think about all this in that context uh then basically for each different sort of box or like column you could have centralized or decentralized components so yeah it quickly gets complicated so uh there's a lot going on and yeah the bottom line is uh there's almost this like intrinsic thing happening when we go to use blockchains the way we make them today and like that thing just like naturally has this consequence of Mev and it turns out that you know some of you kind of is always there and moreover it's this like centralizing force this is where it starts to be very problematic especially for our core protocol uh you know it's very important for ethereum to be decentralized and like have all these properties that follow from that and the thing with Mev is that again it's directly sort of opposing that decentralization goal the reason why is because if I'm over here and like basically any of these players here uh if I'm a little bit better I like using this Mev as someone else's disadvantage in this picture then I could basically make this flywheel or now I just get better and better and better I just like have reasons either because I can like directly directly subsidize usage or something like this but basically that can become more and more of a like entrenched established player here and what that means is now it's harming the centralization of like this whole network so that's not good and recognizing this we can say okay well yeah this is like Missy chaotic picture uh What can we directly do is like we can make sure that like the core protocol itself is actually you know retain some decentralization and the way we're going to do that is basically just putting this firewall in place between the validators of the core protocol and all this other stuff this is what we call PBS proposer Builder separation again if you follow this you've probably heard that term thrown around and again the idea is basically saying okay can we think about how to remove these centralization Tendencies from this whole picture uh at least from this one part of the stack what this picture does really is just push them up the stack and so we haven't really solved the problem just moved it somewhere else but we could at least keep this part good and that gives us more breathing room to like think about this other part right so that being said uh I haven't even really said what how Poss work I've just claimed it's the thing we can do and it turns out there's like a very large design space around it and we also do want to be thoughtful about how we actually roll it out especially if we like enshrine anything in the core protocol so that means that a summer's foreign PBS is probably some years away uh at least it's not anything could happen you know super soon and so what can we do in the meantime we can essentially do off-chain PBS and you've heard of map boost or if you have then that's exactly what map boost attempts to do is Implement PBS in this off-chain fashion uh yeah again this is like all different talk but it's just like calling out some of these different parts again of like looking at this picture and saying if there's all these different players you know they're gonna you know some of them today are relatively immature because they kind of have just gone onto the scene so the mermaid terrain and you know like the Builder market and search or Mercury I think are already quite sophisticated um and it's only probably gonna get like more sophisticated from here so there's all sorts of things you can do uh you know you can think about more on the user part of things like can we actually rather than just like leak the Mev to like other parts of the stack can we capture it and actually internalize it back to the user so like for example if I make my unisoft trade is there some way to like you know capture that slippage value that otherwise I would have left to someone else um and you could imagine that even flying directly back to me in the form of rebate so it's almost like I get paid to trade that's pretty nice uh 437 is happening that opens again a whole other layer to this uh and then generally you can ask these same questions like for applications broadly the protocol broadly can we minimize muv can we capture it to use it somehow um all sorts of fun things like this so uh the rest of this will be focused on PBS and what that means for the core protocol um today that means Med boost tomorrow some sort of enshrined PBS and let's look at what that is so in case you haven't heard what is my Boost it's an opt-in implementation of PBS uh stewarded by flashbots they're like a big um Mev r d firm in the space again if you've heard of a movie you've probably heard of flashbots along with many other researchers and developers in the ethereum community uh there's a link here if you want to just check out a place to get started and okay so we'll step back a second and say like how are we going to actually implement this PBS thing um if we want to like build math boost to do this like what are we really saying like at the highest level of abstraction we have proposers the ones these validators who are actually minting blocks of the chain we have Builders who are doing all this other stuff Upstream of that and the core problem here is that proposers want to like sell their box base right they wanted to sell like what actually happens in this uh you know the execution part of their block which is this little question mark thing down here and uh Builders ultimately they want to like buy that from them right so or do we have this Market we have people who want to sell something if you want to buy something uh markets are a great way to like structure that problem a solution to that problem and so yeah what I try to do this graphic is like have a chain of blocks so this is the blockchain uh if you are familiar with this part there's like a consensus layer an execution layer after the merge right so there's now kind of two parts here the consensus block is the loop heart inside we have this execution payload and I try to communicate like the fact that some execution payloads have more or less mov buy this like golden border here and what this means is that you have this channel box you come to the next block in the chain the proposer wants to build and the question is like well what do they do here this is where they could then think about Outsourcing that to one of these Builder actors so now we have a network of blog Builders again you want to like buy block space a network of proposers who want to cell block space the validators here and yeah the question is like how do we connect them and that's essentially what webos does is provide this this Market this abstraction for them to do so um yeah it's kind of like a bit overloaded because we use it to refer like the whole thing so it's like this network to like structure this exchange I just described it's also like all the software to actually do the thing so ultimately like if you are a solo sticker at home you might run about boost that means you have this like sidecar thing this middleware that sits next to your setup and facilitates this Mev buying and selling and ultimately what it does is just construct this again Rendezvous so it like it lets for each slot that a proposer has then connect to this network of Builders and says okay you know as a block Builder I can bid for uh this this block and you know it's a way for me to tell you what my bid is and yeah the naive thing here is you basically as a builder just send your block over the pressure says great I'll pick like the highest bid for example and carry on so that's basically what this says right it's just like if I don't worry about any sort of attacks or anything I can do exactly that I can imagine like as a proposer I just know where all the builders are because they told me at a time every slot I say hey give me your best block they do so if I'm Revenue maximizing I'll pick the most valuable one they'll want the highest bid select that one and move on so there's a catch though which is that uh it can't be that simple so ethereum right we want to have again this very decentralized broad validator set um that could even mean you have like you know quite Anonymous actors uh who actually might try to like group this mechanism I mean they might try to like uh do this to like take advantage of a builder something like this so because we do want to support you know all sort of uh types of validators that show up uh we don't want to have some like trusted like white list for example or something like this to say you can access this network we want to have it such that anyone can use it and this leads to a problem because the way this usually works is okay as a builder I'm working with all the Searchers I was talking about searches would have then basically bid for inclusion in the block builders make a block they then have a bit to the proposer and usually that looks like some sort of like you know even just a neat send within the box to the proposer and you know it's a little bit less than the value of say what the Searchers bid that's like the Builder's compensation and again there's like a whole supply chain here so what happens though is as a validator I could just take the payload I'm given in the construction I've given so far I could just take the payload and I could say hey this is a great block you know but you're taking your like 10 share what if I just take that for myself uh which right now everything says sort of in plain text so I can see that and I can do so and that's what this is trying to demonstrate this Mev stealing where the honest exchange would be on the left you know this uh Builder I call Deb beef Cafe they get like some marginal sort of tip for their work the proposal maybe gets most of the value but that's okay the attack here is that the proposer says well actually I want all of it and in fact I'll just leave you none and that's not great um because again we needed to be we need the mechanism to have integrity on like both sides with pros and Builders otherwise no one will use it and we won't be able to have this nice like firewall thing to prevent this like centralization flywheel that I pointed out earlier so it's important that this is again how's Integrity it's a sound of construction that people actually want to use so we have this problem in most dealing well how are we going to fix it so again just like at a very high level you either uh only let trusted actors who like promise they're gonna say hey I'm never gonna do this ever TM you're the only honest actors uh play this game have access to this Market or you you know somehow change it such that they don't really have to give you a promise because they just simply can't do the the sort of attack in the first place and that's essentially you know what uh MAV boost does is it says okay we're going to add in this like additional running communication and have this sort of commit reveal game uh what that means is that as a builder I'm going to send over a commitment to the block and then the proser has to accept into mining fashion before I reveal the whole block and um yeah that I level that's what's happening here's a little cartoon of this so the the intuition is that I've made my payload as a builder but it's blinded somehow that's why I give the proposer uh it turns out that we can essentially use like the slashing security of the value Set uh so the proposer signs this they make their whole block that they would want to put on chain they can sign this and bind them to it up to a slashing penalty that then has given us proof to the Builder that the proposer has bound themselves to the Spock and once they've done that they know it's safe to reveal and so they reveal the unbinded block which the producer then proposes and actually Express the network so you can't steal the MVP and then just to make it clear the reason why is because uh the proposer has bound themselves again up slashing uh to use this specific this one specific block you know that includes the Builder payments and all that uh and it couldn't use any other one so this last bid though at the very end here where the Builder has to reveal the block we kind of have like the address the First Column and now have another which is that uh Builders now are trusted to reveal the block and if they don't they could then grief proposers this is like a common theme of this PBS stuff is that you know there's a design and you like have some holes so you try to patch the hole and then there's like another hole somewhere else and it just uh goes back and forth but all that being said I called to hear this availability attack and the idea is that essentially I can like have you sign this thing but then I can just not give it to you and the reason that's the problem is because if I don't give you the full block well there's nothing for you to propose so then you just like you know lost on the chance to propose a little block so the current way we get around this is this actor called a relay and uh basically the relay is like this trusted party that is going to do a couple things they're going to make sure that like Builders and develop blocks they're going to like be this nice Rendezvous point for proposers and Builders and importantly they are going to ensure they're going to act as these like availability oracles they're guaranteeing that uh the payloads will be available if the proposer and holds up their part of the deal so now again we like Silo some of this trust and the relay but it means that then with respect to proposers and builders on either side of the abstraction they don't need to be trusted at all and yeah an important Point here is you have many competing relays so like it's not great to have this like centralized trusted components but you could have many of them and competition usually helps uh with a lot of the problems that you get from having any centralization in the first place so putting it all together this is kind of what it ends up looking like uh you have many Builders again there's like ideally lots of competition in this Builder market and that for example makes uh makes censorship type things harder because you know I could basically like undercut you as a competing Builder if I see you're doing something that is like censoring something like this relays to the same argument applies the more the merrier uh MAV boost is like in this picture these are like different to the block like the the blocks are these different software components so you have met this sitting there and it's for the validator orchestrations communication to like all these relays and then there in turn talking to all these Builders and this is the whole picture so now we'll look at some data uh again this design should put the merge uh to get ready for proof of stake ethereum and yeah these okay these actually UPS came from today so it's pretty recent uh this website mevboost.org is pretty cool it has like a lot of cool stats on there this is just from the header basically showing within the last 24 hours 80 of the network has used this thing which is like massive um is that like if anything this number is low simply because Chappelle just happened the the latest hard fork and so some operators haven't like updated their nodes completely but uh yeah usually the number is like much higher than this so it's a very important part of the network now uh it calls out flashbots dominance so flashbot says this this firm I pointed out um they used to have much higher dominance we'll get to that in second with these graphs at the bottom but uh so it's good to see that's pretty low in relative terms and yeah then we see this just counts how many relays have been active again we're at 10 and again the more the merrier here so looks pretty healthy um and again these are charts from MAV boost.pics another good website to call out and basically they're saying uh this is like the relay Market on the left and we see that it started originally with flashbots basically doing the whole thing uh and then over time other players entered the scene and particularly like the ultrasound relay this orange blob that's grown um has really stepped up and yeah agnostics in there you can look at the list bottom line is uh you already see the market is like having more interest starting to mature and that's really exciting then on the right here uh it's a similar story for Builders where again you see originally uh this this like big orange strip is flashbots and that was again the kind of bootstrap or seed the markets give other players time to come and like gain some of their share which you see with all the other colors coming out um and yeah I mean it could always be better but it's basically went from one player to now like many players so it's definitely turning in the right direction and just to like Drive the point home this was from March 20th uh so a few weeks ago and this is definitely an outlier but uh this was a payment for some Mev block of you know almost 700 Heath which was a bunch of money it's even more now uh this actually went into like the lighter pool uh so good for them but yeah I mean the point being is uh people are using this thing and uh it's you know quite serious so okay we had this problem uh we have this like solution for at least the short term of a boost and it seems to be working so like we're good right and uh no so basically uh we had again like I kind of called out the fact that we have this really actor and it's now trusted in this in this game and uh turns out that just like is is uh already showing some problems so for one we have censorship of the relays so a lot of the relays you know I showed you this uh picture over here with this like graph on the left maybe there's like 10 people here in the market a lot of them are essentially following uh various like legal uh mandates in their jurisdiction which uh you know they should but that being said what it implies here is that um some relays are straight up sensory and some transactions which really goes against this this idea at least of having layer one censorship resistance um this is a graph this is off mevwash.
info again I'm trying to share a lot of like Relic websites people have been looking at this stuff very deeply and medwatchtime dot info um this is showing uh which blocks are of fat compliance so this is like referring to uh this like legal ruling that a lot of people are following right now in the space and that being said you can see this like green blob has gotten much bigger so uh again to the extent that we need censorship resistance you know that's turning the right direction and yeah but it's kind of just like ultimately a uh consequence of this model that like this to happen in the first place so ideally we would like to maybe even remove the relay so that this is just not even a relevant concern uh again okay so I'll have to explain this this happened well I think two weeks ago sandwiched the Ripper there was like a pretty big boost attack or hack you might have heard about and really what happened was again sort of a flaw with this relay system and you know I'm not claiming this I've been trying PBS would have made this perfect but the fact that there's like again there's like 10 you know a small number of very centralized actors uh that are you know good targets uh honey pots we can say that doesn't help the problem so what happened um yeah so this is actually very clever so basically there is more or less a bug in the real implementation where when I go to this Exchange that I was trying to show way back here so uh the way we do this blinding is by sending over a header not the full block just a head of the block the proposer signs the header and that is then basically binding them to this particular payload and then uh they release the full block so basically but what's happening is that relays are not validating that this blue part was actually a valid block and so what that meant is that I could hand over a signature that would look valid for an invalid because this is block and then release the payload and the reason this is a problem is because now the relay actually doesn't have a valid block so they can't uh you know tell everyone else that the proposal already signed this thing and the proposer who's Rogue in the situation has the block they can pull off one of these nav stealing attacks this thing here and that's exactly what happened so and it was the reason this one was uh you know such a big deal was if anything just the size of it uh you know so there were other sandwich spots the sandwich attack I talked about the beginning there were severally Bots that were essentially um you know attacked with this thing and it was literally this map stealing so basically a proposer went rogue they tricked the relay and the way I just described they then got the the sort of unblinded payload that they could turn around and they could unbundle the bundles that's why we called it unbundling and the way that this worked is that to pull off these sandwich attacks these Searchers had to go and expose like a lot of liquidity uh to even have a profitable trade in the first place but that's assuming that as a sandwicher you know I'm the person who's both front running and back running what this validator did is they took the sandwiches took off one half of it and replaced themselves and basically what this meant is they could trick the bot into like being drained completely next is that's exactly what happened so this is one transaction from this block that was the attack block and again point being is you can see this the token trade uh for like 100 bucks worth of Stargate token the attacker got over five million dollars of raptis uh that's not what the Sandwich Spot meant to happen I promise you but uh this was possible because essentially these bundles that are supposed to be Atomic were were able to be exploited so you know that was fun the question is like what's next right so we've come to today we had this relay thing and it's not like maybe perfect and so then we could think about how to make it better more broadly we can say okay if we have this off chain PBS can we make it somehow like can we enshrine it can we bring some version of it on chain and Leverage The protocol to like improve some of these pain points that I pointed out and yeah like there's definitely a whole like but yeah there's a lot of research happening here a lot r d across the ethereum space there's sort of like uh immediate near and like longer term uh outlooks for for PBS so you know in the longer term we again want to go to relays we do some kind of enshrined PBS so what that means is taking like this boost thing I've discussed and kind of mapping into the protocol somehow um I think the leading sort of design that we have is from vitalik with this two slot PBS there's like a one slot variance two slots there's a couple different ideas here but basically the idea is take the members construction that we just looked at uh drop it directly in the protocol so you have like a bidding slot then you have a proposing slot also the proposer would select a bid uh then the Builder would reveal the next slot so you have this like two slot thing alternating and that is just going back and forth [Music] um next right so Barnaby Mano uh EF researcher he's written about this idea called Pepsi and the idea is okay you know we'll almost certainly need something like PBS long term and the question is if we just take like this boost idea even this like two slot PBS which is moving in that direction if we just take the auction today like is that the best we can do like it could be the case that we come up with like a better auction format or like way of thinking about the problem uh and it would not be great if we like ship something then ultimately uh realize that we should ship something much better so the idea that type c is basically just to abstract that away and so you rather than like have one particular auction just make it programmable in the same way that we have Smart contracts that are programmable and um yeah super cool uh there's some links here to E3 search which go into the ideas if you want to learn more point being yeah there's a lot of open sort of questions here a lot of exciting r d on the way like a little bit closer uh near term for PBS so yeah ultimately just want to like Harden this thing even with the ship off work last week or sorry uh I guess it just happened I'm losing track of time anyway uh with the show with the show off work that has happened uh I think there are even some like more minor things that happened and basically you know as as core devs of the protocol we went to like hardness as much as we can I think we just have to accept that even though we don't like some of the trade-offs that Mev boost makes today it's like something we're gonna have for like at least a year if not two or three or five like you know it's not clear how long we'll have this so we should definitely uh make it as secure as we can today along with that right in parallel we want to have like early explorations of a PBS spec so that we can iterate towards actually putting some into the core protocol um something that's kind of come up in the meantime actually observing the system being used is this idea of like latency games so uh the way to think about this uh we'll just look at this graph on the left here and basically it's showing like when I have a builder sitting in a bid uh how late into the slot so like the way the protocol works is like sort of cut up into these slots so there's like the clock of time and it's Cuts time up into slots which are 12 seconds and the question is now you know when I have a winning bid like how late in the slot does it arrive to say the relay or the proposer um and yeah what this is data showing is that basically the winning bids are kind of all pushed up against the end of the slot and the reason is why this makes sense is because you know if I pick the the highest bid just on value even just like the marginal transaction like that one more transaction that would pay me just like a few way and like priority fee would be enough to outbid someone else right all other things being equal and so what that means now is there's this like arms erased as a builder to like gather up all the transactions I can and put them into like the next block that I sent uh so this is happening it turns out that Mev like latency games like this are really bad because again they're very centralizing uh but again interesting to see like the data here this is something on the right where it's essentially showing the same plot are like the same idea just like as we go through the slot how valuable do blocks become and you can see it kind of just Trends straight up so the question now is if we want to like at least I mean yeah so there's actually a couple things here but one way to think about it is we want to make the plane field more even so like lowering barriers entry and one way to do that is basically remove these latency advantages entirely and there's been a recent line of work called optimistic relay which basically does this uh relays do a couple things one of them being validate the bids they get from Builders like these blocks coming in and you can imagine basically just trusting the Builder to like give you a valid block um it turns out even this like 200 milliseconds of validation time is like really important already in in this game so uh yeah really cool research there and that's kind of ongoing right now this was right after they rolled this out on the ultrasound relay so they've been leading the charge on this work you can see that like their winning share of of uh of slots here just like shot up and that was pretty directly just from this one change of rolling out this optimistic idea so pretty cool to see and then zoom in like way in just like immediately um yeah this sandwich slipper thing that I discussed obviously fixing that but already we're seeing it's basically pushing like the synchrony assumptions we're making to like their limits meaning that um the relays are now just doing even more work to make sure that like the sun bundling can happen and when they do that it means that blocks are essentially coming later and later against like these some deadlines we have in the network and what that means is that if you're too late that essentially uh the rest of the protocol like the rest of the valuers don't see a block for that slot it's like a missed slot and that's not good because basically it's like you could have made a block in the chain but you didn't um so that like you know is bad for everyone honestly um so yeah there's like some interesting consequences there something to look at for sure uh Shanghai just happened the hard Fork very exciting uh we have 444 coming up with select blob space Purdue dank Sharden a bunch of words you probably also heard this weekend so that's really cool um yeah there's a bunch of other ideas around like improving this model generally one of them being like externship resistance uh so there's like an idea of like inclusion list um yeah we can hear them more maybe in the questions if you want to hear more but point being there's there's a lot of different uh ways to think about improving that boost so uh how to contribute I'll run through this and wrap up so uh there's a lot of ways honestly um I'll just call it some repos if you want to contribute with more like engineering or like uh research here so there's slash box at the top uh both Med boost and the relay I've actually started an alternative implementation of like the previous two things uh in Russ so if you like rust check that out uh there are there are specs so basically like this core interaction let me go way back this coiner action here between Builder and proposer we have this Builder API for it I mean honestly yeah it's this uh okay went too far back but basically it's this blue line here like the idea is we just have a like minimal API for this interaction and then what that means is anything happening really on either side of it but especially Upstream of it can like it's free to do whatever and you just have to confirm the API and you still get all the benefits so that's pretty cool um that's in this Builder specs repo that I listed and yeah so there there's like I think a lot we want to do right now it's essentially just like an API spec um I think there's more we can do around specifying like honest Behavior AV writing testing uh uh from from that spec so check that out uh Hive is this like um yeah very impressive honestly uh testing framework let's say and for here we could add in these Mev components like they kind of have limited support right now but we could definitely add more and that would let us do like Indian testing of like this whole stack which would be really helpful and yeah if you want to contribute more like the research side of things there's research you've probably heard of I called off frontier.tech so Frontier research is like a research group coming up they are looking at Mev as well and you know just another place outside of flashbots or The Usual Suspects to look at uh there is a med boost Community call there's one a week from well Thursday so next week and yeah there's a link if you want to check that out this is my Twitter so DM me if you have more questions I'm happy to like direct you various places if you want to get involved so I know there's a lot but I think I might have time maybe for a few questions and yeah thanks yeah so we do is a short answer um so but there is an important distinction here where a validator can always choose to build locally so if we assume there's some like altruistic sort of Chunk or core of the network if there was some issue where so if you think about this like what's really the worst that could happen if you have this like cartel Builders well they could essentially Center things which is not good but uh if there is like a again like an honest or even altruistic uh set of validators they would they could see this and if they see this they could basically say hey we're just not even going to touch this network at all the segment Boost network and then basically uh you know build blocks the way they used to um yeah I mean they do today but also like what we're seeing like just from the data right like this thing's very much used like I think the question is like how much of the network is altruistic versus just rational meaning like profit maximizing and uh uh you know ideally we wouldn't want to have this assumption that things need to be altruistic or there needs to be this like uh honestly even honest majority of actors oh not even so so there's essentially along with the the payload header you basically just claim uh I'll pay you say like half an eighth or like you know a quarter heat something like this and so then my Boost looks at all of them and picks right now it picks the highest uh value so like you know if if you send a bid for like one eighth ice in a bid for like half an eighth you would win um yeah like one thing is actually this value is not really verified at all and we haven't seen this yet but you could imagine a builder like again Grieves this mechanism by like just like lying um then we need to like provide pavement proofs and that's a whole different thing but yeah exactly yeah and presumably what's happening is like most Builders see about the same set of order flow and so then there's competition for like about the same thing if that's the case then you know if all of the Searchers in the block will pay say again half an eighth the Builder will say I'll bid 0.49 right like they're just gonna take like a minimum amount because they you know if they if they don't if they take more than you know what the market will clear then they actually lose out an opportunity because like you would under bend me for example um and yeah so as long as there's like many builders in competition then you'd expect like these spreads to compress and yeah that's what happens yeah first price all that so you could think about like making a more sophisticated auction and that was like the Pepsi thing I called out was like What If instead of having a fixed format at all it was just like completely programmable very much like a kind of abstraction um but again I think it's very much a open-ended r d question right now yeah um you definitely can do this I mean unless like one thing Searchers will do is basically uh if they need to like if they start to like do some sort of like Mev strategy to like say extract something they can basically replace that transaction that would like close out the bundle with like a self transfer and because of the way like we do like you know transaction Replacements there's like a way just to like you know basically it's the same nonce but a higher fee uh so you could do this and you just end up with like a self-send which basically does nothing except you just pay like the base fee to like do that um but the reason why is because then you like if you didn't do that then you would end up executing your strategy which would have cost you a lot more um so yeah there's like cancellations and stuff like this where things like that could happen um yeah you can imagine there could be some situation where someone like yeah bids irrationally for some reason to like take up the box base there's one over here definitely uh so I think because there are relatively even fewer like Searchers and Builders compared to like Builders to validators it's like even more sort of like a trust like reputation thing like if it came out that like a builder was like stealing meth from Searchers like the Searchers would all like stop using them immediately um but that being said you know like again sort of like the the ideal thing here is where you actually have like um you know you'd kind of want communication from each step encrypted in some way where like you're revealing enough information that you can still like proceed with like whatever auction you have but it still is protecting like privacy of like the you know engaging actors um so like to say it a different way like uh you know what I want as a user is the ability for someone to background me to like do this thing where they you know ultimately pay me for the trade but I don't want them to know the full trade because otherwise they would just French on me right um so then now you can think of like ways to like reduce or like change like the trust assumptions here to get to that um most of those require like more advanced cryptography than like we have today but uh yeah that just what makes it interesting r d exercise yeah so that's kind of what I was just touching on where ultimately like a lot of why this happens today is because like transactions happen in clear text and so like as a Searcher like if I went to like you know if I have like too much slippage on my trade then like as a search record comment basically like uh you know that's that's value I'm leaking from my trade and so one way to get around this is we're rather than someone frontman front run me to collect that value I somehow encrypt my transaction and my trade so that uh you know basically they wouldn't know how to do this in the first place so they just actually can't and that's the idea there so then that would add like kind of more Pathways to that big like supply chain graph thing I had um where now you have like layers of encryption to protect trades yeah swaps all sorts of things okay well thanks everyone I'll go and wrap up
Automatic transcript — names and jargon may be misspelled.