Become a Creator today!Start creating today - Share your story with the world!
Start for free
00:00:00
00:00:01
Ava Labs x CBER Ep 5: Loss-Versus-Rebalancing (LVR) at Decentralized Exchanges image

Ava Labs x CBER Ep 5: Loss-Versus-Rebalancing (LVR) at Decentralized Exchanges

S1 E5 ยท Owl Explains x CBER
Avatar
4 Plays11 months ago

This episode discusses the costs of liquidity provision at Decentralized Exchanges. Ciamac Moallemi (Columbia University) explains that liquidity providers at a Decentralized Exchange always face a loss relative to an asset portfolio that actively rebalances to match the asset weighting of the Decentralized Exchange at all times. This loss, known as Loss-Versus-Rebalancing (LVR, pronounced 'Lever'), is the primary cost of liquidity provision. Design refinements to mitigate this cost are discussed.

Recommended
Transcript

Introduction to 'Crafting the Crypto Economy'

00:00:06
Speaker
Hello and welcome to Crafting the Crypto Economy. I am Silvia Sanchez, Project Manager at OWL Explains by Avallabs, and today we bring you a transformative podcast series in partnership with the Crypto and Blockchain Economic Research Forum. This series features leading faculty from renowned global universities exploring various elements in the blockchain ecosystem. These episodes are a bit longer than our usual hootenannies, since we will be getting very deep.
00:00:33
Speaker
And also, each episode will have its accompanying paper posted on our website for further reading. And with that, I will hand it over to our moderators, Fahad Saleh and Andreas Park.

Exploring the Goals of the Series

00:00:43
Speaker
Hello and welcome, everybody, to the Craft in the Crypto Economy podcast series presented by Aul and Saibar, the crypto and blockchain economics research forum. I'm here. I'm Andreas Park. I'm here together with Fahad Saleh and Shiamak Mualemi.
00:01:01
Speaker
And what we're trying to do in this podcast series very broadly is to explain to the audience how new applications emerge in the world of decentralized finance based on blockchain technology. Now, one of the biggest innovations, in my opinion, in this space is the emergence of so-called automated market makers. It's a generally new trading institution. And there's a lot that needs to be understood. There's a lot of development still going on in this space.
00:01:31
Speaker
And what we try to do as academics, we try to bring some clarity to the workings and maybe the underlying mechanisms that drive these innovations. I'm very excited to have Chiamak Mualemi here to talk about his work on automated market makers.

Siyamak Mualemi's Blockchain Journey

00:01:48
Speaker
And I believe that it helps us greatly to understand how these systems work.
00:01:54
Speaker
Now, what we're trying to do in this podcast series is we try to be appealing to both a general audience that just wants to get started and get a loose idea of how this works. And then also we want to keep it sufficiently interesting for those that have very deep background knowledge and maybe more interested in some of the nitty-gritty details. So with that, maybe we should just dive right into it. Fahad, do you want to maybe start off with asking Sheermaq some questions?
00:02:23
Speaker
Well, why don't we actually start by having Siamak maybe provide some context on his own work as an overview, as an introduction to our audience. So Siamak, please take it forward. That's a good idea, Siamak. Who are you anyway? So let's stop with you and introduce you. Thanks, guys. And thanks for inviting me here. It's a pleasure. So I'm a professor at Columbia University. My main research interests are twofold.
00:02:53
Speaker
First of all, I'm quite interested in stochastic control, dynamic programming, these type of methodological issues, problems where you have to make decisions over time, and there's significant uncertainty about the future modeled through probability. And of course, I'm not a pure mathematician. I teach in a business school, so I'm interested in applications. And the main applications I think about are in quantitative finance. So things like quantitative trading, market microstructure,
00:03:21
Speaker
and so forth. And in the past few years have become quite interested in blockchain as well, which is which is presumably why I'm here today. You know, I started out with some work maybe five or six years ago on transaction fee economics of L1s and so forth. But really, I got much more excited, you know, in, you know, late 2020, early 2021, when I started to learn about DeFi.
00:03:47
Speaker
Being a market microstructure person, it's very natural to be interested in this new type of microstructure.

Understanding Automated Market Makers (AMMs)

00:03:58
Speaker
The origins of DeFi and in particular decentralized exchanges, they go back to a line of work in this area called prediction markets back in the 2000s.
00:04:13
Speaker
And I had worked in that area also. And when I first heard about ideas like Uniswap, I was like, this is a bad idea. There's no way it can work based on this old prediction market literature. That stuff never took off, someone so forth. And obviously, I was massively wrong. And the proof is in the pudding that the fact that by some metrics, Uniswap is probably the most popular applications on blockchain that there is.
00:04:41
Speaker
And so I always think there's something interesting to learn. So this is actually, I find it very interesting how you describe this. I think almost everybody who has actually worked on these markets that I've talked about, particularly on Uniswap and on these constant product automated market makers and so on, had the same idea. They look at this and they go, how is this possible? This can't possibly make sense.
00:05:04
Speaker
Um, and then, you know, anybody who looks at it actually gets rather excited about it. So maybe explain a little bit about your journey. What, what is it that actually got you excited about it other than you just being wrong and it being used? Well, actually before, before you take that question though, um, just to level set our audience, we don't know how many people in our audience here are totally familiar with what we mean yet by automated market makers, et cetera. Uh, Siyama, could you just kinda maybe, uh, describe to sort of, uh,
00:05:33
Speaker
a relatively lay person, what an automated market maker is. Good. So the starting point is that you want to trade on chain, right? So you want to have a decentralized exchange as opposed to a centralized exchange.
00:05:50
Speaker
in a centralized exchange, which would be something like Coinbase or Binance or, heaven forbid, FTX, you have to trust somebody, whoever's operating that exchange, maybe they're in custody of your assets. We know all kinds of things can go wrong there and have gone wrong. So I think there was a vision that, look,
00:06:18
Speaker
sort of like everything else on a blockchain. If we can have it as a smart contract, the mechanics can be executed through a blockchain in a trustless fashion. And maybe we can avoid some of these issues that have come up with centralized exchanges.

Centralized vs Decentralized Exchanges

00:06:35
Speaker
Now, going back to how centralized exchanges work, really the dominant paradigm, maybe 90 plus percent of liquid electronic markets,
00:06:45
Speaker
are sort of the electronic limit order book, right? And so maybe the starting point would be like, look, if we want a good mechanism for decentralized exchanges, we should take that mechanism for centralized exchanges, which is this limit order book.
00:07:00
Speaker
And we should just implement it on a blockchain. So it turns out that doesn't work. It doesn't work for two reasons. So the first reason is that the way to think about a modern smart contract blockchain like Ethereum is that it is a computer. But the second thing to note is that it's an extremely slow computer. It's slower than maybe any computer you've ever interacted with, maybe like a computer from the 1970s or something like that.
00:07:29
Speaker
And when you think about a modern limit order book in a liquid asset, you may have instances where traders are frequently updating their orders. You might have thousands or tens of thousands of messages in a second. So where we are now, modern blockchains, for the most part, do not have the capacity to deal with that. So the first issue was computational. The second issue, which is, I think,
00:07:55
Speaker
maybe more interesting, even deeper, has to do with the nature of how exchanges operate in that, of course, there are mechanisms for, let's say, an organic seller to sell an asset to someone who's an organic buyer who has sort of natural demand. But for that to work, they are typically intermediated by market.
00:08:16
Speaker
So if Fahad, if you're coming to sell and Andreas wants to buy, likely you do not arrive at exactly the same time and I might be a market maker and I'm going to step in the middle and I'm going to buy from you and hold it as inventory for a little bit and sell it to Andreas. So these market makers are kind of the glue that hold together that sort of market

Liquidity Challenges in AMMs

00:08:41
Speaker
structure.
00:08:41
Speaker
What was going on in the crypto world around 2000, let's say 17 to 2020 was at the same time that there was this desire to trade in a decentralized way, there was also this massive explosion in the number of tokens. And we can argue as to whether they have real economic functions and speculative or policies or whatever. But the reality is these were instruments that were less liquid.
00:09:07
Speaker
And from the perspective of market making, there's sort of a catch-22 in there. On the one hand, for market makers to be interested in making markets in an asset for setting up the models and investing in the fixed cost and the effort and so on, you need a certain amount of volume. On the other hand, if there's no market making, if the spreads are very wide and so on and so forth,
00:09:32
Speaker
of people won't show up. And so there's kind of a chicken and egg problem there. So kind of the second issue that needed to be addressed is how can we make markets without professional marketing? Andreas, I see you want to jump in. Yes, a very brief pause for us to cut. If I could ask you if you could try to build in a few breaks when you talk so that we can have a little bit of a back and forth.
00:10:02
Speaker
That would sound more organic, right? So because there's lots of points where it would probably be useful to ask you follow-up question, right? Because you go over the points very, very quickly and then it's more dynamic and it's actually easier for people to listen to if there is a back and forth in the conversation.
00:10:18
Speaker
If that's okay with you, so if you could try to consciously stop after some sentences so that and take a breath so that we can continue, that we can ask questions that would be probably very useful. Okay. Okay. Sorry. Um, because it's a few things I would like to interject here. Uh, so let me interject one thing. Um, so if I just to take a step back and to just keep it on an even higher level is a blockchain itself is not a marketplace, right? So marketplace is a place where people come together.
00:10:47
Speaker
And finding that and building such a marketplace to come together is a tricky problem, as you say, right? So liquidity providers have one role or could be one role how to organize it, but it's really difficult to get people to agree on some certain terms. And maybe can you explain how automated market makers solve that problem?
00:11:08
Speaker
Sure. So the spirit with with with automated market makers is from the perspective of the market making side is to try to make it passive. The idea is we can no longer rely on these active market makers companies like let's say Citadel or Virtu or so on. They may not be interested in this illiquid assets. So we would like a kind of market structure.
00:11:33
Speaker
that would allow people to make markets without sort of having models and running computers and so on and so forth. I think that's actually a really interesting component of it because in traditional markets, you have maybe in the US, how many assets do you have? 10,000 stocks or so, 8,000 stocks to trade. But of those, only a very small number actually trade regularly.

Uniswap Evolution and Liquidity Management

