New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Targeting Zero MEV in the Base Layer - pmcgoohan

ETHGlobalSat, Oct 9, 2021, 12:00 AM

pmcgoohan, an MEV expert, discusses MEV in the base layer of Ethereum. ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​ Email us at: hello@ethglobal.co

Transcript

our guest p.m.c goohan i'm sorry for butchering your name but uh feel free to directly share screen can you admit yourself okay can you hear me now yes yes great can you see my presentation at all i we cannot see it but right hang on so let's see i spent ages preparing this and obviously it didn't it didn't work to i loved it ages ago uh but i still failed so uh where do i go if i just go back into it that's probably not a good idea is it so um so if i just share a screen hang on oh you can share the screen for me okay yes i can do it for you it's easier for you yeah do that tina brilliant and then i can just maximize it here can't i yeah brilliant can you just give me a second let me open it up sorry i haven't used google me before so you can uh introduce yourself a bit while i uh open up the sites sure okay um so okay brilliant yeah well i'm so excited to be on guys thank you very much to the organizers for uh for thinking of me and for organizing such a great event with such kind of diversity of views it's such an important topic um so yeah um i was very chuffed with charlie for having um very sweetly put me at the beginning of the meb timeline there in in 2014. i'd really like to be at the end of the meb timeline in you know 2022 let's be optimistic so uh that's where i'd like to go with this talk are you any closer to sharing though tina i believe i'm currently sharing can everyone see screen yes you'll see my slide brilliant okay fantastic i'll crack on then so i'm going to start with a very quick definition of mev mev is the profit to be made by reordering and censoring transactions so i'm sort of using this original definition as i call it i'm not including block rewards or gas fees or just any way that miners make money i'm also not including latency arbitrage and that actually probably includes includes cross chain latency arbitrage and i'll come back to that reordering and censoring transactions is data corruption the transactions are data so reordering them is data corruption and you might be thinking well you know what do you mean by that because uh transactions seem fine to me they're atomic and they're digitally signed and they're validated by thousands of nodes well the reason is the data order is as important as data content so i'm going to give you the example of a picture file as a beautiful picture file so what would that look like if i took every pixel in the file and i reordered them yes i'm keeping the same content but i'm reordering it so it might look something like that yeah so i think we'd all agree that's a pretty corrupt looking file so the bad news is that this is actually on the left here each one of these pixels represents a transaction in the ethereum network so on the left they're ordered by arrival time i've taken this data from inferior and on the right they're ordered by inclusion time so that's the time that those transactions were actually included on the ethereum blockchain so what you're looking at on the right is the data corruption created by mev extraction gas price auctions and mev auctions yeah colluding to create this data corruption in the network so that's real data corruption from the last few days so what we're doing here is we're selling the right to corrupt transaction data in this way so i guess what i'm guessing at is you can't be surprised if you sell the right to corrupt transaction data that your data ends up being corrupt and you get these mev effects you know it's kind of literally what we're doing so what i'm trying to make the point here is that mev is equivalent which actually is i defined it as reordering and censoring transactions and that is equivalent to data corruption because we can see what happens when we do that so i've done a sort of triangle here um just because it's pretty but actually honestly this is the best way of thinking about it they're just directly equivalent and this is why it's only preventable in the base layer that's why i'm interested in the base layer only a base layer fix is going to work i mean obviously every l2 above it needs to be doing it as well but the base layer needs to do it too so in terms of sort of a statistical analysis rather than my not so pretty pictures the average inclusion time for a transaction going through the mempool seems to be around two minutes 30 seconds right on average that's 12 blocks it's pretty high right the standard deviation of inclusion time is 20 minutes right that is some serious variance so time order is corrupt at ethereum now that means latency arbitrage is not possible yeah because latency is a measure of time and this is what our time access looks like it looks like this so we can't talk in a meaningful way about latency arbitrage and good forms of arbitrage and even in some senses crosstrained arbitrage as in those terms it's all bad so what we need is some transactional order integrity now mohamed has touched on this you know what do we mean by fair order you know so this concern some people will buy what measure fair for who and who gets to decide but it's very simple it's send time order that's our ideal if alice sent her transaction before bob's it should be included first if bob sent his transaction before alice then his should be included first so i'm not saying this is easy i'm really not but i am saying it's objectively fair all right this is really important and the reason it's objectively fair is it models reality yeah and this is what any transaction processing system actually needs to do that's just trying to audit and log and record reality and this is reality they either did or they didn't send their transactions before each other now remember mev is a profit to be made by reordering and censoring transactions if you get sent time order you don't have mev anymore all right it's gone so now we've got a measure of order integrity and we can measure it very simply and define it simply as minimal divergence from some time but there's actually an equally important measure i would say which is symmetrical divergence from sun time so asymmetry would for example be citadel always having zero milliseconds latency access to the markets and wall street bets traders always having 300 milliseconds plus i think 300 below so that's an obvious asymmetry so what i'm showing here is we've got the kind of worst to best on tps essentially so ethereum where we are now i've got to say sorry to say but with the bottom of the heap we've got high asymmetrical send time error transaction orders very corrupt healthiest best resource benefit uh nasdaq i've just sort of dealt with um we've got these asymmetries but the actual the actual transaction order is broadly okay but the asymmetry is nasty what we're going to do is we're just going to leapfrog nasdaq all the way over here and we're just going to end up here over here at the best right ethereum suit we're going to have a low symmetrical sun time error where a transaction order approximates send time all participants are treated equally now the point i want to make about this is centralized exchanges can't do this because they're centralized they can only do arrival time we're distributed so we can aggregate arrival times and get something that approximates sometime orders is a massive advantage so our current sort of woes come from us being decentralized in one sense but it's going to be our superpower so you know that sounds good how do we get there so i'm proposing a class of solutions with many potential implementations but three broad characteristics so first thing we need to do decentralize content creation so you know we've touched on this before but why are we letting miners order transactions if it causes all these problems was because we can't stop them yeah because content is centralized so we've got this decentralized application layered many computers we've got this decentralized block chain structure but the mine is just like hidden in there at the very crucial moment when a block's created one single computer has total tyrannical control over what transactions go into it so the solution should be no surprise to anybody at this conference it's the way satoshi solved double spending is how we'll solve mev we decentralize many nodes will decide the content of one block so the next big problem we've got is the structure of the mempool by which i really mean that there is no structure to the mempool it's an unstructured mess it's essentially a graveyard for send time order we've got hundreds and thousands of transactions sloshing around probably about 150 000 right now i guess now this increased choice of transactions leads directly to increased mev opportunities all right because you've got more transactions for a minor that your tyrannical miner to exploit massive range so what we could do was we could chunk up the mempool at low latency so i'm talking about you know maybe one to every three seconds and we can do this quickly because there's no need to execute these transactions we're doing basic validation on we're not updating state and broadcasting blocks to everybody into testing them so the idea is that if you're doing it in three second chunks you will have about 70 transactions to exploit per chunk 70 not 100 000 so less mev the other thing about this so this is what i'm building here is that the base most basic version of a content layer it's called plain alex and it does very very little it just does what i've talked about there it doesn't try fair ordering or anything like that other than the innate amount that comes from chunking up the mental so to for this to work it's got to be non-optional all right so this is why it's a base layer solution so the content layer creates chunks the validators must write these chunks in order if they don't they will fail attestation and the idea of this is that corrupting transaction order will require the same resources you basically have to mount a 51 attack yeah rather than just being the miner and choosing them you need to you need to escalate all the way up to that level that's what we're trying to do so let's look at the advantages of doing that i've done some research this is based on real data so by mev type um as far as i could tell with the flashbots bundles i've done some analysis we're getting about 43 percent of what is uncontroversially exploitative i would say so to my mind can you look at the zoom screen that um because i'm screwing for you but i'm not exactly sure which oh are you scrolling for me sorry um oh no i didn't realize i thought i was i thought i was doing all the scrolling yeah so you're on you want to be on the pie chart so can you oh i didn't i'm sorry yeah yeah i'll say that i thought i was doing all right okay um so that's right i wore the pie chart here so what we've got is 43 of the most exploitative um mev sandwich attacks and backgrounds make up for make up 43 of the mev that we're getting three flashbacks bundles so what i'm talking about doing if you chunk up content chunks at 12 seconds right every 12 seconds and this is based on real data you could get a potential reduction of 40 well actually so the reduction you would have got in that data set was 40 and that is just by reducing the number of transactions that there are available uh to to attack with so i'm not trying to do it every 12 seconds i'm trying to do it every one to three seconds so the mev reduction could be greater than 40 potentially uh so oh oh there we go so i'll go on to the next advantages tina next slide thank you uh so i'm not sure how long i've got actually have i am i have i got long enough to go through these oh i will quickly um very quickly so other advantages we've done the 40 reduction lower user costs overall when you count mev extracted and big costs better data integrity use some user experience improvements remaining mev is more democratized which i know some people are fan of so you've only got 70 transactions to mine not 100 000 so you don't need a massive mining rig bandwidth reduction potentially because you've got you've got fewer transaction messages once they're chunked so there's ways you can do that i'm not going to go into the last one but you know it's quite good um roadmap so how could you possibly do this get getting from reducing mev to solving med so you know i've put some dates in for fun that play in annex i've just described is really pretty simple as far as these things go i would suggest relatively quick to implement relatively you get that immediate significant mev reduction but the fun really starts when you start doing other things with the content there so in dark alex for example you could have users encrypting transactions sending them to the mempool if you can get this running at a frequency of every three seconds say then you can use time lock encryption um timed at five seconds for example uh you don't get any block delays you encrypt your transactions order them and then decrypt them within this maybe several times within the space of one block so you're not slowing down the structural there you don't have to use time not you could use threshold encryption i quite like the idea of a reputation market for key split holders and then you kind of solved mev at that point um i would go further after that and go on to the fair ordering because i want to get to sendtime and you know be the best that i talked about earlier so when you do that you could have pickers that i've described in the diagram earlier of the content layer that chooses transactions actually seem to map quite closely to equitas replicas what i like about encrypting beforehand is that in that instance you have protected yourself against collusion because bad actors are minimally incentivized to order encrypted transactions fairly right even bad actors good actors are going to do it fairly anyway bad actors are minimally incentivized because the easiest thing to do the least work the least overhead is just to pop a transaction on a list in arrival time it's the cheapest thing to do cpu-wise and there's no advantage to doing anything else so i i would say though there's you could go straight from playing alex to fair alex you don't have to do dark alex these are just i just wanted to get the ideas down so at that point i'm going to boldly claim that mev is solved you have objectively fair distributed systems for all best transaction system on the planet the thing we always wanted for ethereum the thing i wanted for ethereum when i first noticed this issue in 2014 i've written yay there to remind me to say yay we've done it perhaps worth looking at anyway um on that note thank you for your presentation um and uh we should um move on to the next um speaker rick dudley thanks guys presenting [Music] yep thank you

Automatic transcript — names and jargon may be misspelled.