 Hi, everyone. My name is Felix. I'm working with an awesome team of people at Kauswap, and I want to talk to you today about how we can design fairer trading mechanisms for Ethereum. And I want to frame this vision based upon an idea of just having a single price per token per block. And we'll explore a little bit of why we think this is the most fair way of trading on Ethereum. The reason why we're talking about this is if we look at main adoption of decentralized trading, we can see we've made some progress in the last couple of years, but we're just seeing the tip of the iceberg here. Even digital asset trading as a whole, including centralized exchanges, is many times larger than DEX trading today. And when we want to get into more interesting markets like the US securities market or maybe the holy grail of trading, global foreign exchange trading, then we really need to step up our game. And I think, personally, that Ethereum has, as this credible neutral settlement layer, the potential of enable trading of all different parties in cross-nation, super-national actors. So I really think this global foreign exchange trading is a goal that we can strive for. So to talk about how we get there, let's first revisit a little bit the brief history, honestly, that we had in the context of decentralized exchange trading. And I want to frame this history based upon an article from Alvin Roth, who is an expert on market design and won a Nobel Prize in Economics a while ago, who wrote this essay on necessary requirements for a market to function in Harvard Business Review a while ago. And he mentions three properties that a market needs to at least fulfill in order to function properly. The first one is a good market needs to be thick. Thickness just meaning that there is enough liquidity that when a buyer and a seller come, or even just one side of them, they can actually interact. The second point that I will put a lot of focus on is what Alvin calls safety. And by safety, he means the market has to incentivize its participants to truthfully reveal their preferences. They shouldn't be holding behind the bush and haggling and kind of hiding their true preferences, but instead be incentivized to commit them kind of openly. And then the last point touches more on the scalability aspect, which I will not go into much detail here, because we know Ethereum as a whole is focused on getting scalability done, and we have all these great talks at this conference about ZKVMs, sharding. And so the hope is that with Ethereum figuring out scaling, we can basically piggyback on that scaling for Dex trading as well. And so if we look at how everything started a couple of years ago, the first Dex is on Ethereum, where Ether, Delta, IDEX, or ASIS basically on-chain limit order book DEXs. And those worked fine for some token pairs, like Ether, USTC maybe worked quite well, but they had a fundamental flaw, which was that they required active market-making participants to constantly update the quotes and the bids and basically keep the market flowing, keep the market in sync. And with the explosions of tokens in the space, it made it very difficult to bootstrap markets for new token participants or for new pairs and so what the problem with on-chain limit order books was that it was just eventually very hard to create thickness, create thick markets. And this is where AMMs came along. AMMs really solved the problem of liquidity provision and allowed every one of us to become a liquidity provider just by staking two assets into a smart contract that would then automatically sell them on our behalf based on some curve, based on some preference curve. And all of this started in the context of prediction markets way before blockchains were born. Robin Hansen had a paper on logarithmic, basically AMMs. And then in the context of Ethereum, we had many different teams pioneering more or less complex functions. Everyone of course knows x times y equals k. But really the key thing that AMMs brought to the space was overcoming the liquidity bootstrapping problem and creating thick markets even for long tail tokens. So what's the problem with AMMs? The problem with AMMs, and again we have heard, many talks about this at this conference, is MEV or how I will call it in this presentation pay-as-bit pricing. And pay-as-bit pricing comes from the fact that what you're seeing on, for example Uniswap if you're trading some tokens, is not actually what you are sending into the mem pool to be executed. This is a trade that actually happened a couple of weeks ago, somebody was selling $1 million on Uniswap and probably so on the UI that they would get 750E. But the thing that you need to add on Uniswap is a discount to the current fair market price, which is referred to as slippage tolerance. And you can think about slippage tolerance as basically how much volatility are you willing to accept in order for your trade to still go through. Blockchains are asynchronous by design, so there's race conditions and so the moment you click swap on Uniswap, somebody else might also be clicking swap somewhere else and therefore you need to price that volatility tolerance or slippage tolerance in. Now the problem with it is, if your trade is large enough, if the slippage tolerance is large enough, the block builder, proposer, validator, miner call them what you will, has an incentive to actually manipulate the prices and execute your trade exactly at your bid, at the bid that includes your slippage tolerance. And so this is what happened here. This person got sandwiched and lost $10,500 to the, in this case it was after the merge to the block producer or validator. And so this is really what makes AMMs fundamentally unsafe by design. The fact that you cannot be honest about your slippage tolerance. You basically have to lie to the AMM and say, hey, just set this small slippage tolerance because I know if I really tell you what I'm willing to accept, somebody is gonna sandwich me and run over me. And so maybe to go a step back and revisit, why is it important to have a safe mechanism design here or a safe market? The first reason is that safe markets are just fundamentally simpler to reason about and make conclusions that basically the system is secure and that the allocations is optimal and you find the right answer. The second reason why safe markets are better or important is that they're fundamentally more efficient than unsafe markets. Because if users are incentivized to reveal their true preferences, you can just look at the preference and find the globally socially optimal application in one round trip rather than doing multiple bids and asks and basically haggle around the table. And then the last point is maybe a more altruistic argument that safe markets are just fundamentally fairer to the least sophisticated participants. Tarun was talking about stealing from grandmothers. I personally think more about people that visit Reddit and find a new coin and then go on Uniswap trying to trade it and basically get wrecked. And yeah, the least sophisticated participants are automatically protected in safe markets. And so I agree with Moran O'Hara who's a professor at Cornell who says, especially on this problem of MEV that blockchain is not going to succeed if it's not viewed as fair. And so let's revisit the site that we saw in the very beginning. If we want to get larger market adoption, we need to design fairer and safer market mechanisms. So how do we build safety on top of AMMs? This is what the second part of this talk will focus on. The first thing that I want to revisit is what we think is probably the fundamental root cause of most of the MEV that's out there, maybe even all MEV. And that is that a single asset today on Ethereum can have many different prices within the same block. Here's an example block from, I think, a week and a half ago where the most liquid pair that exists on Ethereum, ETHUSD, was traded 11 times within the same block and at eight different prices. The difference between the lowest and the highest price in this block was more than 1%. And imagine the block really just happens at a single moment in time. That's what blockchains do. They freeze kind of the state of the world in a specific instant of time. And yet that instant of time told people, well, there's eight different prices for the most liquid pair. And for example, latency arbitrage. When you see a price change on Binance and you try to arbitrage it away against an AMM, that is an example of MEV that comes from one asset having multiple prices. Because the first person that gets to trade in the AMM still has the outdated price available and then everyone else in the block trades at the fair market price. We have one asset, many prices. The reason that liquidations cause MEV is because that whoever triggers the liquidation gets to trade at a discount, whereas the rest of the market trades at a different price. Rather than using the liquidation volume and put it into the fair price finding and just settle everything at a single price. And then the last point, the sandwich attacks we saw on the last slides, very obvious. There was three different prices, the opening, the victim and the sandwich. Again, one asset, many prices. And that's why we have MEV. So I argue that any market structure where prices depend on arbitrary, the block producer can choose it at no, basically at their own will, that arbitrary interblock ordering just makes the mechanisms unsafe by design. And so what is the solution? Well, you might have guessed it from how I've started this chapter, but the solution is to just have one price per token per block. And so with this look like, we basically associated with every Ethereum block have a price vector for every asset that is traded in the block and that asset just has a single price at which it can be accessed within that block. And this price here is nominated in dollars. It could theoretically be nominated in any currency you'd like, but the idea would then be that the participants that are trading in this block would be trading according to this single price clearing. So if you're trading ETH against Bitcoin in this block, you can basically get your exchange rate by just looking up the two values here and that defines what is your exchange rate in this block. And so this idea of uniform price clearing is very tightly coupled to the idea of not executing trades sequentially one after the other, but batching them together and executing them in one single batch. So now I wanna talk about how we at CowSwap have built a batch auction system on Ethereum. We've been live for a year and a half now and yeah, you can actually achieve this with everything that Ethereum offers today and just six simple steps. The first thing that we need to do is we need to stop people from sending raw Ethereum transactions because that's just the fundamental limitation of the protocol layer today. You cannot, when a user signs a raw transaction, you cannot open up this transaction, batch it together or do anything with it. The user signed it, so it has to be executed at this. But trading can also be done on an intent-based. Really what you do when you sign a transaction on Uniswap, you're just saying, I wanna sell token A for token B at a specific limit price. And so what we do is we collect users, user trades as trade intents rather than as raw transactions and we collect them over many different token pairs. So we basically have this multi-dimensional order book of signed trade intents, which we then combine with the entirety of on-chain liquidity that exists on Ethereum today. So all the AMMs you know about, all the RFQ systems you know about and that together creates a thick market. We saw earlier that AMMs are really responsible for the thickness and so by adding user orders to that liquidity pool we have the first criteria, which is a thick market. We then go ahead and now trying to find a settlement in which ordering doesn't make any difference in which at least all user trades are executed according to one single price clearing vector where each asset just has a single price. And so basically we want to find a uniform price clearing and we also need to find a concrete execution path. So basically meaning where do the tokens flow so that the demand and supply equal basically that we reach an equilibrium. In this case, for example, the maker token that the first user wanted to sell would flow directly to another user, that user would sell their use DC maybe on curve to die and then sell it to give it to the third user. And so we can in so-called ring trades mix and match AMMs together with direct peer-to-peer trading with the only, basically the only constraint that everything has to happen, at least everything between those hands has to happen at this uniform price clearing. Now the problem is that this poses a pretty hard optimization problem. It's basically an NP hard problem because we're acting over multiple dimensions not just on a two dimensional order book. But this problem can be quite well approximated or the optimal solution can be quite well approximated if we just maximize the total user surplus. User surplus is basically the price improvement you get on the user's limit price. So if the user was willing to buy ether at $1300 and you were delivering it at $1250, you would have given $50 of surplus to that user. And if we sum all the surpluses up together we get one value which we can optimize for. And by having this optimization criterion we can now dispatch this hard problem to a network of what we originally called solvers. Now we're starting to call it batch builders who are basically tasked to try to find the most optimal solution to this problem. And they could employ very different strategies or heuristics. Here we saw the settlement from the previous slide but you could have a solver that just goes and tries to settle every single user trade with the most liquid AMM on that pair. But by virtue of having this approximation criterion or optimization criterion we can now rank the different solutions and find the one that settles the user trade at the best possible price. And then that solution will get chosen and the proposer for that solution gets a protocol reward. And so we kind of moved into a consensus scheme where the leader selection is not based on work not based on stake but based on optimality. UI looks very much similar to what you might be used from your favorite AMM frontend. But here's an example of a batch that we saw I think around 20 days ago where two users were trading in the same. So we can see there's one high level Ethereum transaction but in that single transaction we have two people trading two trade intents. So we have one person that is selling the manifold token and another person that is buying the manifold token. And the first thing to notice here is that both people were executed at the exact same clearing price. Whereas if they had gone through a more traditional DEX mechanism one of them would have to go first and get a different price than the second one. In this case it was actually better to be the second because the trades were against one another. So you wanna first have the other person move the price in your favor and then trade. But basically by matching those at a single uniform clearing price removed all the games that the people in the batch could have played against one another and made the system more simple, fair and safe to reason about. The other thing that is cool is that because these tokens were traded exactly in the opposite direction which is what we call a coincidence of once you want the exact opposite of what I have. We actually saved about $40,000 in trading volume that we didn't have to send to Uniswap and SushiSwap because it could be settled directly peer to peer. So here we have one person buying 40,000 USDC and one person selling 48,000 USDC. And so in this specific example we actually not only got fairer pricing we also got a structural price improvement that only batching people together and trading people peer to peer can accomplish. Because we saved so much money that didn't have to go to the AMM we saved about $800 in reduced LP fees and we also saved about $1,500 in reduced price impact which stems from the fact when you trade against an AMM you're moving the price up and then when you sell against it you will move the price down again. And so this is how the solver competition I talked about is looking at the moment. We have, as of last week we had 12 solvers in production as of this week we have 13 solvers in production that are competing for finding the best solution. So we actually have quite a Peter Eugenia's landscape of different solver entities. And then there's an entire presentation from our data engineer Ghent that was given at Depcon which I highly recommend watching which compares the performance of Kauswap in terms of how much slippage can we actually or how much of the slippage can we actually give back to the user compared to other DEX aggregators in the space and we can show that we have substantially better performance compared to some of the other DEX aggregators. So for the last couple of minutes I wanna talk a little bit about Proposer-Builder separation or kind of the general direction I think that the ecosystem is taking with regards to MEV and why that could be or why I think this is dangerous. And I wanna start this by quoting one of my favorite columnists, the Moneystuff BBC writer Matt Levine who is from time to time repeating that, well, cryptos in the business of constantly rediscovering the basic ideas of financial history. And why this, I think this is true specifically for PBS is, I'll talk about this in the next few slides but you might have seen this graph before. This is basically trying to resemble the MEV supply chain going from a user that wants to make a trade and the trade being something like I wanna sell UCC for ETH, opening their favorite wallet or opening their favorite DAP which converts that trade intent into a transaction and sends that transaction and PBS to a network of block builders. The transaction will be something concrete like use Uniswap to sell $1,000 for example and then those block builders will try to collect transactions from a bunch of different places and propose a block to the actual leader of the consensus protocol, the validator for the next block. And so the validator is posed with a bunch of choices of blocks that they can pick from and basically the block builders are bribing the block proposer to accept their block by doing a max bidding kind of war. This meme is from John, I have to give credits. So how does a block builder actually get the money to perform this bidding? Basically block builders try to extract as much MEV from the transaction order flow they get and then pay back some or most of that in this max bidding war to the block builder. So what might a block builder do in order to get an edge in this game? Well, they might try to find deals with wallets to get exclusive access to order flow. If they are the only one who can extract value or even just pose this transaction for its transaction fee into the block that they propose, they have an advantage over other block builders. And so it could be that the flow just stops here, wallets are starting to receive an extra income, that's nice, they might take that. That would be very terrible for the user. Maybe in a slightly better world, the wallets will pay back some of that returns to the user and maybe give the user something like free transactions or commission free trading at least. But if we're in this world, then we've literally just reinvented traditional finance because the brokers, brokers such as Robinhood, receive payment for order flow from market makers or wholesalers such as Citadel Securities, Jump, Jane Street, but it's just really a handful and then offer commission free trading to their end users. And I'm not saying that PFOF is bad actually in traditional finance, there could be, there's arguments on each side, but what I try to stress here is that we've learned from traditional finance that this mechanism doesn't work in a decentralized fashion. Market maker, there's just a handful of them, they're highly regulated, without the SEC, users would be run over. There's basically this law that requires market maker to give people a price improvement on top of the official bid and ask that they see on NASDAQ and New York Stock Exchange. So you require regulation in order to make this market safe for the user and it is just a centralized system. So if we really wanna get Ethereum to be this credible neutral sediment layer, we cannot reinvent this system and work with traditional finance. The other thing that I hear a lot is, this narrative around MEV maximization is great, we all have to focus on MEV maximization. Sure, we should minimize, but we need to maximize the shit of what's out there. And I just wanna pose the question of these two philosophies, MEV maximization and minimization can coexist at the same time. Because at least in my mind, MEV maximization leads to very dangerous incentives for the participants and creates an extremely hard coordination problem that MEV minimizing protocols such as COSWAP need to overcome. Right now, we are in a, you could think of a MEV reducing protocol or an MEV reducing builder to having to play a repetitive, prismous dilemma where in the current status quo, everyone is extracting MEV, so everyone is making a little profit. If you now were a block builder that wanted to operate without the rent from MEV, you would deflect from the extraction, but you would basically not get any rewards from MEV and everyone else would get slightly more. And it would require the entire space, all builders to cooperate in order to achieve a new equilibrium in which we'll actually hopefully are all socially better off. Definitely the people that are trading because they're not getting racked, but even the people that are validating, I'd argue that in this system can make much more money from transaction fees and just adoption. But really this requires all builders to cooperate, otherwise we'll not get into this new equilibrium and what we see today is that basically everyone is focusing on the top left corner and the status quo is to fight over the existing MEV that's in there and potentially even fight against new entrants that are trying to propose MEV reducing protocols because basically that's eating the searcher's lunch. And so my call to action here at the end is let's not focus on MEV maximization and split the pie that's out there because it's tiny compared to what we want to unlock. Let's work together and grow the pie and try to get Ethereum to the next order of magnitude of adoption. And with that, thank you very much. There we go. All right, hey, great talk by the way. So I have a kind of a quick question, right? What you've done is you've taken a hard problem. You have made it an NP hard problem. You have an NP hard problem which is like this very complicated auction which brings a bit of a difficult situation because NP hard problems kind of by definition are very sensitive to people kind of manipulating things and adding solutions. And I think if I recall correctly, Bancor had some interesting issues with this. So why not, for example, one simple condition to have one price for many assets is like one price for many dexes for specific assets is just to do optimal routing. And optimal routing is a convex problem. You can do it efficiently. It's very simple to solve. Why not just do that instead? Yeah, so I think just having one price per token pair per block is I think what you're suggesting that would already be a huge improvement to the status quo and it would be very computationally feasible to solve. I totally agree with that. I think the reason why we're aiming for multi-dimensional batch auctions is to make the life of our solver team harder, of course, but also to, because we know that or we've seen that the token space is just absolutely fragmented, right? That there's no cost for somebody to launch a token. And so even if we just look at US dollars, there's 10 or 15 different stable coins that are all trying to resemble the US dollar. And so sure, we might have then one token per, one price per token pair on USD ETH and DAI ETH and L USD ETH, but we would still have this implicit fragmentation and this implicit arbitrage. And so we think the most efficient way of arbitraging the if USD C to DAI is one one and then ETH DAI is 1300 and ETH USD C is 1200, you still have some imbalance in that, right? And so I mean, I agree with you, it's a good first step maybe, but we kind of already aimed for the second, the holy grail is refragmenting the, re-aggregating the fragmented liquidity space that we have on Ethereum and therefore we went multi-dimensional. Great talk, I think, like one question on kind of like seeing liquidity effect ran between L1s and L2s, how do you see it kind of like, is there a way on how cause or could settle like cross layer or one like cross layer twos because I think like, yeah, it's probably like the next problem in like every view. Yeah, I mean, yeah, we are definitely, I think one problem that we're trying to solve rather sooner than later is to just access liquidity on another chain through the solver abstraction. So right now, if you're for example trading on polygon a large amount, you have to potentially bridge to mainnet, trade there and bridge back and that's kind of annoying from a user perspective because we already have this abstraction of solvers that can just happen under the hood, right? The solver can do the bridging, swapping, bridging back for you and just needs to let you know that you might have to wait a little bit longer but you as a user don't have to worry about it. But then of course the true holy grail is to just have one price per token per block across many chains. And I think it's a very interesting research problem which we've touched the surface on but not gone super deep yet. Synchronosity between chains. Maybe you have to do some locking of funds. There's actually Mohammed is sitting in the crowd. There's actually a hackathon project at ETH Amsterdam that looked a little bit into this but yeah, it's very early days for that. So nothing that you could build on right now. Thank you for the links. Thank you.