00:11:58
Speaker
And there's very little liquidity then. And funnily enough, the market makers, as you said, that you mentioned virtual and Citadel and so on, they're actually active in the ones where there's a lot of activity to begin with, right? So here this is a, you know, automated market makers possibly given, give a solution where, you know, you can have maybe is use capital and use, use owners of assets to be the liquidity provider rather than professional firms such as Citadel and virtual.
00:12:26
Speaker
So explain how does this work? So on a very, very high level, how does an automated market maker actually operate? So the origins of this stuff is in this world of prediction markets, where there was sort of the same problem. The idea of prediction markets was, let's have corporations set up markets to place bets on events of interest. For example, is it going to rain next week, right?
00:12:52
Speaker
And so by trading contracts, which would pay off whether it rains or whether it doesn't, someone could sort of learn about that. Now, the immediate problem is in that context, you need market makers as well. So in sort of starting in that literature, they started building these kind of rule-based market makers where rather than deciding when to provide liquidity and how to do that in a sort of discretionary sort of model-driven fashion, the mechanism pre-specifies it with foreign
00:13:21
Speaker
So it's almost like a bookie. Is that what you're saying? In a way, it's like a bookie, but a bookie that doesn't have to think. So an actual real bookie would be adjusting the odds as bets come in, right? The automated market maker, the algorithm doesn't.
00:13:37
Speaker
Okay. I want to stay on the mechanics here and take it to a level that is familiar to people who aren't even familiar with say market microstructure, et cetera. So if I think about, for example, putting in a trade as a retail investor in a traditional market, let's say through my online brokerage, I might go in and there's some asset I want to purchase. Let's say I want to buy and I can put in a limit order or a market order. So could you just
00:14:03
Speaker
give context to our audience here. So what's the equivalent of that choice of limit versus market, and how is it operationalized on Uniswap? Good. So at a high level, you can think of a market order as taking liquidity, right? So on a system like Uniswap, that's what an incoming swapper would do. They would take liquidity. So that's, I think, very analogous to a market order.
00:14:29
Speaker
Now, a limit order, again, people use them for different purposes, but at a high level, that's the way a market maker would trade. A market maker would put in limit orders, let's say, to buy at a price lower than what they think it's worth, to sell at a price higher than what they think it's worth. But the point is, they have to make decisions about that. They have to decide, where are my limit orders going to be? What is the price? How do I adjust? And so on. In a system like Uniswap,
00:14:57
Speaker
Once you're like let's say Uniswap V2, once you decide you're going to be a market maker, you decide how much capital allocate and that's it. Built into the Uniswap V2 protocol is a particular liquidity curve which says at this price level you will sell this much, at this higher price level you will sell that much and so on.
00:15:17
Speaker
Or if the price goes down at this level, you will buy that much at this lower level, you will buy that much. So that is all specified. And the only decision really is if you want to participate, if you want to be a liquidity provider and how much right once you once you sign that transaction and you make your LP shares, then it's passive until you decide that you don't want to.
00:15:40
Speaker
Right. So in terms of thinking about the intellectual evolution of how this sort of came about, one of the ways that I think about it related to kind of what you were saying is that, so if I think of myself as the retail investor in a traditional market and I compare it to being a, let's say a trader in the context of Uniswap.
00:15:58
Speaker
Uniswap from the side of traders is, of course, only offering market orders, right? As you were saying, basically, you use the term swap. Every single trade that a trader does at Uniswap, if I understand correctly here, is a spot swap. So, for example, when we talk about something like buying Ether, what's actually happening is
00:16:16
Speaker
Well, let's say I have some stable coin like USDC, I'm swapping the USDC to get some Ether, right? And so all the trading is spot swaps. And so you're saying like the limit order side really goes into sometimes what we think about the other side of it, which is the liquidity provider or the investor.
00:16:33
Speaker
But actually, then there's this interesting piece in the evolution of Uniswap. And you alluded to V2, where we say that it has uniform liquidity, right? What you were getting at, that the liquidity provider doesn't really explicitly specify a price point.
00:16:50
Speaker
So could you talk a little bit then, maybe a bit rehashing but providing more context on this point about how Uniswap v2 operates in terms of the degrees of freedom,

Balancing Portfolios within AMMs

00:17:06
Speaker
let's say.
00:17:06
Speaker
That liquidity provider has in terms of determining how to provide liquidity and contrast that with sort of a traditional limit order book. And also, maybe if you could lead us into the V3 world where the liquidity providers seem to have a little bit more discretion.
00:17:24
Speaker
Sure. So let's maybe start with Uniswap V2. When people usually talk about Uniswap V2, the way that they talk about it is that it has this invariant, which is a constant product invariant, that the product of the reserves in the two tokens is constant. I actually think that's not the
00:17:48
Speaker
That's not important at all. That's a little bit of an implementation detail. The way that I think about Uniswap v2 and I think the genius behind it is it's a little bit of an algorithm, right? You put in two tokens and the way that the formulas are set up is as the price changes, the quantity of the tokens in the system will be adjusted so that they maintain equal value.
00:18:14
Speaker
That's sort of the fundamental thing. Fundamentally, what it's doing through the action of people trading against it, through people arguing it,
00:18:22
Speaker
against other markets and so on. It's balancing so you hold the same quantity of both tokens. If I can interject quickly, so then I can think about the liquidity available at Uniswap, let's say V2 for the moment, as a portfolio is part of what you're saying, right? Yes, it's a particular, you're committing to a particular portfolio where from the formula, you're going to hold equal value in the two assets at any given price level.
00:18:50
Speaker
Right. So if I look at, let's say a liquidity pool for Uniswap V2, ETH versus USDC, you're saying this is effectively, the assets that are there are effectively a 50-50 portfolio between ETH and USDC. That's right. So you can go to the Uniswap website right now and you can look at a snapshot of what the reserves are in their V2 wrapped ETH USDC pool. And you'll see it's roughly, you know, maybe almost exactly 50-50 in dollar value between USDC and wrapped ETH.
00:19:21
Speaker
And so, could you say then, I think you were going into sort of the evolution of the thought process. Right. So I think that's sort of the key feature. Now, if you think about that a little bit and you do the math, right, in order to hold equal value of ETH and USDC, what's going to happen is that the ETH price goes up, right? You're going to sell ETH, right? Because if you don't sell ETH, then you'll have more ETH than USDC.
00:19:47
Speaker
Similarly, as the ETH price goes down, you're going to buy ETH. Because otherwise, again, you couldn't maintain the invariant that you're going to hold the ETH value in each. And if you look through the... So if I can interject, there's an important piece here. So if I were to think about, let's say I'm a portfolio manager and I have a mandate to maintain a 50-50 portfolio across, let's say, ETH and USDC just for the sake of argument, then exactly as you're saying, when the price of ETH goes up, now I'm actually overweight ETH and I need to sell some ETH.
00:20:17
Speaker
But actually, one of the important points that I think your work makes a really clear point about this is that the active portfolio manager analogy I just used isn't actually what's happening at Uniswap. So what is the difference between, let's say, me being an active portfolio manager, who's, say, trying to maintain a 50-50 portfolio and trading at market prices versus if I were to provide liquidity at Uniswap V2, where ostensibly I have a 50-50 portfolio,
00:20:46
Speaker
And it's rebalancing, I guess, to maintain the 50-50ness. But it's not quite the active portfolio manager, right? So it's a little bit different. And that's at the heart of a bunch of my work. So the difference is if we take this sort of hypothetical model where you're an active portfolio manager,
00:21:04
Speaker
And maybe you are trading on, let's say, finance, right, to maintain this 50-50 split. We can sort of think at a high level, you're probably getting fair prices. Like, maybe you're paying, you know, bid-ask spread or, you know, some fees, so on and so forth, right? But roughly speaking, you can argue that you're getting fair prices. Now, if we go to Uniswap, Uniswap is a contract on change.
00:21:29
Speaker
If I'm going to argue that it's maintaining a 50-50 split, there has to be a mechanism. And it turns out that the mechanism for that is arbitrageurs. The formula allows exchange of ETH for USDC and vice versa in a certain way, such that arbitrageurs are incented to force the reserves to maintain that balance.
00:21:56
Speaker
And the way that they are incented is if the like the value of the let's say goes up and The pool is a little bit out of balance now an arbitrageur can come in and by pushing your imbalance Make a little bit of money right now The second somebody is making money and it's in a short-term trading context You've got to ask where is the money coming from right because short-term trading is in some sense a zero-sum game
00:22:20
Speaker
And the answer is it's coming from the liquidity provider. So it's kind of like doing that 50-50 rebalancing, except there's a cost on top

Fee Structures and Market Participation

00:22:29
Speaker
of it. So if I may interject here. So if I take the perspective of the average Joe that wants to become a liquidity provider, which is in some sense, you can think about it is because liquidity provision is passive and you don't really have to think about it. So what really happens is that if the price moves in the broader market,
00:22:47
Speaker
is that I have to give up the asset that is becoming more valuable in favor of the asset that becomes less valuable. So I'm making a loss there. And essentially I would make a loss in every single trade, right? So why would I wanna do it? What gets me to, what compensates me for that loss? So the flip side is that there's fee income, right? So on the one hand, you're gonna lose money to these arbitrageurs who are gonna make a little bit of money
00:23:14
Speaker
pushing you back into the right quantity of each asset at each price level. But there's going to be other people, let's call them noise traders, which is sort of the term we like to use in finance. And those people are arbitrageurs are only trading against you when you're going to lose money. But noise traders are trading from you for their own reasons, for let's say idiosyncratic reasons.
00:23:37
Speaker
And so when they trade, you don't systematically lose money on the trades, but you do systematically make money because you collect fees on trade. So I think at a high level, one way to sort of, if you squint your eyes, one way to look at the trade off of an automated market making protocol is you're gonna get fee income and you're gonna pay adverse selection. We like to call this adverse selection lever, loss versus rebalancing, motivated by the discussion we just had. And the question is which of these two is bigger?
00:24:07
Speaker
So I can think about it maybe as follows then, so as you describe it, right? So it's like, okay, so I have to take it on the nose. Every day the prices will move.
00:24:17
Speaker
And I will lose against these arbitrageurs, but I will make money. Just to make sure that our audience is following exactly here. So I think one thing that's implicit that we should make explicit is the automated market maker is providing a term of trade, essentially a price for this swap. And the price is a function of the inventory that the automated market maker has available.
00:24:44
Speaker
What we're discussing here then is that this idea that you can imagine that the price at the AMM is initially aligned with the price away from the AMM, but then something happens and the price away from the AMM changes. But the thing is that this AMM is mechanically giving the same price that it was before. And so the arbitrageur is basically swiping, jumping in. So for example, if the price of ETH has gone up, then the arbitrageur is going to start buying ETH.
00:25:13
Speaker
from the decentralized exchange, which is going to cause the AMM to then push the price up because the AMM is mechanically pricing based on the inventory. And now you're pulling ETH inventory out, which is going to force the AMM up and that gets us back to sort of a line. I think there's a little bit, there's also a subtle difference there too, right? Because in AMM, in a market like on Binance and so on, you can change the price by changing quotes, which is something you can't do in an AMM, right?
00:25:41
Speaker
Liquidity is provided only at the margin of price. So no matter what you do, how much liquidity to add or extract the price has not changed. So everything comes from trades. What I was getting after is you will lose against those folks that have to, when there is a broader market price movement, you lose against people, right? And you have to get the income from other sources. So I try to bring this out because
00:26:05
Speaker
If you think about how a market like a stock market works is precisely that liquidity providers try to avoid the loss against the arbitrageurs while only providing liquidity to the people that have actually, from whom they can collect the fees. Philosophically, there's actually a big difference here because in an AMM, it seems like I'm willing to take a loss against some by being explicitly compensated for fees, whereas on another market,
00:26:35
Speaker
There is a constant game where some people try to step out of the way when bad things happen. I think that's probably a fair depiction of the differences in the market in, you know, philosophically, you know? I think so. I would just sort of, you know, phrase it as, you know, maybe passive versus active market making.
00:26:54
Speaker
Yeah, OK. So maybe we should then, OK, so how do you have asked earlier about the difference between the V2 and the V3 version? I mean, on a very high level, how would you describe that, Cemak? So the main innovation in a V3 is this idea of concentrated liquidity.
00:27:19
Speaker
Part of the issue with V2 is that you contribute these assets. They balance in a 50-50 ratio. But in some sense, if the price moves a little bit, to maintain that 50-50 ratio, actually very little is traded. So most of the assets there are mostly sitting there most of the time. The quantity that's actually being traded that, for example, you may make fee income off of is very low.
00:27:48
Speaker
And so, hence, this is very capital inefficient, right? So the idea of UNISWA V3 was to potentially reduce this capital inefficiency by allowing one not to just post broad range, but even say, look, I'm gonna post a bunch of money and I'd like it to be sort of a 50-50, right? But instead post over narrower ranges, right? Where at one end of the range, you're gonna be all in ETH,
00:28:15
Speaker
at the other end of the range, you're going to all be in dollars, and the transition will happen in a much smaller range. So relative to the quantity of capital that you post, much more trading occurs. So I think this is actually very important. If you take a step back and think about whether or not, if we wanted to use, say, an AMM for an automated market maker for real assets,
00:28:41
Speaker
I think one thing that's really important is that you always need to deposit two assets, one which would be, say, the risky asset, like a stock, if it would exist in tokenized form, another one would be cash. Now, cash, the stock is actually cheap because you have it anyway as an investor, let's say, passively, it sits around in your brokerage account, you can't do anything with it. But the cash is expensive because you have to actually take up a loan to inject the cash, right? And so if you have a more
00:29:08
Speaker
capital efficient AMM, then that should be a way how you can create a lot more trading or enable a lot more trading at much lower costs. That's right. I would also just overlay that in traditional markets also there's extensive credit arrangements, right? So like when a broker trades on like NASDAQ, they're actually not putting up all that money, right? Because there's like, you know, there's all these credit arrangements and there's trust and there's legal
00:29:36
Speaker
and so on, right? The ethos in decentralized finance is basically trust no one, right? So if you can't trust anyone and you need these assets and reserves, well, the only way to do it is to actually post them.
00:29:50
Speaker
Right. So while that creates, that's another question. That's another issue here, which I think actually many of us in finance are excited about because there's a lot more certainty. You know, settlement risk is reduced. This actually is a real problem in the markets, as we know, right? So there's millions every day that don't get settled properly, which creates risk and cost. We knew this from the Robin Hood episode, where Robin Hood at some point couldn't post enough capital to secure their positions, the trade that they may be engaged in. That's not a problem in DeFi as such.
00:30:17
Speaker
There's others, but you know,

