 Hello. So, you know, I probably don't need to talk about what MEV is as much given that there were, if I remember right, 17 or 18 talks about MEV. But, you know, I think in the spirit of trying to understand the incentives hidden in a lot of these systems, one question you might ask is, does there exist sort of some type of formal theory for MEV? Does there exist some type of mathematical structure to this thing that seems to be, you know, captivate people's imaginations yet no one can describe it? And so I'm going to talk a little bit about different ways of addressing this problem, including some work we've done. And I'd like to call any analysis of MEV sort of measuring the cost of feudalism. So that's sort of where the title comes from. Let's start with the operative definition of MEV. You know it when you see it, like, of course, the famous Supreme Court ruling on porn. And, you know, MEV comes in many shapes and sizes. You know, of course, we have everything from sandwich attacks, liquidations, arbitrage, NFT front-running and cross-chain. And as you can see, it's sort of quite a variable form of revenue for validators and searchers. And somehow, because we know there are many examples and we feel like we can't enumerate all of them, it might feel like the space of all MEV is super big. So how do you analyze it? You know, I know there were two talks yesterday about what is and isn't MEV, but I think we're going to focus on kind of an operative definition that can be used. We could sort of say MEV is any excess value that can be captured by validators, by reordering transactions, strategically adding or removing transactions. The idea is most of this is currently managed via off-chain auctions. So people bid on transaction priority, add imicity, you know, within bundles. And, you know, if we take a step back and look at the history of Ethereum as to why we got to the auction world, part of the reason is the blockchain was just getting spammed by people doing liquidations and back-running oracles. And instead of normal users being able to get their transactions in, you'd have the entire blocks filled with people's, you know, spam background transactions. On the other hand, of course, as the previous talk was focused on, there's a lot of centralization risk with off-chain auctions. So let's, you know, try to maybe schematically look at, you know, what, how MEV works. We have users who submit transactions, which are the deltas. We have a mempool. The searcher has sort of their own view of the mempool, and maybe they have some transactions that are directly given to them, which, you know, people would call private order flow. And then the searcher sends their bundle, which they're willing to pay for, to the validator, and the validator adds it to the block. The philosophical question here, though, is, how do we know value captured by MEV is excessive, or in a notion of excess? You know, in this sort of first definition, I said any excess value. Well, how excessive is excess? Describing value flows in MEV is actually quite difficult. So in Algorithmic Game Theory, you usually have two main ways of thinking about the world. One is optimizing social welfare. Social welfare means if everyone has some notion of utility, some notion of how happy they are with the world, you want to maximize the sum of everyone's utilities. On the other hand, revenue is, you know, the person selling the good, you know, maximizing how much they earn. And in cryptocurrency, it's actually interesting that you have to optimize both jointly. So obviously, user welfare is important for the success of any network. I don't need to really convince anyone of that. But validator revenue being optimized is actually important for economic security. If validators are not making sufficient income from it, then they're unable to really secure the network. And in decentralized networks versus centralized networks, these are two competing goals. And I think the one reason there's a broad view of how Algorithmic Game Theory is different for crypto is that you have to sort of balance these two goals instead of trying to optimize one of them. So what pieces are sort of missing? So how would we kind of describe welfare as how would we describe revenue? You know, one thing is understanding the user's utilities. What is the user getting out? What is their individual notion of value? And that can vary over the entire network. The other thing is some notion of transaction fees and payments that, you know, the distribution of payment sizes that users are willing to handle. And the last thing is an understanding of how an auctioneer, so in flashbots or, you know, in PBS, how they allocate block spaces to users. And that, the last part is actually quite complicated and these three things are quite entangled when you want to try to write a mathematical theory for a movie. And these sort of things actually depend a lot on the application, right? The user's utility for minting an NFT is extremely different for a user's utility for borrowing against some collateral. And inevitably that means that the allocation mechanism should somehow be tied to that. Okay, so let's try to do kind of like the ELI-5 simple version of this. Which is, you know, we have a notion of block space, which is sort of a notion of max number of transactions or slots or size or gas. You can choose a unit, but for simplicity, just assume there's sort of some fixed number of units. There's sort of a notion of a binary allocation to a user of whether a particular user gets a particular slot. The users have the utility functions. I'm unspecifying the domain and range because of course it's actually quite complicated in the world of cross-chain bridging. And we see here that social welfare is defined as sort of the expected total utility of all the users given an allocation. So these X variables are effectively whether that slot is given to a certain person and this is sort of measuring their sort of net happiness, let's say. Revenue, however, is just the expected value of the payments. And notice these are quite different. In particular, the social welfare includes the utility of the auctioneer, which means that all of the payments that the user send are subtracted, or sorry, are negative terms for the bidders and it's a positive term for the auctioneer. So the payments cancel out in social welfare. So you have no dependence on payments explicitly. Whereas in revenue, of course, you depend on payments. So if we wanted to try to formulate what is an economic equilibrium for the system, you might say, okay, well, let's try to find joint maxima of the social welfare and revenue functions. However, given an allocation that optimizes social welfare, it implies a set of payments. And it can be true that the payments that you get from optimal social welfare are very far from the payments that you get from optimal revenue. There's some intuition to that. If flashbots just basically gave every bundle for free, obviously there's a lot of user gains, but the auctioneer is pretty pissed, aka the validator slash miners. And this happens all the time in MED. The idea that the optimal revenue equilibria and the optimal social welfare equilibria are sort of disjoint. So, you know, the name cost of feudalism is really a pun on the concept of the price of anarchy, which is sort of a common concept in algorithmic gain theory. Roughly speaking, you can think of the price of anarchy as if I have a set of many equilibria, I want to look at the ratio of the worst case behavior of an equilibria to the best case behavior. It's an approximation ratio. And so what this, for instance, this formula says is what's the worst case that the equilibria, the payments earned by the validator, deviate from the payments earned at optimal welfare, and what's the best case and what's the ratio of those? And you could basically think of this as if this is really large or depends on the number of transactions or users, that's really bad. And so, you know, tongue in cheek, you know, of course nothing in real life is asymptotic, but you know, I feel like these are good heuristics, which is constant price of anarchy is really good. It means that even if you get to a shitty equilibria, it's not that much worse, it's not that much worse than the best equilibria. If the price of anarchy is weakly growing, so a little o of n, so like maybe it's logarithmic in the number of users or slots, maybe it's the square root of the number of user slots, that's okay, you can deal with that. And if the price of anarchy is linear in the number of users, that's horrible. That basically means that the more users join the system, the worse the equilibria is for everyone, which is like the opposite of a network effect. It's like the anti-network effect, right? No one wants that. And the interesting thing is that this quantity, if you try to write it out, depends a lot on your choice of what applications you're modeling, because to compute the prices, you need to sort of know these utilities of the user, and that of course depends. You need to keep belaboring that point, but I think that one of the reasons MEV has this, you know, both meme ability and inability for anyone to write down equations for it is because it's so dependent on the application, which is something I think the early designers of cryptocurrency networks did not divine at that time. So let's go through an example, stylized example of kind of what this looks like. How would you analyze this for AMMs? There's a very famous paradox in algorithmic game theory called Brace's Paradox, and Brace's Paradox is really about how traffic flows on a network. So we have this network on the left, and we have a source city, S, we have a destination city, D, and imagine that there's a bunch of traffic that needs to go from source to destination. Each edge that it takes is a latency, and so when you see a latency of one, that's sort of like a link that can take arbitrary capacity. It takes the same amount of time for everyone to cross that link. When you see a link of X, it's dependent on the amount of flow in that network. So you could basically imagine that, say we have 100 cars, if 100 cars all go down the route X, then it's proportional to the number of cars that are going. And so what you can do is you can say, hey, what if everyone is selfish or greedy? They're not cooperating. They don't have Google Maps. So Google Maps effectively gets you around this because it sort of implicitly coordinates people, whether you're thinking about it or not. But assume everyone's selfish and they know this map. How would they choose which path to take? And the thing you can show is basically, they would split themselves up 50-50. The traffic would go half on the upper path, half on the lower path. And so the time it would take is 3 half. We'd choose some units, such that X is from 0 to 1. On the other hand, you might think that adding more roads always decreases traffic, and this is not true. So there's this interesting thing of, if everyone's selfishly optimizing, if you add a link between the two middle cities that lets you teleport, then everyone just takes the X middle link X path and the total congestion that everyone realizes goes up. And so this sort of paradoxical behavior, I think philosophers would not call this paradox, but economists call it a paradox, is that even though you added a road, you've actually worsened congestion because people aren't routing themselves across the network well because they're not coordinating. So you might say, okay, great, what does traffic have to do with crypto? Well, first, before we even get to that, you may think MEV is always bad. There's always these articles that people are writing that are like front-running is theft. It's bribery, it's whatever. You will take your favorite negatively connotated weasel word. And you might just say, okay, yeah, we need to get rid of it at all costs instead of thinking, hey, maybe it's just endemic to such systems. We saw braces paradox, and what we're going to see is we're going to see that. For some examples of applications in crypto, you can get around braces paradox by having MEV, which sort of says MEV has some positive externality in some situations, which is the opposite of front-running is theft as a service or whatever. And again, not all applications are the same, so that's where the conundrum in defining your sort of optimization problem shows up. Another thing that's actually really important to pay attention to is if we classify users into two types of users, strategic users who are MEV searchers or people who are trying to optimize routes on chain and non-strategic user like the person who pays 80 bits for a metamask swap, if we kind of look at those two sides, routing is actually one of the hardest problems for non-strategic users. So non-strategic users actually, in fact, outsource that to third parties right now. So if I want to trade token A for token B, but there's no pool directly from A to B or there's not enough liquidity, I go to one-inch matcha gem, I'm including gem from the, you know, you could argue NFTs have the same properties. And, you know, routing is actually quite complicated. So algorithmic game theory is studied routing. In fact, Brace's Paradox is a great example of how to study routing. And one question you might ask is, hey, does this apply to AMMs? Does this apply to one-inch? Does this apply to matcha? And the interesting thing that you'll see is that you'll imagine in this prior example, instead of teleporting in the middle link, we actually add a small amount of congestion, epsilon times the traffic. Now, you can show that equilibria basically approaches something, as epsilon gets really large, you go back to the condition where everyone routes themselves across the two paths. And when epsilon's really small, you get back to the purely selfish thing. And the idea is the MEV searchers are actually adding this extra epsilon so that people route themselves across the graph more efficiently. And that's something that's a weird positive externality that if you write out the math, I try to not add a lot of the equations to this talk, but if you write out the math, it's actually quite compelling that the social welfare somehow is improved by MEV in some scenarios. That's not the narrative you hear. The narrative you hear is like, oh, I'm just, grannies are getting robbed in MetaMask, and that's just not true always. Like I said, I'm not going to go through how you show such a thing, but I'll at least give you an idea of what the theorem statement looks like for such a thing. And the idea is we show that even when they're sandwichers, the price of anarchy is constant. Remember, price of anarchy constant, that's good. That's very surprising. You would think that, hey, as more users come to network, sandwich attackers make more of profit, they cause more of a loss, but in some liquidity conditions, they do not. The bottom chart shows you the expected profit on the y-axis, and it shows you sort of the amount of slippage inured by the user, and you'll see that it has a maxima. It's not like it keeps growing, and that's the thing that's actually quite interesting and nice about this example. So you've listened to me try to convince you that MEV's not bad, it can have these positive externalities, maybe there's something really interesting about it, and maybe you can direct it into being used for some particular applications that are just net beneficial to your network. So one question is, what do you do to harness it for good? So one thing I think that's interesting, and this goes a little bit to Alex's talk before, is suppose you did have a mechanism where it was just extremely expensive for people to bribe a validator off-chain, and in fact people were willing to basically share their MEV revenue. Imagine like a mining pool for MEV revenue. Now the reason that that's very hard to design is it's very hard to make it collusion-proof where people pay one miner ahead of time in the pool and they don't share revenue with everyone. But suppose you have a way of doing that, and there's a lot of people working on really, really interesting stuff, both on the cryptography side as well as on the sort of distributed system side for trying to do such a thing. But suppose you have such a mechanism, then you can redistribute MEV to all the validators in the system. And one very interesting thing is you can show in some sort of different types of, for different types of MEV, you actually can lower the overall inflation rate of the network if the MEV subsidy is large enough. So the x-axis on this plot is the percentage of MEV revenue shared, and the y-axis sort of is a measure of how much people are adjusting their stake. So let's say there's sort of opportunities outside of staking that people can earn yield on their assets with. One question you might ask is, what are the incentives that keep people staking? And the interesting thing is that MEV actually adds this feedback loop such that you can lower your inflation but also ensure that people stay staked. And so the y-axis is sort of a notion of percentage of how much of the network is staked. And you can see that at around 25 to 50% in this styles model of revenue sharing, you actually get people to continue staking, which is just, you know, it's just kind of surprising, right? Like everyone's always like, oh, we've always needed kind of hyperinflationary economics, and there's lots of reasons for that. But MEV distribution also allows you to avoid having to do that. So that's sort of like a kind of amazing blessing in disguise. And there's a lot more research that can be done in this space that I think we mainly looked at how liquidations impact staker incentives. Another interesting thing, and I think this is the type of thing that we're seeing in multiple ecosystems, whether it's in Ethereum, especially with roll-up auctions, whether it's in Cosmos. But everyone sort of is starting to realize the MEV auction of having a single MEV auction for everyone to kind of compete in may not be the best form of an auction. You may want to have an auction per roll-up, you may want to have an auction per application, so that you can tune the social welfare versus revenue trade-off. Right now, if you think about it, everyone who's making a FlashBots bundle for an NFT mint is competing with everyone who's sandwiching for the same sort of block space, and I think actually if you segment to the block space and say only this amount goes for sandwiching and this amount goes for NFTs, you might have a very different equilibria. And I think a lot of the roll-up developers are basically kind of talking about this. But an interesting thing and some current work is you can actually show that disaggregating a single auction into many auctions can actually have better social welfare for the end-user, and that's sort of the trade-off that I think. As things like PBS get developed, you have to sort of analyze these types of incentives. So, you know, I think I want to just at least impress upon people that theoretical foundations for MEV are really important. And I think we've sort of started with this thing as this like emergent, unstudied phenomena. We sort of backed our way into some mechanisms for like, you know, doing an auction, coming up with sort of rough reputation scores, which, you know, it's not totally clear exactly how that whole system can be analyzed, to a point where we actually are really able to start thinking about, okay, how do we optimize for things like redistribution? How do we optimize for social welfare? How do we optimize for validator revenue in this sort of joint manner? And formalism, I think, provides us this way of finding these truths about MEV, which show that, hey, it's not always robbing grannies in MetaMask. And the interesting thing is I think, you know, this is sort of the beginning of this kind of new branch in my mind of algorithmic game theory, where you're really focused on the joint optimization of social welfare and revenue, because both of them are extremely important to network survival in cryptocurrencies. And so I want to leave you with some open problems in case anyone kind of is interested in this type of stuff. The first thing is what's the notion of optimality for an auction, right? Right now, if you look at FlashBots, it's sort of a first-price auction with some filtering because they use a scoring function that removes some public mempool transactions. Is that optimal? Does that work when you have multiple chains or multiple sort of hierarchical system? Also, does it sort of deal with some of the problems of, hey, how do I trust the auctioneer? Right now, we have a system where we trust the auctioneer. And, you know, economists have copied cryptocurrency enthusiasts and made some trilemmas recently on proving things about when auctions, when you win and when you can't trust an auctioneer. And a lot of that work, I think if the right people were focused on it, could really determine how PBS functions as an auction and what sort of the expected properties of it are. On the other hand, there's sort of some notion of lower bounds. Like in an open permissionless system with some notion of value, there sort of has to be some lower bound to the amount that's extracted because without any extraction, it's very hard to imagine validators being able to continue to sustain the network. And so one question is, how do you construct those lower bounds? You know, in information theory and in theoretical computer science, lower bounds are extremely hard. Upper bounds are always easy. They are really sort of some of the hardest kind of things to show. And I think the MEV space of lower bounds is still quite open. I think, you know, in spite of kind of, there being some, a camp of some people who believe with sort of fair ordering that there exists no such lower bound, I would argue, I would argue just proving that the lower bounds not zero is already a quite difficult problem that would, you know, be worth solving. And the last thing that's a very big open problem research-wise in MEV is this concept of aggregation versus disaggregation effects. And so I think a lot of people in the MEV parlance will focus on talking about things like private order flow, order flow aggregation, like what happens when a builder has all of a certain type of order flow. There are ways to talk about what the equilibria of the system are, what's the distribution of revenue to different participants based on these kind of aggregation versus disaggregation effects. But if I were to kind of give you the stylized version of what this question is asking, it's saying what is the cost theorem for MEVs? So cost theorem for those who don't know is sort of a very famous thing that I think basically says, imagine you have a company. Now suppose the company had everyone at the company an individual contractor. Why is it more efficient to actually organize as a group versus individual contractors who are giving payments to each other? And the cost theorem sort of says there's some equilibria in the middle where there's aggregation effects where it's cheaper for people to work together and share common infrastructure up to some point. And then after that point, the overhead of managing that many people starts causing you to lower your welfare. And this notion of aggregation versus disaggregation is completely unsolved yet people are always talking about it. It's kind of implied in people's language, yet not formalized. Cool. And so with that, I'll leave you for questions and also, yeah. Thank you. Do you have any questions for Tarun? If so, please raise your hand. We'll get you a mic. We got one question on this side. We'll get to you in a second. We got another question at the back. Hi. So my question is you gave an example of... You gave first an theoretical example of how removing an edge from a network can make traffic more efficient. And then you gave an analogy for how this can also happen with AMMs. And you gave a practical example of how it could happen with AMMs. But I did not understand how this practical example works. So could you explain more like how could MAV improve the efficiency of trading on this scenario with two pairs? Yeah. So think of it this way. Imagine that there's people who want to trade from token A to token B. And there's an order flow of N orders from A to B. If I look at how to optimally route the orders from A to B, if everyone gets routed on the same route, the price that everyone pays on average could be a lot higher. Right? If everyone gets routed on different routes throughout the network, you could have sort of your load balancing what the price impact is. And the point is that the MEV searchers are sort of acting in some weird capacity as almost like air traffic controllers. When there's a bunch of traffic going on the same route, it increases the MEV profit. But as the MEV profit goes up, then people start routing away from that. And you could effectively think of it as a way of sort of having a decentralized coordinator where it comes from the fact that the more traffic going on on route, the more the sandwich profit, but then once people start realizing the sandwich profit, they route elsewhere. And so this routing problem is actually the quintessential example of these cases where congestion sort of... You can add in some sort of like incentives to avoid congestion. And a lot of internet routing, traffic routing on the internet, a lot of that kind of work is like where this initially started. And this is sort of making an analog about here. But the key is that someone is getting a worse price by being sandwiched. There's no doubt. But everyone going across the graph is getting a better price on average. And that's the social welfare versus revenue trade-off. If that makes sense. Awesome. We have another question at the back. Hello. Good afternoon. I love the presentation as usual. The question is, have you made any studies around central bank digital currencies or even fiat currencies using the same theory? Yeah. I mean, I think the hard part with any of these sort of like pseudo centralized federated type of things is... Well, I mean, the validator can just always do the MEV themselves. The limit of the centralized thing is like, well, what are Facebook and Google doing? They're just doing MEV on their own auctions. They're constructing the bidding strategies for you. We're using the highest machine learning to give you optimal targeting. It actually means, actually, we're just going to front run you in our auction, but it's too complicated to explain how. So in the centralized world, these types of things are not that interesting to analyze from that perspective in the sense that the centralized coordinator will just choose the most expensive route for you all the time. But in the decentralized world, it's actually quite interesting because the user has to choose their own way through the network. So yeah, that sort of view. Great. We have one last question on that side and we'll move on to the next talk. So please go ahead. Yeah. Hi. I'm following up on the first question. In the RAS example, the conditions under which the routing would actually, or in which MEV would be beneficial is then, if you can teleport, right? These conditions are usually not met. You said under certain conditions this applies for AMMs. What are those conditions? Does it mean if I can trade, you know, print free money or trade at an unlimited or zero exchange rate? Or what are the conditions in which? No, yeah. Actually, that's a good point. So the zero is in the traffic example. In the AMM example, you can never have zero effectively in that edge. There's always some amount of liquidity price impact unless it's like, you know, a linear AMM. I think the main thing we showed is that the liquidity difference on certain edges on that graph relative to the center edge has to be large. So it's not necessarily that it's saying that, hey, you're teleporting or you have some sort of like non-balanced budget condition. It's actually just that the relative liquidity differences on different edges has to be high. And those are the conditions. And I'd say our proof is pretty pessimistic in our conditions and there are definitely ways of getting much better bounds on it. Awesome. Thank you so much. Please give a big round of applause for Tarun.