One Block, One Batch: Examining the Potential of Frequent Batch Auctions in Ethereum by Anna George
Devcon·Mon, Oct 9, 2023, 12:00 AM
Speaker
Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on Swarm, IPFS and more. https://archive.devcon.org/archive/watch/6/one-block-one-batch-examining-the-potential-of-frequent-batch-auctions-in-ethereum/ This talk will focus on the future of (de)centralized trading, and examine how frequent batch auctions can revolutionize existing market economics by bringing fairness and protection to Ethereum’s various stakeholders. We will review why Ethereum would benefit from a global batch settlement layer, touching on MEV and unfair pricing of CFMMs. Speaker(s): Anna George Skill level: Beginner Track: Cryptoeconomics Keywords: P2P,DeFi,MEV Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum Learn more about devcon: https://www.devcon.org/ Learn more about ethereum: https://ethereum.org/ Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. Devcon 6 was held in Bogotá, Colombia on Oct 11 - 14, 2022. Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/
Transcript
foreign [Music] I should have put Mev in my talk title because we are actually talking about Mev and I think we would have a higher attendance but anyways it's gonna be an interesting talk I promise um quit so um yeah the focus for today is um how basically application design decisions can remove or at least reduce decentralizing force that Mev is um placing on the ethereum blockchain all right so let's see and basically the first part of the talk we focus about how and the degree of centralization in proof of stake so basically we look at a few data points telling us how decentralized are we actually today and then the second part we focus um on a more bright out layout for ethereum where we are heading and hopefully um yeah ways of how we can avoid the dystopian future scenario and that will lead us to the next part where we will talk about how specifically we can make design choices for applications to reduce mov and then dive into car protocol as one implementation um of batch actions that basically facilitate this cool let's Dive Right In and look at some data and so we had to talk the talk right before was focusing on validators and like he was saying actually is that the set of validators today is quite centralized in a way you have staking providers such as Lido who hold more than 25 of the market share followed by individual stakers but then already you have decentralized exchanges coinbase current and buyers who intuitive combined also make up more than 25 percent of the entire validator set on ethereum today so you can say if you have already some degree of centralization in ethereum today but of course now um with Mev you add additional risk of decentralization growing further right like Mev why is that helping Central like um um why is Mev causing centralization is because people um are like validators that um have the chance of proposing the next block they can um move transactions around in a way that they are able to extract additional value out of it in this way they're actually able to read more Rewards um from the blocks than anyone else would be able to do and this way they grow their pie more and more over time and this was already bet this already existed in in proof of work but now proof of stake this was accelerated because now you also have um the downside basically that you know in advance who are the next set of validators so you can have more sophisticated Mev attacks that involve multiple blocks and even are taking place across multiple blockchains um the response to that is PBS The Proposal Builder separation and where basically you now divide the tasks of the of the validator into two you have the black proposal and the block Builder and now the block Builder is basically competing against each other and the one that is able to extract most values winning the competition because they are basically um yeah bidding against each other and the one who's able to pay the most to the validator is the one who's picked so you might say that basically um now PBS is helpful to move the responsibility like to move the centralization away from the validators to the block Builders but now actually this is problematic because now we have more centralizing force on the Block builders you can even enter a scenario where basically more than 60 percent or even more more than 90 percent of all blocks are created by one single block Builder and this can even be accelerated if they for example would have access to private order flow so if now you would have a wallet such as metamask who decide my transactions um to to a single block Builder um then the single block Builder would have additional advantages over the other block Builders and would more reliably be able to win this Blackberry competition and gain more and more share of the network okay now let's actually get to the interesting point and look at some data so here you see basically how much Mev has been extracted 145 000 blocks before the merge and after the merge and this is roughly equal to 20.1 days and basically I mean proof of Stack has only been live for not even four weeks at this point and if you look at this data it almost looks like we are extracting less Mev right now than we did before the merge it's interesting right but what is the conclusion why is this the case now if we look at this slide we basically zoom into one specific kind of Meb sandwich attacks and we can look basically that it's starting it's showing the the first 20 days of Sandwich attacks on proof of stake and you can see basically that the amount of value extracted where this attack is growing right so basically at the beginning when we move from proof of work of proof of stake we had one short period of time where less Mev was extracted but now over time we are getting back to the same stage as we did before and now here what we see here it's basically a chart that is showing the adoption of math boost and math boost is the protocol created by the flashbots team that allows for this proposal Builder separation that allows for this block Builder competition and the interesting part is that basically they correlate right like you see how with the growing adoption of nav boost you also have growing extraction of Sandwich attacks so that's that's one important point to make um but then also let's see how the adoption is going so at today already more than 49 of all validators that we were looking at in the first slide they have already integrated math boost now let's go one level further and look actually at the at the relays themselves so math boost was created by the flashbots team but it's open source so anyone can create their own relayer and with their own rules of the game for the competition however the relayer that was created by the flashbots team is by far the most leading one right it has 83 market share so you would say what's the problem with that what's the problem about flashbots having a large market share but the problem arises then when one of these relayers decides to start censoring transactions and this is exactly what flashbot does today right there they are complying with OPEC with the office of ofak with the office of foreign asset control and this means that any transactions that were created by the accounts that have previously interacted with tornado cash are not being put into these blocks so if flashbot says 83 market share of 50 market share basically of those that are being integrated by validators this means that today already more more than 40 percent of all blocks on ethereum at censoring transactions that censoring the accounts that have previously interacted with tornado cash now we Zoom one level further and look at the Block builders so who is actually Behind These block builders and here you see basically this is an entire overview of all the block Builders today operating with any of the relayers in PBS and you see that the top two have more than 50 market share that means if basically you have 50 adoption of math boost and within math boost 50 of blocks are created by two players that encoder of all the existing blocks that are today created in ethereum 25 of them are created by two single individual block builders and then just adding again the argument that I mentioned at the beginning basically if you have private order flow of masks or anyone else is deciding to sell their order flow to this one individual block Builder you have very fast and accelerated centralization Force even more like you have these these Blackboard has been even more market share and suddenly this dystopian future scenario of where ethereum hopefully is not heading towards suddenly doesn't seem so unlikely anymore already today you have two block Builders having 25 market share and they can easily grow this very quickly okay that was like the negative side of the talk that's now focused more on like the hopefully my YouTube utopian future where we are heading in ethereum and for this let's have a look at a quote that vitalik said earlier this year so what is his vision for ECM right like how can you avoid this avoid decentralizing force of Mev and what he is saying is that we have to create an insulation layer around the core protocol to basically ensure that these negative externalities that are created by Mev cannot affect the core decisions that we are taking because right now with having smart contracts built on top of ethereum you have these applications that now allow suddenly for decentralized exchange trading and for liquidations and all these transactions they basically set in centers now for Value extraction that give more power to very important players and stakeholders of the ethereum network and we need to find a way to not do this because right now our solution is basically okay damn validators are centralized so let's move it to the block Builders but now the block Builders are centralizing so where do we move this and we need to find a way to avoid this we have to have a better structured way of protecting the ethereum core protocol and what is what vitalik said himself is basically The Way Forward is that these risks that need to be absorbed elsewhere they need to be absorbed either by layer twos or by the applications themselves here we have another quote by Stefan the co-founder of flashbots who actually last week announced that he's leaving the team because he does not agree with its centering that flashbots is doing today and he is also stressing the point that the right way of dealing with MVB is not to basically try to extract it and then sell it or like distribute it but the right way is to create applications that don't extract the value in the first place and this leads us basically to the next part of the talk where we will look at how can we design applications in this way that they are not exposing Mev to do that we first have to understand where Mev is actually coming from like right like why why do we have this we need to understand where it's coming from in order to be able to avoid it um we basically believe or it's pretty clear actually that one of the reasons or like the main reason why mov exists today is that within a single ethereum block you have multiple different token prices for a single individual asset so if you use the example of decentralized trading for example yeah you can have a Blog where five people all want to sell usdc for example they all interact with the same amm but each of them would get a different price within a single block that has one single time like it it's very interesting right like you have an amm we're in prison and sex with it they move the price the next person interacts with it they move the price again and because of that um they basically create incentives for other players to jump in move their transactions around Place additional transactions in front and after them to extract value from these users and to give a more concrete example of a real block this was like six days old um we had one single block where there was 11 different traders that all traded East usdt and East usdt is obviously a super liquid pair right it's like one of the most liquid pairs on ethereum and still was in the single block you had eight different clearing prices yeah like the price spread across 1337 USD to 1351 so you had more than one percent spread in price within a singular serum blog and this very much demonstrates like the value that can be extracted if you have so many different prices in one single block and here this is just like a nice pointer because Mev obviously has been discussed for a very long time it hasn't been addressed for a very long time but it was known about since 2014. and this is a Reddit post and the interesting part here is basically the screen shot on the right where vitalik interacted with and he basically said well one way of how we could tackle this problem of value extraction is by processing orders and batches so let's take a look if like looking back at the previous block that we just saw where we had 11 different traders who got eight different clearing prices what would happen if you were able to batch them all together and would give them a single uniquely clearing price then we would actually be able to even offer them better prices because we wouldn't have to move the price on a price curve up and down up up and down but we would actually be able to not have this much price impact and have additional value that we could give back to the users and in this concrete example it would be 930 US dollar that we could additionally pay out to the users but the real benefit on top of this is that because you have a single clearance price you don't expose those trades to Mev okay and this leads us now to car productive which is basically an implementation of batch auctions on ethereum today and how does car protocol work so we are doing better auctions we are batching trades together and what happens is that basically users on Kyle's web or car protocol they go to our UI and then assign messages they sign and intend to trade and this is actually really important right like because they sign a message and they don't just execute and um they don't just sign a transaction on ECR this gives us more flexibility what to do with these transactions we are actually then able to to match them together so we collect all these orders in our off-chain order book and then we have a competition we have a competition of so-called cow batch builders that basically look at what are the transactions that currently exist in our off-chain order book and try to find the best possible way of matching them together with by finding a unique clearing price for all these trades and then the winning cow batch Builder is the one that would settle these trades on chain and what is to be highlighted here is that it looks maybe on High level it looks very similar to The Block Builder competition but it's very different it's quite the opposite actually because in the black Builder competition you have really high like you're focused on extracting most value from the transactions right in order to be able to win the competition against the other block builders but on cow swap you maximize the value for the users the bug Builder the batch Builder that is able to find the best possible prices for our users is the one that would win the competition and this is enforced by the objective function that we are using the batch Builder that is maximizing most the utility for the users is the one that wins the competition all right so um how how does this work how do we keep our cow batch Builders honest is they they participate by staking on our protocol then they can participate in the competition and in case of malicious behavior they would be slashed but if they actually win the competition and they execute the trade on chain they're being rewarded by the protocol um so now this is all like all sounds very good in theory right let's look at it in practice So Cal protocol has been live since a year and a half we have been processing 15 billion dollars in trading volume so we have a lot of real life examples um this is like an example badge from 11 days ago where we had one user that was wanting to say forty thousand dollars worth of manifold against usdc and another user that wanted to actually buy money for I wanted to buy 48 000 worth of money for it so in this particular batch our car batch Builders were able to match the two trades together and in this way create additional Surplus for our users additional value that could be given back to the users because instead of processing forty eight thousand dollars worth of tokens on one amm and Shifting the price and then settling another transaction of forty thousand forty eight thousand dollars and moving the price back instead we were able to match these two trades directly against each other and only the leftover amount of roughly eight thousand dollars needed to be placed on executed in an Unchained amm and this way we were able due to the due to the price impact the removed price impact we were able to save fifteen hundred dollars for users and also we were able to save on um protocol fees for the users an additional 800 that didn't have to be paid to the amm cool and that basically leads me already to the final slide of my talk so our vision is to protect the users and our vision is to protect the ethereum core protocol against the negative centralizing externalities of Mev but to achieve this we really have to become the backbone of decentralized trading on ethereum and for this what we would like to achieve is that really like our how batch Builders are submitting one batch for each ethereum block ideally this batch would actually be placed first in the block because this way we could also avoid negative slippage and fair transactions but the real argument here that I want to make is that even if our our batch is not placed first in a block by growing our share we are basically reducing the total amount of Mev transactions in a block and this means in other words growing the share of cow protocol means at the same time reducing the share of Mev thank you everyone thank you Anna we still have five minutes more so if there are questions I got one two okay one question how it can be more profitable when milk so you have to reward more than a flashbots right um do you mean can you repeat your question you mean how can we be how can we ensure that how you can give more rewards to cover Builders and then mere Builders so that's so we basically maybe can I go back in my slides just to make this point clear is that possible so so okay otherwise I can explain it but basically we had this one slide where you could see that um the value chain of a transaction from it's being placed and it's being executed on chain so basically yeah okay so what we do so this these are two separate processes right like the first part is basically car protocol that is the application on top and what we do is we collect the user orders and we collect them they're signing and tends to trade so we collect them off chain in an off-chain order and then we have the cow Builder competition and they basically they have their own set they have their own rule set and their own competition rules right and that it is completely separate from the black Builder competition so someone who is participating on a car batch Builder competition they basically they they know if they participate they only get rewarded they only win if they're maxing maximizing value for the user but this is orthogonal orthogonal to to the block beta competition and on ethereum that happens at a later stage so right like the cow batch Builders they find they find the perfect solution they then submit them on chain and on chain they can actually decide how they want to submit this is up to the to the batch Builders they can either submit them directly to the to the public mempool or they can submit them via a relayer if they decide that they want to additionally protect themselves against Mev however basically at this point in the execution if they're being front-enders and which this is actually something that the block Builders the sorry the batch Builders have to pay for so at this point the user is already protected by the the price that the cow batch Builder promised so the car batch Builder wins the competition by promising I can get at least this price and then they hold account before this so this is for sure the price that the user gets hey uh thank you for laying out the problem with L1 right now in terms of maybe the very nice slides um I'm curious about how you uh moving this problem into the application layer how you deal with uh censorship resistance problems in the off-chain order books specifically so um today if I go to the Cal swap website and I make a transaction like how do I know I'm not going to be censored by the cow swap like company or whoever runs this protocol yes no that's a very good question it's basically something that we're working on we still have some centralizing facts I have components in the in in cow protocol that essentially basically this is um right now we have this option order book that is hosted by us but the idea is that in the future this will be decentralized and not host the bias anymore um and yeah but basically this is the answer it's like it's a it's a it's an ongoing process where we have to decentralize more and more of the components one last question and here and um question is when you're trying to remove the meth in the blocks by cutting these batch balls in between how is then how is it then still attractive from a builder perspective since here it has less map in the block now how can you still win the bid auction and then how you make sure that the block gets actually proposed um so I mean right now usually not a hundred percent of these transactions in a blogger Mev transaction right so basically you would even if you're not the first in the block you could still ensure that you're part of it but I think one interesting point that where we could get it is by the more order flow we are actually processing the more Surplus we are generating right like this was the point on like this one slide over here where we have this like real example of creating an additional two thousand three hundred dollars in Surplus so what we could do is for example if we would if we are creating this much more value for users we could take a percentage cut of this if it was needed in the future to pay block Builders to guarantee execution in a block we could do this but our future scenario is more focusing in the direction that hopefully this won't even be necessary right because we are basically trying to win over more share of the general transactions on ethereum and then that would automatically reduce the amount of Mev transactions in a block thank you Anna we are running out of time so you have enough time to go to the next stop thank you so much and a big round of applause for anime
Automatic transcript — names and jargon may be misspelled.