Strategizing Liquidity Provision

00:30:19
Speaker
that's. Yeah, no, I think you could argue. I mean, you could also argue that providing credit I think makes a lot of things more more capital efficient. So, you know, I think Robin Hood was definitely an instance where it sort of broke down. But, you know, I'm personally a little bit on the fence of whether that's good and bad. I think they're pros and cons. But the reality is in the blockchain world, it's not even an option.
00:30:45
Speaker
Maybe we should try to circle back now to your specific paper that you've written here and that we want to discuss a little bit. You have done many papers, of course, in this space, but I want to talk about the one that you've done here, which helps us, I think, understand the economic mechanisms and the risk mechanisms a lot better. Can you run us through the basic idea that you have here? Maybe I'm just going to
00:31:12
Speaker
You know, start from the, from maybe trying to be a little more late as a lay person here. So, so she, I'm like, has written a paper with, with a, with a number of co-authors on trying to translate essentially how we think about automated market makers and the automated process of the liquidity provision in terms of the risk return balancing in terms of a portfolio strategy. So, I mean, this may be a little too squishy for you, but so maybe how about you, you explain,
00:31:42
Speaker
first, how you think of the how you try to translate this function into into a trading strategy. Okay, so let me just sort of start from the beginning, which is what is a question we want to answer, right? The question we want to answer is, is it a good idea to be a liquidity provider? Like, what are the economics of a liquidity?
00:32:01
Speaker
And if you sort of start out and look at what is the profit and loss of a liquidity provider, it turns out that the number one thing that is the most important thing is asset prices. So again, if you're a liquidity provider, you're posting assets into this pool. For example, maybe you're posting ETH and a USDC.
00:32:27
Speaker
The number one driver of your P&L is going to be, did the ETH price go up? That's it. Because if the ETH price went up, your reserves are worth more, like independent of maybe exactly how much you have in reserves. If it went down, they are worth less. But in some sense, that's not interesting. Because if you really want to make a bet on whether ETH is going to go up or down,
00:32:46
Speaker
you should sort of directly buy and sell ETH, right? So what we wanted to isolate was what's special about the AMM, right? And what is unique about that versus just otherwise a trade in ETH, right? And so that leads to this idea of the rebalancing strategy, right? So the rebalancing strategy, for example, wanting to hold 50-50 in each asset could be an alternative that you could implement
00:33:17
Speaker
Right? And so maybe that's the right comparison for investing in the AMM. Look at what your profits are in the AMM versus the rebalancing strategy.
00:33:29
Speaker
And if you do that comparison, you see that your profit is different in two ways. One way is that you get this fee income. So swappers are coming in. They're paying a fee. You're going to collect that. If you're simply balancing on your own, there's no fee. But the second way, which is the way that we focus on, is that you systematically fall short of the rebalancing. And that is because you're always being rebalanced at slightly worse prices than rebalancing.
00:33:58
Speaker
So is that a consequence of the particular pricing function, or is this a mechanical issue? It's a mechanical issue for all pricing functions. So what would change if you had a different pricing function, if you had a different curve, maybe not constant liquidity, maybe something else? The thing that would change is exactly how fast you're buying and selling as prices move up and move down.
00:34:27
Speaker
But whenever you're buying and selling again, because it's only going to happen when arbitrage comes in and corrects the value, you're always trading at suboptimal prices and you lose a little bit.
00:34:39
Speaker
So this is actually a very deep point in the context of blockchain, right? Because essentially the thing that's causing it is the fact that the blockchain can't figure out what real-time prices are, and therefore there's going to be a mechanical formula as a function of things that the blockchain knows, for example like whatever inventory happens to be there.
00:34:59
Speaker
that's going to determine the price you're trading at on the blockchain. And to the extent that there's a divergence between that and the real price, the liquidity providers are going to bear the cost of that. But then from the perspective of, for example, Uniswap, who would hope to have a lot of liquidity provision.
00:35:17
Speaker
So they basically have to say, look, we know that you're going to face this cost leaver when you're providing liquidity, and we're going to give you some offsetting fees. Do you have any thoughts in terms of sort of the balancing of those sorts of things? Like if I'm thinking about this from Uniswap's perspective about how I should try to ensure that that fee revenue can compensate so that I'm able to generate liquidity provision, do you have any thoughts on how they should think about this?
00:35:47
Speaker
But how to mitigate lever? Well, how to get the TVL as high as possible, I suppose is one way of saying it. So I would just start out with that. I think this idea, the lever idea, is very sort of practical and applicable. A starting point is that many times in DeFi, I don't know exactly what Uniswap does, so I'm not making any statement about them, but many times you see people will quote APRs. And usually the APRs are just
00:36:17
Speaker
They say, OK, we earn this much in fees, and here's our capital base. So your return is going to be 20%. And what we're saying is no. At least for these AMMs, yes, let's count that 20%. But also, maybe you're paying 15% in this cost of arbitrageurs, and you have to factor that in. So it becomes a very sort of tradable model.
00:36:42
Speaker
compute this quantity, you can subtract it, and you can make the assessment of is the gain better or worse than the cost I have, and it might be different for different assets, different computers, different pools, et cetera. Can I interject? I would also try to understand the rebalancing strategies just slightly better. In some sense,
00:37:08
Speaker
If I would be a dumb market maker on something like Binance, so I just post a set of limit orders, and I don't actually adjust them on a regular basis, then the same problem would arise. Is that correct? Yeah, so actually, actually, I mean, I think one thing that is not that different from an AMM, it's different in a couple of other ways, which we can get into if you want.
00:37:32
Speaker
But roughly speaking, you know, again, there's a function where as the price goes up, the AMM is going to sell at a certain rate. You could accomplish the same things by putting a string of limit orders in at so that as prices go up, you sell and as prices go down, you buy.
00:37:50
Speaker
that could accomplish something very similar. However, that's usually not the way people trade a limit order books. Usually when you're making markets in a limit order book, you assume that like maybe the mid price is a fair price or maybe you have a model for the mid price and you sort of hang out orders to buy a little bit below and to sell a little bit above and you try to adjust it.
00:38:14
Speaker
And I think that mechanism of adjusting it is trying to avoid people running over you when your price is wrong, to maybe move it yourself a little bit as opposed to have some trade against you, in which case you might lose money. But of course, the downside is it requires effort and it requires models to know maybe how far away to post, how to move it, how to keep your net inventory zero, so on and so forth.
00:38:37
Speaker
So on that note, I'm just trying to also understand. So there is a concept that the blockchain world uses and it's called the impermanent loss, although it really is meant, is really an impermanent loss, right? I think we would refer to it as adverse selection loss in economics. And so what that really means is, so if I understand this correctly, but correct me if I'm wrong, is that I compare the, what I have to say, I keep my money in unions for a while or in liquidity pool for a while.
00:39:04
Speaker
And then at some point I checked what I have left and then I compare that to had I not done anything with my money and just kept it in my wallet or in my account, if you want, without doing anything with it. So this is kind of like you compare two passive strategies in some form now.
00:39:22
Speaker
You're comparing, if I understand it correctly, so the comparison for impermanent loss is a passive strategy, but you're comparing it to an active strategy, an active rebalancing strategy. How should I think about the differences between the two? What would I have to do in this rebalancing? Let's take a hypothetical example. I have, let's say, one ETH trades at $100, so I put one ETH on $100 in the Uniswap contract,
00:39:48
Speaker
forgetting about the further details of how the price works and all. And so then after a day, I have $90 left in my contract and I have 1.1 ETH, let's say. So in the rebalancing strategy, what would I have done and how would I do the assessment? So in the rebalancing strategy, what you would do is you would start out in the same position with the exact same reserves. And periodically, let's say at the end of every day,
00:40:16
Speaker
you would check to see, am I out of balance? And if you are out of balance, you would trade to drive yourself into balance. In other words, you would replicate. So it depends on the pool. It depends on how the pool is defined and its liquidity curve. But let's say for Uniswap V2, balance is defined by having exactly the same dollar value in those two assets.
00:40:43
Speaker
So at the end of the day, for example, let's say the ETH price went down. Maybe your ETH is worth a little less. You would go out and you would buy a little ETH and get rid of some of your dollars so that now you have to evaluate. OK. And so your point of comparison there is not within the pool, but outside of the pool. That's what you mean, right? Yes, that's right. But that's also what's happening with the pool. It's just that rather than you looking at outside markets and determining the value, the arbitrageurs are
00:41:13
Speaker
And you're paying them to do it. Right. And so the problem is, when I keep the money in the pool, the money that I receive for the ETH that leaves the pool is sort of like an average over many, many different units. So it's a smaller price, let's say. That's right. So typically, let's say the price moves a little bit, right?

Lever in AMMs: Risks and Rewards

00:41:34
Speaker
Like, let's say the fair value as determined by, you know,
00:41:37
Speaker
market consensus moves a little bit down. The price the pool is quoting hasn't been changed. Right. So when the arbitrage comes in and sells to the pool they're going to sell at an off market price right at a price that's a little bit too high. And that's going to be realized as a loss to the
00:42:00
Speaker
So taking a step back here I think, you know, ultimately the sort of the practical question which I think see I'm at your work, sort of nails is from the investor side is liquidity providers are investors, right so I can, I can put my capital wherever I like I can I can hold it and eat for example.
00:42:20
Speaker
I can put it in a liquidity pool where I'm providing it as, say, ETH and USDC, et cetera. From the perspective of the investor, how should they think about liquidity provision as an investment opportunity? And I think, so when people talk about impermanent loss,
00:42:35
Speaker
I think actually in your paper with Tim, Anthony and Jason, I think you use a better term that I'm hoping is going to sort of take the place of impermanent loss as a term because I think it's clear what that really is. And I think the term you use there is loss versus holding.
00:42:52
Speaker
So I could just hold a bunch of EAP and a bunch of USD in my wallet and do nothing with it. And I could compare if I had taken that and put that into a liquidity pool and check whatever after a day or whatever my holding period is, how much I make, and I can compare those two things. So it's a loss versus just holding it.
00:43:14
Speaker
What you're actually doing is you're changing the benchmark, so to speak, from this passive holding to this rebalanced portfolio. Actually, I think you guys nailed it. The reason I'm saying that is because if we think about it from a finance perspective,
00:43:31
Speaker
Why would you just leave your capital sitting? Why wouldn't you put it into the market, put it in an investable asset? And so the point is that this portfolio that you're talking about as a benchmark, you could think about as an investable portfolio. I mean, there's a little bit of an issue, which is that USDC doesn't accrue any interest, but in a module of that, essentially the point is I could put my capital in an investable portfolio.
00:44:00
Speaker
It almost seems like that's what I'm doing when I provide liquidity at Uniswap, let's say V2 for simplicity. Your concept applies more generally, but let's for the sake of concreteness, I'm putting my money in a 50-50 portfolio. That's not in an efficient market. That wouldn't be an irrational thing as long as the assets that I'm investing in are themselves providing the risk adjusted returns that they should. But you're pointing out, well,
00:44:30
Speaker
there's a wedge between that investable portfolio. And to me, that's what lever is, it's the wedge. And so it's exactly the quantity that an investor should be thinking about, right? Like if you thought that you could, for example, actively rebalance your portfolio costlessly,
00:44:46
Speaker
think of a very frictionless market, then you go like, well, why am I doing this given that I have this loss? And that's where the fee revenue and so on comes in. But is that a fair way of thinking about it? That the benchmark shouldn't just be, what if I just hold my money in my digital wallet? Because why are you doing that in the first place? Shouldn't you have the ability to deploy this capital?
00:45:07
Speaker
And that's what you're doing here. But it turns out that there's this sort of arbitrage cost that you call, you call loss versus rebalancing, which again, I think is exactly what it is. And it's a very clear term. Is that a fair way of putting it? I think you nailed it. And I think, you know, I think in the spirit of what you're saying, the question is, what should the benchmark be? Right. And permanent loss, loss versus holding, that's one benchmark. Lever is another benchmark, right? Loss versus rebalancing.
00:45:36
Speaker
In general, we could imagine any self-financing trading strategy be a benchmark. However, in that universe, there's something very special about lever, right? The thing that's special about lever is in some sense, it is a, if you want, an extreme, a minimal benchmark strategy. Because if I look at the difference between the pool value and lever, in some sense, I've gotten rid of all the market risk.
00:46:03
Speaker
There's no local market risk, right? Like over short periods of time, right? Because, again, I'm matching exactly the holdings in the pool. It's just I'm acquiring them at more advantageous prices than the pool acquires them, right? So when I compare impermanent loss versus lever, right? Lever is actually part of impermanent loss, right? Lever is the permanent part of impermanent loss. Lever is a strictly increasing process. You know, you cumulatively accrue more and more losses to these
00:46:40
Speaker
over time, the holdings of the pool will drift from your initial holdings. And as that drift occurs, then you're going to have P&L simply because you're holding more ETH than the pool holds, or vice versa. But that doesn't have anything to do with the pool. That's simply the fact that you have some market risk in Ethereum, and Ethereum is very volatile. So the special thing about lever is it's the unique choice of comparison strategy that gets
00:47:11
Speaker
versus, you know, in general, just dynamically trading. Right, so I've been thinking about it. Okay, so we've discussed the concept of lever. Now, if I'm thinking about it as an investor trying to sort of, let's set aside the fees, which are supposed to, you know, ideally compensate me for this. If I'm thinking about a high level as an investor, what are the
00:47:37
Speaker
Like, let's call it market parameters that I should be thinking about to try to get a sense of whether I'm likely to face a high or low lever, depending on let's say different assets that are where I could provide liquidity so for example, with the.
00:47:54
Speaker
without getting into the exact numbers, but using our intuition, if I were to compare a stablecoin stablecoin pool, like USDC versus DAI, to let's even say a risky, risky pool, like rapid coin versus Ether, which one is likely to have more lever and why? And I'm really sort of driving at kind of honing the intuition here about how people can get some sense, some qualitative sense about what drives lever.
00:48:21
Speaker
Sure, so I think the number one driver is going to be volatility, the relative volatility of the two assets, right? And I think the way to think about that is, you know, if you think about this mental model of arbitragers making money off of stale prices, right? Every time the price changes a little bit, they're going to make a little bit of money. The more volatile the asset is, the more of those price changes there are, the more money arbitragers
00:48:51
Speaker
So I think that is the number one driver. And something like a stablecoin-stablecoin pair, you really don't expect the prices to move that much. So there won't be that much rebalancing done, period. There won't be that many stale prices picked off, and the lever will be less. So these costs are going to be larger for rapid coin versus the probably than USDC die, hoping the pegs maintain on USDC and die.
00:49:21
Speaker
So can I ask just a much more mundane question? Going back to the question about the
00:49:28
Speaker
I'm still going to use the term impermanent loss because it's more, you know, it's commonly used. Is it fair to say in your with your analysis that you basically identify that impermanent loss is underestimating the cost of providing liquidity? Is that is that way to know I wouldn't use the word underestimating I would just say miss estimating because it could be a more or less than lever. It's like you're taking lever and then you're adding some random noise based on you know, the market
00:49:55
Speaker
And I think just to sort of hone in on that comparison, you know, I think another way to see that there's a whole bunch of things I think are, you know, not good. I mean, look, in permanent loss, I don't want to beat up on it too much. You know, at the core of the comparison does make sense. Maybe if those are really your only two alternatives, you know, school to static portfolio.
00:50:16
Speaker
and invest in this AMM, then it is a useful measure and it has some information. But I'll point out a couple of flaws. So number one, impermanent loss varies from investor to investor because it really depends on when you got in.
00:50:30
Speaker
Right versus lever is the same for everyone. Right. And if you and I are equal participants in a pool over the course of a day and we're getting sort of roughly equally economics. But our lever would be the same or maybe our ultimate P&L is the same. But maybe your permanent loss is different than mine because you entered like five weeks ago and I entered yesterday. Right.
00:50:50
Speaker
So that's sort of one issue. Another issue we can see with impermanent loss is that impermanent loss is not path dependent. It just depends on when you started and what the current crisis. It doesn't have to depend on what happens. Right. Now if we think if our mental model is like there are these ARBs trading against us and we're losing money every time that they trade.
00:51:10
Speaker
What you sort of quickly realize is it should be path dependent, right? If there was more movement in between, there should be more losses to ARBs, right? And if your metric is somehow ignoring that, then I would argue that your metric is missing.
00:51:26
Speaker
Right. So if I can phrase it maybe a bit differently, this goes back to this point about like, imagine I were actively mandating a 50-50 portfolio, which seems like maybe a more sensible thing than just parking my cash in my digital wallet. And I get, you know, a lot of volatility. I could buy low, sell high, buy low, sell high. I could be racking up some profits. And if you are just sort of passively holding it, you're not.
00:51:52
Speaker
In some sense, lever is capturing the key opportunity cost actually, and that's the point. Going back to your point earlier, if I go online and I look at some of the statistics that are offered for these liquidity pools, they do tend to show you that this is the fee revenue you're going to make, or this is the fee revenue produced by the pool.
00:52:13
Speaker
But coming to your point, that's part of the context that investors should be looking at, but they're actually missing the other piece of it, which is maybe these fee revenues are really high because there's been a lot of price movement and so there's been a lot of trading, but there's been a lot of price movement, which also means your lever is really high. You want to take the coupon of the fee revenue against
00:52:39
Speaker
the arbitrage losses, the lever that you're facing, and that's the proper context for an investor, I think it's fair to say. To me, this isn't really about a convention as much as it is a rational investor should be thinking about the opportunity cost of not putting their capital into
00:53:00
Speaker
into an investible portfolio, which here I'm thinking of as just basically the equivalent portfolio, except it were actively managed and sort of passively met. So they got to take the fees and they got to weigh that against these arbitrage losses. But of course, you know, it may not be advantageous for Uniswap to highlight the arbitrage losses of the dashboard. Right. So, yeah, I think in my ideal world and, you know, on like, let's say any DEX dashboard,
00:53:28
Speaker
would be some kind of APR for the fees that you're generating, but some kind of APR also for like lever, like how much are you losing.

AMMs and Options Pricing

00:53:37
Speaker
And in some sense, it's sort of like if you advertise one but not the other, you're a little bit showing people the benefit, but maybe not clearly showing the costs.
00:53:48
Speaker
I'm going to just interject one thing here as an observation. Farhad, what are you proposing in some sense seems to be, if you are a market maker, you have to think about a little bit more of a sophisticated understanding of where you want to put your money. Whereas if you are a mom and pop that thinks about, well, will I put my money here for the next half year or so? Mom and pop is not going to do a lot of active rebalancing either.
00:54:15
Speaker
There's a question of really of who you're advertising to and what it is that you're advertising, right? So I think we have to be a little cautious on that one too. So go ahead, sorry. I was going to make one other comment in relation to impermanent loss.
00:54:35
Speaker
Um, it also, um, you know, one way that they're closely aligned is, um, uh, you know, if you look at it from an ex ante perspective, right? Like if I start right now and I say, um, what's my lover going to be in the future? And I say, what's my, um, uh, impermanent loss going to be in the future. And I do it in like sort of an options pricing style. I take, you know, uh, expected value under the risk mutual distribution. Those are exactly the same.
00:54:59
Speaker
So in other words, the quote unquote price, how much you should charge for impermanent loss versus how much you should charge for lever are the same. They're capturing, again, looking at things ex ante, the same thing. However, the key difference is if you look at things ex post. If you look at things ex post, again, as I've mentioned, impermanent loss just looks at the price, the beginning and the end.
00:55:23
Speaker
So if the price at the beginning is the same with the price at the end, it'll say you didn't suffer no impermanent loss. But lever is a little bit more refined, and we'll compare to this rebalancing strategy and we'll say, well, actually, maybe you should have made money. Well, this is interesting. So this brings interesting questions up for the theorist and me, right? Because it seems like if I want to build a model of liquidity provision, so then you now have to think a little harder about the particular strategies that you have involved there that you're trying to use as a benchmark for it. So that's interesting, actually.
00:55:54
Speaker
I think another thing that's worth bringing up is there's a whole different point of view about lever. So far, we've been thinking about it in terms of maybe two points of view. One is comparison to an alternative trading strategy, and maybe another is how much money do ARBs make. But there's a third point of view which really connects to sort of black shoals and options pricing theory, which I think is quite interesting as well. Oh, yeah. We want to definitely talk about that part.
00:56:23
Speaker
Now, this one we have to, I would kindly request that you try to ease us into really, really cautiously because, as you know, we try to appeal to a very broad audience and not some of which will be very well-versed in options pricing and the details thereof, in particular with the, let's say, the vocabulary that is even used and some is not. So maybe we can start very, very cautiously.
00:56:49
Speaker
So can you give us the big picture explanation, maybe explaining a few terms of what the relation there would be? So let's start with a very simple option strategy. Maybe people have thought about or heard about European call options and the like, and then you can ease us in that. Sure. So I think a starting point would be to compare, let's say, providing liquidity in an automated market maker with doing something like, let's say, selling input.
00:57:17
Speaker
Now, the details are quite different, but one thing that is the same is in an automated market maker, when you omit your LP tokens, you are committing to sell at a certain rate as the price goes down. Again, let's say Uniswap V2, as the price goes down, excuse me, to buy, as the price of ETH goes down, you're going to have to buy more ETH to keep the picture.
00:57:40
Speaker
or the ARBs will sell it to you. So let's compare that to a put option. A put option, again, it doesn't trade smoothly. It doesn't trade at every instant. But at expiry, if the price is below the strike, you will end up buying. So if we sort of squint our eyes, in both settings, we are pre-committing to buying at certain prices in the future right now.
00:58:06
Speaker
Right. Now, you know, the great innovation of Black Scholes Merton, why they won the sort of the Nobel Prize is to sort of be able to sort of understand like how to price things like put options. Right. And what they determined is that, OK, if you're going to sell a put option, then you're giving up some optionality. And in exchange for that, you deserve a premium.
00:58:30
Speaker
And I think there's a strong analogy there with AMMs. Again, by committing to the liquidity curve, you are also giving up an optionality. Now, there's no explicit premium. If you go out and trading options and you go on the Chicago board to sort of sell some puts, you will get some premium right now. And in AMM, there's nothing like that. But there's the promise that you're going to get fees. So the fees are something in lieu of the premium that ideally, hopefully, would be more than the fair premium.
00:58:58
Speaker
Now, just to double click on this a little bit, how does the Black-Scholes model determine what the fair premium is for a put option that you sell?
00:59:07
Speaker
The way it determines the great innovation of black shoals is look, put option has all things being equal. The further the price goes down, if you sold a put option, the more money you're gonna lose. So in that way, it's a little bit like holding the asset. But let's come up with a benchmark where we sort of isolate really what's special about the put asset versus dynamically trading the asset.
00:59:36
Speaker
And when they do that, they get to the concept of delta hedging. The idea of delta hedging is if you own an option, you can trade in a certain way to eliminate the market risk of that option, to eliminate its value going up and going down. And what you'll be left with after you do that is the option period.
00:59:55
Speaker
So the analogous thing to delta hedging is comparison to the rebalancing strategy. That is exactly the same thing. And after you subtract off the rebalancing strategy, i.e. after you delta hedge an option, what should be left is the option premium. And certainly the expected value of lever is the option premium that you should be due for pre-committing of that.
01:00:20
Speaker
So I think that's another view, right? Again, drawing these analogies to the fact that you deserve compensation for giving up optionality. And the way to see that is through delta hedging. Here also, you deserve similar compensation. And lever is measuring how much compensation you should demand through the same option pricing levels. Actually, we like this place. I'm just going to interject.
01:00:50
Speaker
probably not for the recording. I really like this explanation. I think that actually makes it very clear of how to actually think about this properly. So this is almost to me, it's actually almost a better explanation than the details of how you actually describe the description before. So just, yeah.
01:01:09
Speaker
So, um, are there dashboards where people can sort of look at like the expected lever, uh, for different pools? Cause actually the point is, you know, when you think about something like volatility, um, we can get reasonable estimates of this in the data. And it seems like that would be a very useful kind of metric to have, um, just as a forward looking expectation.
01:01:34
Speaker
Um, so, uh, I think it's relatively easy to, uh, to compute. Um, uh, I haven't seen people with, with, with dashboards for it. It is the point is it is that easy to compute. So it seems like it's something that people should really just provide upfront. Um, there's a stronger analogy, which that, um, lever is really like, uh, a variance swap.
01:01:59
Speaker
It's really like a variance swap. You're paying variance, but it's weighted. It's being scaled by exactly what the liquidity is at that instant. In traditional financial markets and derivatives, people have the technology to price that. The same ideas could be applied here, except maybe there's not a liquid derivatives market to hedge all that.
01:02:23
Speaker
And so if I may interject at this point, since using the term variance swap, it would be probably useful to explain that to the audience. Sure. So in a variance swap, it's a derivatives contract. And the idea is there's two sets of payments. And let's say you're paying variance.
01:02:47
Speaker
there will be periodic coupons where in every period you look backwards, you know, the last period, let's say, you know, I don't know what people typically do, but let's say like, let's say it's, you know, month to month, you look backwards over the prior month. You say, what was the variance of the asset over the prior month? And you make a payment to your counterparty to that amount. And then maybe there's a payment the other way. Usually it's a fixed payment.
01:03:11
Speaker
So maybe upfront, you'll say that like, look, you know, you know, you'll go to an investment bank, you'll be like, hey, I want to pay variance. How much will you pay me? And they'll say, look, we'll pay you like I'm just making up numbers, a 10 percent coupon. We'll pay you a 10 percent coupon. And then every quarter you pay us like how much variance was realized. And that's a financial issue.
01:03:32
Speaker
Right. And oftentimes, sometimes that can be an attractive financial estimate to the extent that many investors like to sell volatility. Right. Like, you know, perhaps, you know, the most famous investor of all time, one of them, you know, Warren Buffett. What does Warren Buffett do? He sort of fundamentally sells volatility. He provides insurance. Right. So a variance swap is a mechanism to do that. Now, it can be very dangerous. You can have enormous payoffs during
01:04:02
Speaker
of enormous payments to make during periods of extreme market stress. But nevertheless, if you have a large bankroll, that can be attractive, because maybe on average, the coupons that you're going to get are going to be less than the amount that you're going to pay. And so I think if one were to squint our eyes, I don't know that we're there yet, that the fees necessarily
01:04:25
Speaker
But one could view automated market making as that kind of financial

Enhancing AMM Design and Oracle Use

01:04:30
Speaker
product. A financial product, which is a mechanism to allow people to basically sell insurance and earn a premium in the form of these fees. And maybe that's attractive to some people. So I want to talk maybe about your paper and go back to maybe the broader implications of it.
01:04:55
Speaker
So one of the things that you try to discuss there, I believe, is the better design of an AMM. So maybe can you run us through the ideas that you have there? So suppose just hypothetically, right? So you do your analysis. You see your lever for a particular, you create, say, a time series for the lever that you compute. What would that mean for, let's say, Uniswap? How should they redesign their system?
01:05:20
Speaker
So there's a bunch of ways that people are proposing to mitigate a lever. And I'll just start out by saying, I think this is the number one problem in AMM design. And I think there's evidence that others agree. So for example,
01:05:50
Speaker
of Uniswap E3 and so on, he, you know, has stated that the top three design problems for AMM are number one lever, number two eliminating sandwich, number three reducing gas, right? So I think this is recognized as an important problem. People are trying to address it. Let me give you a sense of some of the ways to potentially address it, right? And again, just saying this is an active research area.
01:06:17
Speaker
So one way we might think about is incorporating off-chain information. So we know that the problem of lever arises because the prices on-chain do not match their sort of real value. They have to be mechanically moved by traders. But you could imagine, let's say that you have an oracle that is looking at the off-chain
01:06:40
Speaker
and injecting maybe the right prices, maybe you could come up with a more sophisticated formula for an AMM, which would simply adjust the price without trades based on input from an oracle. So that would basically operate much more like a dark pool. So just for background, for the audience, when we think of stock markets, we have dark pools. And dark pools basically take the price from other venues and just have
01:07:07
Speaker
usually transactions occur at the mid price of, say, the NASDAQ combined with the NYSE or the like. So they use another reference price. So what you're proposing here is really that in some sense, you take price discovery as we refer to it in finance from other venues and inject it into Uniswap, but you have to try to build a model in which the liquidity pools also then managed at that time. That's what you have in mind? That's exactly right.
01:07:37
Speaker
And if you had a perfect price oracle, is there still going to be an issue due to the discreteness of the block times? If your oracle was always the first trade in every block, I think there are a number of issues with oracles. I think oracles can be manipulated.
01:08:04
Speaker
Another issue is like, so let's say the Oracle tells you the price is X, and a bunch of people come in to trade against you. You need to move your price, even though the Oracle is some price. And so how do you adjust your price in between Oracle updates? That's a major issue. Oracles are typically not, I think, frequent. So I think the time scales you're looking at, like on the time scale, they're updated every
01:08:34
Speaker
minutes, right? So, you know, again, you know, I don't, you know, there's issues here, like, you know, I want to emphasize that the problem hasn't been solved, but one direction is either using oracles to set the price, or maybe another aspect also is to think about how to set fees, right? So one thing that can mitigate how much money you lose to arbitrageurs is how much you charge them for trading.
01:08:57
Speaker
And the way that fees are set in traditional AMMs is very coarse. I mean, if we go back to Uniswap V2, there was no choice. There was 30 basis points. That's the fee. Somebody came up with that number. Now with Uniswap V3, maybe there are fee tiers, but it's very coarse. It could be one basis, 0.5, 30, 100, something like that.
01:09:28
Speaker
we look at traditional financial markets, one way that market makers limit their adverse selection, limit being picked off by arbitrageurs, is that they widen the spread. And spreads in traditional financial markets move like very smoothly, right? Like the market gets a little bit more volatile, spreads are a little wider, right? More volatile, even wider, right? And so there's agents like sort of optimizing this. And one way to potentially mitigate lever would be a similar type of process.
01:09:56
Speaker
So if I could say a little bit more of that, because for example, when I think about like widening spreads, now that's not great from like liquidity trader side, right?
01:10:08
Speaker
So essentially, one way of saying it is the cost hits the arbitrageurs, it also hits the liquidity traders. So could you say a little bit more about how you would, like when you talk about providing, like, cause you started by saying, thinking, I guess more carefully about the fee schedule. And while, you know, there are different fee levels now say at Uniswap, each pool has the same fee for all trades. So are you thinking about something like having different fees for different trading activity?
01:10:36
Speaker
Or what exactly, what is the direction you're thinking of in terms of, let's say, a richer fee schedule? Good. So I think there's, I'll go through a bunch of things. You know, a lot of these, by the way, I've been proposed by other people, I don't want to take credit for all this stuff. But one way you could eliminate fees is, oh, sorry, eliminate leverage is to simply set a very high fee, right? If you set a very high fee, there will be no arbitrageurs. And so you'll lose no money to any arbitrageurs.
01:11:05
Speaker
What? Price implications, right? You'll also cause massive price dislocation. Nobody will trade. Nobody will trade. If my fee is like 100%, nobody will trade, right? But also, I will lose no lever. Now, obviously, that's ridiculous, right? So I think it goes back to exactly the point you made off the hot. In order to set the optimal fee, you need to balance how much you're going to lose to arbitrageurs. You will always lose less if you set a higher fee.
01:11:31
Speaker
But on the other hand, it's going to affect how much you're going to make from noise traders also, from the idiosyncratic traders. And so that's why it's challenging, is because you need to model those people. And it's really not clear how price sensitive they are. And it's not even clear how to identify them. If you see a trade on chain, how do you know if it was an arbitrage or versus a noise trader?
01:11:54
Speaker
People have different ways to guess, but it's sort of not clear. But I think big picture, I think this is a problem regular market makers face also.
01:12:05
Speaker
suspect that all things being equal in more volatile markets, you want to charge higher fees. Simply because you certainly lose more money to arbitrage yours, and probably the amount of cost of losing new age traders sort of doesn't make up for it. And all things being equal, you probably want to charge higher fees. But it's not clear how to do it, and it requires a careful modeling. OK, so just a side question here.
01:12:35
Speaker
Not a realistic scenario, but just as a thought experiment, if you could price discriminate against arbitrageurs and charge them, let's say, 100% fees, as you were saying, and somehow not charge liquidity traders. Let's say 0% fees for liquidity traders. Now, is it clear that's a good idea? Because in a sense, this is what I was mentioning price dislocations earlier. So basically what you're saying then in that world is that every time there is a change in prices in the real world,
01:13:02
Speaker
the ARBs aren't gonna come in. And so the liquidity trader is gonna come in and trade at like a wrong price. I guess it could be a favorable price or an unfavorable price, but is that... I guess what I'm saying is it's not clear to me that arbitrageurs are all bad in the sense they do provide a service of like aligning prices. I think you have a good point there. And I think, to sort of phrase it more mathematically or maybe more quantitatively,
01:13:31
Speaker
One thing you could look at is the mispricing between an AMM and let's say a more liquid centralized market, like let's say Binance. And what you will observe is as you increase the fees, that mispricing is zero mean, it could be favorable, it could be unfavorable, but the variance, the standard deviation will increase, right? And so all things being equal, if you have very high variance, maybe in the limit, you're right, that's bad for swappers too, right?
01:14:01
Speaker
the noise traders, they don't like risk. And this is just, you're adding one more form of risk, which is, you know, the mispressively favorable or unfavorable, but I don't know which, and maybe it's gonna, you know, cost me. You're right. I mean, if we take one bigger step back, right? So there's always a question, every market, and there's nothing to do with AMMs so much as if you have a market where there is some form of adverse selection, somebody has to pay for it.
01:14:27
Speaker
And usually the way we think about every market is that adverse selection risk of any form is always paid for by uninformed traders. Because say market makers, if you take any model, market makers are usually assumed to be breaking even. And so therefore it's always a transfer from uninformed traders to informed traders. And the question is,
01:14:51
Speaker
really in a broader sense of whether or not AMMs by themselves create more adverse selection. And one of the mechanisms that they're lacking that brings me back to the earlier point that you had about AMM design is that, so AMMs, so limit autobooks have the functionality where you can cancel your autos and disappear and re-preprise the new one where there's really no adverse selection created as such, right? Because unless somebody, you have the Buddhist model where somebody can be sniped,
01:15:19
Speaker
Whereas in an AMM, this is sort of unavoidable, right? Because unless you have the mechanism with the oracle that you mentioned before where the price adjusts, you will always lose, right? And so therefore it's paid for by the noise traders. So that's, I mean, that's a bigger design question, but that's a question which kind of plagues all markets in a way, right? Because we always have to think about all markets. In particular, once you have multiple markets and you don't have a mechanism such as an auction,
01:15:48
Speaker
which has regret free prices, right? So where, you know, the price is always right. Everybody trades at the same price at the end, so nobody regrets. Exactly. Yeah, exactly. So, you know, in limit order books, by the way, I also have not the prices also not regret free. And in a way, an AMM is actually really just some form of limit order book, right? So, I mean, a static one, right? So, you know, this is this is a bigger question of the design. But as long as people want to use a market, it is what it is. Right. So
01:16:17
Speaker
Yeah, I mean, I think there's a bigger topic which we can get into if you guys want, which is how do we compare things like, I think, the three principle things to compare are limit order books, AMMs, and people batch option. And I think there are some pros and cons to all of those structures. But I don't know if you want to get into that or talk a little bit more, because there are some other directions in terms of reducing WebR also that I think are worth mentioning.
01:16:47
Speaker
I would be happy to talk about the general big picture items here too, right? So what I like, so here's my take. When I look at limit order books, and as you mentioned it before, you have, you have professional liquidity providers in limit order books. I think the reality in markets is oftentimes you have market makers that, you know, invest in speed so that precisely they can avoid all kinds of, all sorts of, uh, adverse selection, right? So they can avoid being sniped. Something that you don't do in, in an AMM.
01:17:15
Speaker
But in AMM, as on the other hand, the opportunity for regular people to create an, so you can actually use existing capital, existing stocks that are otherwise not used because, you know, high-frequency trader actually needs to borrow the shares potentially in order to make a trade, or they have to do, you know, have to trade out of positions to avoid overnight inventory. So it's kind of a really narrow application where these guys will be available. And then if the remainder of the market is not serviced, then
01:17:43
Speaker
That's not a good thing. Maybe something like an AMM. Yeah. I mean, I think my main criticism of limit order books, I think I used to be a limit order maxi. I used to think, of course, everybody's converged on this market structure. It's perfect. And that's why everybody uses it. But reflecting on it more, I think the biggest indication that limit order books aren't the end state is the fact that participants have to be so sophisticated. So if you look at the way
01:18:13
Speaker
you know, let's say, trading US equities, like, you know, fundamentally, it hasn't changed that much in 1520 years, right? Maybe decimalization was the last big change. But since then, you know, you know, maybe there's more dark pools, maybe there's small differences. Since then, it's been sort of roughly static. But the thing that has changed is participants on both sides have become automated, right? It used to be that the market traders were guys yelling at market makers, excuse me, were guys yelling at each other, and
01:18:39
Speaker
And then at some point there were guys clicking a mouse. And then now it's all computers. There's no humans. But also on the other side, the end investors, institutional investors, they do not have execution traders anymore. They use algorithms. If they're sophisticated, they have their own algorithms. If they're less sophisticated, they go to their bank, and the bank will have a suite of algorithms.
01:19:00
Speaker
And I think if you're in a world where, you know, you know, it's algorithms versus algorithms strategizing on both sides, that's kind of a sign that your mechanism isn't doing the right thing. Right. Like the ideal thing would be something like a second price auction where everything that incentive structure is the right way and you just bid your valuation and sort of go home. And to me, the success is, you know, you know, again, I don't want to beat up on limit order books too much. Like, you know, I personally think trading in U.S. equities is great. Like it's very efficient. Costs have been systematically going down on time, you know, and so forth.
01:19:30
Speaker
But that doesn't mean we can't do better. And there are intermediaries making a lot of money. And I think that's an opportunity to sort of improve designs. I know I fully agree. So going back to my earlier point also, if you limit order books is that they may work reasonably well for really liquid stocks in the sense of where there's a lot of activity. But if you look at the, if you take a much broader perspective of the world of trading, there's
01:19:59
Speaker
of them, tens of thousands of assets that can be traded worldwide, the limit auto books of today with the high activity levels are only, there's only maybe 500 or so that actually trade in a manner which is so ideal as we think about a great ideal limit auto book. Most assets either don't trade at all in limit auto book, like bonds and so on. There's very little limit auto book trading in bonds.
01:20:25
Speaker
for a large number of reasons. Among them, it's just through little activity to sustain the market there. I would actually like to add one more thing about the arms rates that occur in the trading. I think
01:20:41
Speaker
One also, and this is actually a worrying part about the way equity trading works, is the segmentation of the order flow, which is that, and we said, you know, we said this earlier, I said this earlier, right? So that the adverse selection has to be paid by somebody. If you want the price discovery has to be paid by somebody, and that's usually the uninformed traders. And there is now a movement and in the West, it's very extreme where all of the uninformed troll goes to a very particular type of trader.
01:21:07
Speaker
They got a good deal for this. Don't get me wrong. This is the whole sellers. But the rest of the market can't benefit off of it. And so you can argue that uninformed traders are actually not paying for the average selection anymore. And so everybody else pays for it. And so that's not a good equilibrium, I would think. I agree. I think some of the segmentation is, I think it's not carefully thought through in terms of the equilibrium.
01:21:35
Speaker
Like maybe if you segment, maybe some retail investors do better, but maybe bid offer spreads widen overall. I've seen estimates that internalization, I don't know how people come up with these, but maybe is increasing bid offer spreads 20, 30, 40%. And I think that's a challenge. I think on top of that, there's a second issue, which in the current sort of payment for order flow model, there's large principal agent problems.
01:21:59
Speaker
Right? Like the people who are signing the agreements and getting paid the money and so on are not necessarily the people who are getting the, you know, at the end economic outcome. So I think, I think there are, there are, you know, that that is something that definitely needs further stuff. I mean, even ultimately, there is a question of tragedy of the comments and risk sharing, right? So, you know, so one of the things I think that AMMs do really well is that there's risk sharing going on because liquidity providers,
01:22:29
Speaker
Actually, in contrast to a limit order book, the person who is in front of the book, who gets basically run over, actually it's not the one in front, it's actually the one who's last in the queue on the best prize, actually the one that has the highest degree of adverse selection, right? And nobody wants to be that person. And therefore there's arguably not a lot of risk sharing or not an optimal risk sharing going on limit order books, but in AMMs, everybody is on the same footing. So everybody basically takes the same hit if you want from adverse selection.
01:23:01
Speaker
Naively, I think when a lot of people saw how V3, Uniswap V3 differed from Uniswap V2, there was a feeling that there's a movement towards essentially the way a limit order book would look,

AMM Strategies Mimicking Traditional Markets

01:23:15
Speaker
right? I think we briefly touched on that there's a difference, this uniform liquidity versus concentrated liquidity. But could you say something about, I guess, because you've been a little critical about limit order books. First of all, do you think that direction was the right direction?
01:23:28
Speaker
Um, like, do you think that was a beneficial change? Um, and it's more generally than, what do you think makes sense in terms of the structure here? And I think one thing we should say is that, um,
01:23:42
Speaker
There are technical constraints in terms of how you specify anything on a blockchain, right? And so sometimes they might be doing something different from traditional markets because the technical constraints are too overwhelming, right? But regardless, yeah, could you talk a little bit about sort of the transition from V2 to V3, the extent to which that was moving in the direction of a limited order book and whether you think that was actually a sensible direction?
01:24:09
Speaker
Yeah, so I think the way it's moving closer to the limit order book is that the strategy space is larger. So in a Uniswap V2, your only decision really is maybe whether to participate and how much to participate. Aside from that, there's nothing to do.
01:24:29
Speaker
At the other extreme, in the limit order book, you constantly have to decide exactly how many shares at each price level, and that's one extreme. Uniswap V3 is somewhere in the middle, where you have to decide this additional thing, which is the range of your order. That's the thing you literally decide. The way I like to think about it is you have to think about how much leverage you want. And so it's not quite as fully expressive as a limit order book, but it's more than a Uniswap V2.
01:24:58
Speaker
And there is the potential, now that you've increased sort of the strategy surface, there is the potential for, let's say, more sophisticated actors to get different outcomes, right? So, for example, in Uniswap E3, one thing that can be done is this idea of just-in-time liquidity, right? The idea of you see a swap in the mempool, and what you do is maybe
01:25:26
Speaker
very concentrated liquidity just to be fulfilled by that swap. And then immediately after, you know, within sort of the same bundle, you have a transaction to provide liquidity, you have a swap transaction, and then you remove liquidity right after, right? So you can imagine sort of things like this, which are more akin to the kinds of strategies that high frequency traders employ in limit order books.
01:25:50
Speaker
Now the potential downside of this is that this can have a negative impact on everyone else. Right. So if somebody had like let's say a mechanism where they could really identify on a swap by swap basis is this some kind of informed trader like an arbitrage or or is this a noise trade.
01:26:08
Speaker
right, like someone who's idiosyncratically trading and doesn't know anything, what they would do is they would jit, right, just to fill the noise trades and, you know, ignore the, and not trade against the arbitrageurs. And they would basically, you know, I don't know what the right term for this is, cream scheming, or sort of something like that. They would take all the fees from the noise traders, but not suffer the adverse selection, right.
01:26:31
Speaker
So in the extreme, you can imagine things like this. Now, I haven't done the analysis myself. It's not clear that whether these active hyperactive things like just-in-time liquidity are actually occurring. Are they a significant fraction of the market? So on and so forth.
01:26:47
Speaker
I think, you know, I agree with you at the heart that it's not necessarily immediately obvious that introducing others is better. It's better from the perspective of people gain leverage. But in equilibrium, it could be the case that some people use that ability in order to, you know, take more of the profits for themselves in a way that will, you know, damage other liquidity providers. Maybe eventually they leave the market and the whole system
01:27:17
Speaker
the tragedy of the commons. Essentially, that's what it is, right?
01:27:22
Speaker
I mean, so in some sense, what you're talking about is like to the extent that you increase the degrees of freedom, the action space, and there are asymmetries in the ability to do, like, for example, not everybody is running a node and can see the mempool at all times, et cetera, right? What you're saying, well, like if people have, if you allow for more actions and some people have this, have that called an asymmetric advantage, then they're going to be able to sort of exploit it. But then,
01:27:52
Speaker
What do you think in terms of, I mean, now we have had V3 for a couple of years. And of course, Uniswap is thinking of the next version. What do you think the right direction is in terms of designing these AMMs? I think, you know, the issue is going to come down to, you know, coming up ways to sort of create a lever. I think, you know,
01:28:16
Speaker
We talked about ideas related to setting fees. I think one sort of first order thing to me would be to come up with a way where there's competition in the fee space. So again, if we think of a limit order book, I think one very nice feature about a limit order book is if I think I'm a better market maker than you, I can simply quote a tighter spread and I'll get more trades. So the analogous thing to the fee is
01:28:47
Speaker
In this world, there's not a mechanism to do that. So I think that's one direction to think about. I think the vision with where Uniswap going with Uniswap before is this more general idea of hooks. And I think, to some extent, the way I read that is the idea that, look, it's not clear how to solve some of these problems.
01:29:16
Speaker
flexibility that other people can come in and can come up with ideas and implement them in a way that maybe the market will sort of figure out what the right mechanism is. And there's another direction beyond this idea of either dynamic fees or oracles is a direction involving auctions.
01:29:41
Speaker
That's sort of another type of mechanism a lot of people talked about. Just to sort of briefly talk about that, the idea here is to potentially auction the right to be the arbitrage. Right? If somehow right now anybody can be an arbitrage and it's competitive, right? But if somehow we could anoint only one person to be the arbitrage and we could sell that, right? And the market is competitive, then ideally what they would pay us is the arbitrage profits.
01:30:06
Speaker
Right. And then we wouldn't be suffering a lever. And so the kinds of mechanisms of people have looked at is, for example, you could say that there's going to be one designated trader. And if he's not the first trade in the block, then nobody can trade.
01:30:24
Speaker
Right? And you sell that right. And you also maybe sell that right to the, and so basically that person will be the arbitrator, right? Because since nobody can trade before them, if they're the first person in every block, they have the right to do the arbitrator.
01:30:39
Speaker
arbitrage trade and potentially they should pay arbitrage profits for that. Now, of course, there are some downsides to that. Just to clarify here. So currently, what is it that arbitrageurs compete on? Is it like gas fees?
01:30:58
Speaker
Yes, they compete on gas, and even taking that to the next level, these days, really, I think within the past few months, they compete at the builder level, right? So now, the prior model was that arbitrageurs are these independent agents, right? And they're out there, they're looking for opportunities, and they're trading.
01:31:20
Speaker
What's happened now is because Dexex arbitrage is so big. I've heard estimates that it's maybe 50% of all MEV, something of that order of magnitude, that it's maybe the number one source of MEV. Let's put aside what the exact statistics are.
01:31:39
Speaker
that right now the top builders are thought to be arbitraging. And there's some very nice work from Max Resnick and Malestri and people at the special mechanisms.
01:31:58
Speaker
at around times when there are price changes at Binance. And those blocks are dominated by particular sets of builders, right? And really, the only kind of explanation for that is the builders of vertically integrated arbitrage operations, right? So now, it's sort of even worse, you know, the mechanism by which they compete is they bribe their proposers, right? But what's happened is this is creating a force of centralization in the consensus mechanism. So, you know, competing to be the right to the first arbitrage.
01:32:28
Speaker
Right, but so, okay, so what you're, in some sense, what you're suggesting is being able to like move that bidding process from sort of the protocol level to inside the DAP, right? Because they're already bidding, right? Like, you know, I see the ARP, you see the ARP, we're both going to go after it, but now we're competing for getting first on the block and that means we got to basically pay the validators at the end of the day. Right.
01:32:55
Speaker
And so that's the key. Right. Yeah. Sorry, Andreas. Yeah. No, I was just saying this. So the builders are essentially doing it independently. Right. And so once you get to build the block, you actually get to do the app and then you just pass on the.
01:33:10
Speaker
your extracted value to the validator, as you said, right? This gets to a point that like, so, but I think, Sam, like you were describing the idea that somehow the fee at the level of the liquidity pool determines priority in the block. And this relates to even like when people talk about the sequence,
01:33:34
Speaker
forcing some order to the sequence of trades in a DEX and liquidity pool and so on. But I've always wondered about that. Then it's almost like, because I guess you're affecting the protocol with information at the DAP level. How exactly would that work? How do you specify in the protocol? Unless I'm misunderstanding. From what I understood, I thought you were saying, you're going to specify the rules of the validity of the block to relate to something like the fee that is paid
01:34:02
Speaker
No, no, no, no, I'm doing it at the smart contract level, but let me be specific, right? So the way the smart contract, when we leave the Ethereum protocol, but let's say we're on Ethereum, we leave the Ethereum protocol as it is, but we're going to change the smart contract rules of the Uniswap smart contract so that if a transaction is going to execute, it can only execute if the quote unquote person who has arbitrage rights has already traded in that block.
01:34:30
Speaker
So that's something you could implement as a contract level. You could look at what are transactions that have already implemented. If the anointed arbitrator has a transaction there, then this transaction can go through. Otherwise, no transaction can go through. Okay, I see. But then you're basically forcing the builders to follow this order, because effectively, that means that if they were to not let this transaction be the first one, it's going to nullify
01:34:53
Speaker
Yeah, exactly. So essentially, there's a flag in that first transaction, and every subsequent transaction can check the flag. And so if they didn't order it this way, then they're not going to get anything out of these subsequent transactions. Right. So the builders no longer have incentive to... I mean, they'll just include it to get all the other ones, right? But you don't have to buy them. You don't have to buy validators. Right. Okay. All right. That's... Now, there's some downsides to that. Sorry. Go ahead. No, no, no. Continue.
01:35:23
Speaker
So there's some downsides to that. In particular, you need to have a transaction on every block, right? And, you know, that costs gas. Maybe that actor could also do other things. For example, censoring transactions and so on. But there's some issues there. But let me give you another idea also, which is not as extreme. Suppose you auction off the right, like most, you know, every pool charges a fee. Suppose you auction off the right in every period to trade with no fee.
01:35:50
Speaker
You're

Regulatory Perspectives and Experimentation

01:35:51
Speaker
going to say, hey, for the next 100 blocks, if you win this auction, you can trade with zero fee. Now, somebody will pay some amount of money for that. That person will naturally gain priority for doing arbitrage, because they can arbitrage smaller opportunities. So it's not perfect. If there's a big price change, then even paying fees, there will be other arbitrages. But if the price change is less than the fee, then this anointed arbitrager can arbit, but no one else can arbit.
01:36:19
Speaker
Right. So there's various flavors of ideas that people have been trying to explore, which involves maybe making someone distinguish be the arbitrageur and then charging them for it and trying to use market competition.
01:36:37
Speaker
I'm just going to throw a monkey's wrench into this discussion here. And so, I mean, I'm listening to the debates that you have of how you want to organize this optimally and what kind of arbitrage and priority rules you could have there. Now, if you take a step back and look at the view of a regulator in this space, you know, there's already, you know, there's recently been a paper released by IOSCO, so this is the international conglomerate of securities regulators authored by the SEC, though.
01:37:06
Speaker
And, you know, if you read that carefully, it's essentially they're trying to bring all DeFi protocols like AMMs fully under regulatory control. They see like a DeFi protocol is like a brokerage and so on and so forth, right? So essentially they try to squeeze everything, you know, the round packs into a square hole.
01:37:24
Speaker
Now, what you describe is something which would probably make most regulators, especially if you think about it in the context of how the current market works, where every minor change that you have to make has to go through a half-year regulation and common process, would make them tear their hair out. So I would like to have your view, because I think what we're observing and what we should all be grateful for is that there is a lot of experimentation going on in the space where people try to figure out actually what the right way to do it is.
01:37:54
Speaker
So what is your view on how would you like a regulator to at least address this particular space of DeFi AMMs?
01:38:07
Speaker
Yeah, so to refer to this, you know, specific thing that I just proposed, I don't think that's that different than something like the specialist system at the New York Stock Exchange, right? The specialist system is, you know, there's a designated market maker who has special privileges to do stuff that other people can't do, and they pay to do that, right? And to inject the SEC also absolutely hated. Okay. I think more broadly, like, honestly, I don't know,
01:38:34
Speaker
I think I see both sides in one sense. I think the great thing about the crypto space is the experimentation, right? Like where we started was, you know, this conversation was, you know, I was telling you guys when I first heard of these AMM idea, I thought it was idiotic.
01:38:49
Speaker
Right now is wrong. Right. And how do you know that you're wrong? Well, like, you know, the market speaks, right? People try it. It works. There's billions of dollars of volume and so on. Right. And you contrast that to the the the track five space where again, fundamentally, in terms of market structure, there's very little innovation and it's primarily forever for regulatory reasons. So I think that's one side. But I mean, on the other side, of course, we all see the the levels of scams and Ponzi's and so on.
01:39:16
Speaker
that occur in the crypto world, do I want that to be the financial system? Not really. So I don't have a good answer to your question. Yeah, neither do I. I think what I would like to think of caution would be try to get the really bad actors in the fraudsters and just try to see actually how people try to figure out the tech of how it works properly. There's a difference between the two, I would argue.
01:39:45
Speaker
Yeah, I mean, I think in some ways a nice thing about crypto is because it is relatively isolated from the financial system, you can experiment with this stuff. And it's not clear that you're not draining anybody's retirement account, really. But I think as things get more integrated, I think it's going to be a bigger problem.
01:40:05
Speaker
Yeah. So, taking another step back so I want to bring it back a little bit to the discussion that you had before of how the protocol level. So the smart contract itself should be organized and how it would interact with the protocol level. Is there room to say at some point that
01:40:20
Speaker
Maybe we should move an AMM into a side chain of some form where there's a little bit more control over how it operates and in particular in terms of the ordering of transactions and the reordering of transactions. Would that be a better solution? Because if you think about, I mean, so one of the things that I worked on was the violation of time priority, which is a problem and leads to MEV extraction, which is something that normal markets don't have a problem with because they do have time priority.
01:40:49
Speaker
Um, is that probably something that we can, is that, would that be something that we could solve in within the blockchain space? Um, so I don't know if it's something that we could solve, but I think there's definitely a number of groups who are looking at setting up like specific side chains for, um, uh, D five, um, maybe primarily for trading. And I think, uh, as you pointed out, there's a lot of degrees of freedom. If you can modify things at the consensus level to do things like, uh, like ordering and, uh, um, so on.
01:41:18
Speaker
I think there's other potential benefits in the sense that right now, let's say the gas market in Ethereum is really dominated by DeFi.
01:41:31
Speaker
Right. So if you have some application that has, you know, maybe nothing to do with DeFi, maybe you have a, you know, some kind of decentralized game or gaming platform or whatever, like you're exposed to like, Hey, today was a really ball today. Gas prices are really high. Right. So if you can sort of segment stuff off and have its own side chain, have its own market for, you know, people pricing the block space and whatever, I think there are some advantages there.
01:41:57
Speaker
I think the principal downside would be it sort of breaks composability, right? In the sense that one sort of wonderful story about DeFi is this idea of money Legos, right? That if I have a lending protocol and a DEX and I want to do a liquidation, I can sort of combine them. I can write programs that maybe interact with like there's an NFT launch and then that generates a trade and so on and so forth.
01:42:22
Speaker
It's one common platform. So this will break that. And it will fragment things. And so there's pros and cons. There's nice network effects of having everyone on the same platform. There's maybe another way to put it.
01:42:41
Speaker
Well, you could also think about designated site payments in some form, right? So we discussed earlier at the builder level, so builders could be the ones that run the arbitrage mechanism. You can imagine a mechanism by which there's a collaboration of some form of an IAMM with a group of builders, and the builders actually repay the liquidity providers for their arbitrage activities. So instead of sending it to validators, you can send it back to the liquidity providers.
01:43:09
Speaker
Yeah. I mean, I think the

AMMs in Traditional Markets

01:43:10
Speaker
question is how do you create a mechanism where the, you know, there's competition between builders so that the payments are the right level and so on. But yeah, absolutely. Now you sort of alluded to that there of course are a lot of.
01:43:26
Speaker
scams in the crypto world. And I think Andreas sort of pointed to the fact that, of course, you know, there is a difference between sort of underlying technology and maybe the players in the space that may cause some undesirable actions to occur. But if we were sort of to abstract from, let's say, the technical constraints that lead to these AMMs essentially intervening crypto assets only assets settled only on the on the blockchain itself.
01:43:53
Speaker
And to think about sort of the mechanism that is in place from whatever your favorite AMM as of right now is, do you see value to that mechanism in more traditional markets? Yeah, I'm not sure. I mean, the reality is it's more expensive to trade on AMMs right now than to trade on centralized exchanges like buy hands or Coinbase.
01:44:22
Speaker
Right. Um, uh, so I think, uh, um, uh, you know, there's just to clarify, when you talk about the expense, you're talking about like, including the, uh, well, okay. I guess that's right. So you're saying the fees and the price impacts or. Yeah. I think fees and spreads are very low. If you, if you trade a small quantity on, on Binance, you still have to pay 10 basis points, right? Whereas on.
01:44:50
Speaker
on an AMM, you pay five, right? I mean, you have to pay the gas fee, but it's not that. It depends on how much you prayed, actually. So they did. I'm thinking of the higher fee. I'm thinking of the more advantageous fee tiers. I don't think the arbitrageurs are paying 10 basis points, although I should confess that I don't know.
01:45:14
Speaker
I mean, I think the evidence is that, you know, 70% of the volume is like on centralized exchange, or, you know, on finance, literally, probably, right? So if, you know, in one category, maybe those numbers aren't real, but the volume, like the market doesn't seems to seems to prefer centralized exchange right now. I guess, you know, maybe that's the point I should make.
01:45:34
Speaker
I'm just going to defend the AMMs for one moment here because I think one of the problems with AMMs is also the learning curve, right? So, you know, going to Binance, going to Coinbase, all the like is trivial, right? You just basically click a button, you don't have to do much. Whereas if you want to do, if you want to use Uniswap, you actually have to figure out how it works. You have to have some Ether in your wallet and all that. It's actually pretty, this is not there for the regular person, right?
01:46:01
Speaker
Even, okay, I mean, you know, that's sort of a valid point as well. I mean, I guess one piece here is the fact that like, if you were to imagine everybody who's
01:46:17
Speaker
If you were to imagine like a whole, yeah, let's say everybody who was trading at Benance just suddenly shifting trading at Uniswap, it's possible that could be self-sustaining just from the fact that the fee revenue that it would generate would then incentivize a whole bunch of liquidity provision, which would then drive down the sort of price impact costs. There's a piece here having to do with the fact that, I mean, I guess in the economics language, I'm talking about like multiple equilibria and positive externalities, but it's,
01:46:46
Speaker
Like if this were something that was easy access to people and did not have, let's say, a bad connotation, which here, the bad connotation, I'm just thinking about, like if you were to put it in a traditional context, I think people just generically in traditional context have bad connotations towards crypto. But if you were to just like take the mechanism and actually have it in a way that people weren't like, they knew how to access it, they knew how to provide liquidity to it, and they didn't have some negative connotation in the first place,
01:47:14
Speaker
Then it seems to me the cost structure may look very different. Like maybe even, you know, you talked about the 30 basis point pools. Maybe you don't need that 30 basis point pool at all. Maybe at lower fee levels, you can elicit a very much larger volume because the amount of liquidity there is going to allow for the price impacts to be very low and people want to trade there. So I guess more of as a, you know, as a, as a theorist, if I can, if I can push that part of your brain, what do you think about the viability?
01:47:42
Speaker
So I think I am a little worried about I think the aspect like I think Andreas has alluded to a couple of times where there's a source of adverse selection that the pools can only adjust price via trade that sort of doesn't exist in limit order books and somebody has to pay for that. So I think some modifications are needed to reduce that.
01:48:05
Speaker
But I think as they are, I think that's a cost that's being born in AMMs that is zero in a limit or much smaller. And so the question is how to mitigate that. OK. So the arbitrage costs would actually go up if there's a lot of liquidity provision, meaning that the price impacts would be much weaker.
01:48:36
Speaker
I think arbitrage scales perfectly linearly with liquidity. If your mental model is that arbitragers have infinite capital, which is probably first approximation true, it should generally scale with liquidity. But my point is there's this whole source of the thing that because people can't move the price, because again, prices can only be adjusted with trades, then that creates a cost that doesn't always
01:49:04
Speaker
But I think we've talked about a lot of mechanisms to potentially mitigate that. So I think it's really a sort of research question. But again, with my theorist hat, I have the same concern that Andrea articulated, that there's this cost that doesn't exist in an order book with active market makers. And so somebody has to pay for that. Now, on the other hand, if we were trading things that are way less liquid, maybe it's a different story.
01:49:30
Speaker
Because if you're trading things that are way less liquid, maybe people don't know what the value is. And so maybe this arbitrage profits are a little bit more of a theoretical thing rather than a thing that's constantly being realized. And then also, as we know, in less liquid things, limit order books don't work as well also. So maybe to be even more optimistic, I think maybe the place where they could work is less liquid assets.
01:50:02
Speaker
I'm just going to point out that there is actually, so on the, on the FX side, there's actually experiments now running by the Swiss national bank to, to enable AMM type trading with tokenized with stable coins. I'm trying to figure out if that's actually a better way to, you know, deal with FX trades and actually have them relatively immediately settled, you know, at the retail level probably, and not so much at the wholesale level.
01:50:28
Speaker
So that's an interesting idea, right? So that, I mean, this is very low volatility asset with a possibly very, very high volume that you can use an AMN there to effectively create a market by which, you know, cross border transactions for retail and the like be, could be done very efficiently and very quickly.
01:50:48
Speaker
So I know a little bit less about FX also, but I think, you know, FX, you know, probably the volumes are bigger, but it's also more a little bit of an oligopoly. There's a little bit like, I mean, there's not exchanges, right, in where people trade this stuff. It's more, you know, OTC. And so that could be another area where things work well, but that might speak more to issues with FX than anything else.
01:51:11
Speaker
Yeah, this was great. I really enjoyed the conversation with you, Siamak. I learned a lot about your paper and your thinking. It was very, very helpful. Thanks for having me. We hope you enjoyed this podcast. Thank you for listening. As a reminder, you can find additional materials on owlexplains.com and can stay updated by following us on social media. That's all for today.