Arbitrage Extractable Value with Anthony Lee Zhang | a16z crypto research talks

28 Oct 2022 · 42:50

Anthony Lee Zhang proposes defining the impermanent loss of liquidity providers in automated market makers (AMMs) as arbitrage extractable value: the profit arbitrageurs take because the AMM trades at worse prices than an infinitely deep centralized exchange. Using a hypothetical optimizing AMM and a binomial price tree, he separates the volatility exposure of market making, which breaks even in fair markets, from the slippage that actually loses money. The resulting loss is path dependent and grows with the total size of price moves rather than the final divergence. A continuous-time formula gives a loss of sigma squared over eight per year for a constant product pool, about 8 percent for Bitcoin and 11.5 percent for ETH, in a model that ignores fees and gas.

Speakers

Topics

Transcript

for today very happy to introduce Anthony Lee Zack who committed you have had fun conversations with over the week from University of Chicago he's a professor in the business school talking about Arbitrage extractable value all right so thanks a lot very happy to be here I'll get started I have to apologize uh you saw this paper before a week ago as I found out after coming here that Tim has a very similar paper so I didn't have time to write another paper after I found that out so here we go all right so what I'm trying to do in this paper is the following right the colloquial wisdom is the following you have an automated Market maker quoting you prices to trade say a stable coin against ethereum or something like that right and there's this idea of this terribly named concept of impermanent loss right

um somehow when you're providing liquidity and trading this pair you're kind of losing something over time right and then this is somewhat related people think to this idea of adverse selection you tend to be on the wrong side of the trade you tend to systematically lose money right and then what I'm trying to do here is in a sense like take this and try and Define what is impermanent loss right like what precisely do we mean by the impermanent loss of liquidity provision through an automated Market maker and what do we mean by precisely defining this can we quantify like what is environment loss how much impermanent loss did a certain position incur what circumstances under which this loss tends to be a large loss versus a small loss and can I give a number which is you are providing

liquidity to ethereum versus US dollars in an amm right sort of how much are you losing every year to this kind of impermanent loss right so here I'm going to take a pretty strong stance on how we're going to Define information loss I'm going to give a name and I am thankful to shumo Chu Atlanta Network for coming up with a much cooler name than my original one we're going to Define impermanent loss as Arbitrage extractable value what do I mean by this we're going to say a very simple model where you basically have one centralized exchange and all the prices are set on the centralized exchange the centralized exchange is a big market and then arbitrages are trading the amm against the centralized Exchange so Arbitrage extractable value is the

slippage that amms incur by the fact that the amm could trade in a hypothetical world at the centralized Exchange price instead they're trading at a price that's worse as a centralized Exchange price arbit Rogers make the difference between the price on the amm and the price on the centralized exchange and so we're literally going to Define um Arbitrage extractable value the loss from liquidity provision as the profits that the arbitragers extract from the amms which are exactly equal basically to the slippage amms incur right why is this useful yeah so what would be notion of loss for those that are not trading on a centralized exchange listed no centralized exchange model doesn't

work so sort of yeah I'm gonna assume infinitely deep exchange um small amm not exactly true in practice I believe approximately true for most assets at this point in time it becomes much more complicated your price Discovery is totally happening on an amm yeah so that's a great question I'm not going to be able to deal with yeah why is this useful because it turns out that I can have I'm going to illustrate to you sort of how this definition works when a AED is large versus small it also leads to an extremely simple formula for calculating annual Arbitrage extractable value on any amm invariant give me a function a amm invariant I can calculate for you what Arbitrage exact will value yearly is what I'm going to give you is basically if we look at the constant

product Market maker if you're lping Bitcoin against US Dollars you're losing around eight percent a year to aav if you're arbitraging East um you if you're LP and ecusd you're losing around 11.5 percent here so that I can get like pretty simple numbers I can literally tell you how much are you losing to this stuff all right let me jump in so for now let's start a discrete time model right so time goes from one to T and then we have two assets one of which we're going to call money so stable coins for example the other one which we're going to call risky assets so Bitcoin or ethereum right and then the basic setup is that we have a centralized exchange and on the centralized exchange we have an infinitely deep centralized exchange so we have no price in fact you can buy or sell an infinite amount of the risky

asset X at a fixed price P every period um on the centralized exchange right the a m is a constant function a m so how do we describe an amn there is a function which we're going to call U of x y and the simple description of what the amm does is the amm is going to do some of you may be familiar with this the amm is willing to make any trade in any time period which satisfies the following equation U is preserved right and so the idea is basically as long as in Period T U of x t y t is equal to U of x t minus 1 YT minus 1 last year the amm is willing to make that trade right so familiar formula um I assume most of you have like seen some version of this basically in the constant product Market

maker the amm is willing to make any trade such that the product of X and Y is the same in any period right and you can use different functions for this I think everyone's seen this stuff yeah okay so we're gonna ignore fees we're going to ignore gas um and then what we also assume is there's an arbitrager you can assume one or many but assume there's one arbitr and then the arbitrager is going to trade with the amm plus the centralized exchange to maximize profits so very simple model the only person trading is the arbitrager no gas fees um no fees charged by the amm so on and so forth right so these are all the components of them all right here's the core kind of thought experiment we want to do in the next few

slides I'm just going to go walk you through sort of comparing what the amm does with a thought experiment that does better than the ammo so what is the thought experiment the amm trades to keep you constant right so the amm in every stage is going to sort of um have the same level of you consider an optimizing amm and instead with the optimizing amm does is it takes in every period T right it tries to maximize the level of the amm invariant conditional on basically trading at the centralized exchange prices this should be a weak inequality um so what is it doing and trying to maximize the level of its invariant conditional on basically YT money plus PT times XT is smaller than or equal to

money last period plus the price today times the quantity of ethos period right so this just says that amm is trading at the centralized Exchange price the amm is trying to maximize the um her her Amendment variant conditional on trading at the centralized Exchange price right and so the difference between sort of this amm and sort of the classic amm what do I have to do to build an amm that does this right I need to have an amm which has like a perfectly high frequency the Oracle to check binance's price that's really all I need because as long as I have that Oracle to check binance's price the amm can simply do the following it doesn't have to actively trade it just has to quote a price that's like Epsilon better than binance's price the arbitr will still Arbitrage for it and solve this problem

for it right but it doesn't have to give the arbitr as much slippage so I claim that hypothetically if I give you a perfect high frequency Oracle you can actually build the cmf but largely it plays a thought experiment role here yeah so in this experiment what does the invariant reflect for that for the amm let me try and walk you through this in the next few slides yeah but it's a thought experiment to illustrate where the loss is right so it's a theoretically attainable thought experiment um and this is how you put it um any other questions about this see the solution is not just the Benchmark it's actually The realizable Benchmark if you really want to yeah yeah and like many of the ideas for sort of like yeah if you had an oracle you would want to trade at a price which is not that much

worse than the centralized Exchange price in principle buildable yeah okay so now we're going to ask in the next few slides basically to illustrate this definition what's the difference between the performance of the optimizing amm and the simple amm here is an amen and then the equilibrium point of an amm basically looks like the following x times Y is equal to K this is like x equals K Over y right and what happens is the equilibrium point is the tangency point where basically the price of ethereum is equal to the slope of the X Y equals K level curve right what happens when the simple amm trades what happens when price has changed right the price changes to here and then what happens is that sort of if the price is

this then arbitrages are going to trade with the amm to the point or basically the slope of the P curve is tangent to the U curve right and then so this like you've probably seen pictures like this before this is what the simple amm does right here's a graphical illustration of the problem the optimizing amm dissolving the optimizing amm says I'm going to start at eight I can trade at Price P2 I'm going to maximize the level of my U curve conditional on the price P2 right and then so the optimizing amm goes over here right and you notice C is in a sense better than b you end up with basically more of it dominates but you end up with more Ethan you get more US dollars right that's kind of the key point to sort of where the losses in an

AMF like you could trade at this price you could literally program the amm to get the arbitrator to trade at this price you instead trade at this price what happens when prices move from P1 to P2 and back to P1 right so why do people call loss impermanent right because of the fact that when you change prices from P1 to P2 you go from A to B when you change prices back from P2 back to P1 you go back to a so there's a sense in which you didn't lose anything because you're back where you started right so what I want to argue is the optimizing amm says that's not the right Benchmark The Benchmark should not to be to get back to where you started the Benchmark is when this happens my simple amm which I told you is in theory buildable does not just get back to

where it started it does better I can make money trading here if prices move and go back to where they started very simple the one line proof um is the following the optimizing amm if you simply look at the formulas must achieve a u level that increases each period right the first view is attainable so I have to climb up every period right so if you look at the optimizing amm I'm going upwards once and I'm going upwards twice so I must increase you right how is it kind of doing that you sort of see how like you change the price from P1 to P2 I go from a to c change it from P2 back to P1 I go to d right so I can program a machine that if prices do this makes money for sure right and then you might be asking like what

is the trick here how is it possible to program a machine that prints money in efficient markets right where is the loss how does this make sense so I'm going to analyze a simple model that tells you how sort of it's possible in fishing markets um for an amm to make profits when this happens of course the loss is somewhere else I'm going to tell you where the losses you doesn't mean you make money here it does right because like in any sense in which you value the D bundle right you have the same prices as before you have more each you have more US Dollars you make more money but exactly as you say exactly as you say we're gonna move like increasing you doesn't necessarily mean increasing peace and that's exactly what I'm going to do in the next couple so if

you're coming back to where you're from want to hire you then you make money yes precisely and that's exactly what I'm gonna do in the next couple of slides give me a few slides that's precisely the next few slides like obviously I'm not like designing a money printer right I come from Chicago we don't do that there um okay so I'm gonna set up the simplest model in which we can ask the question of asset returns what's the simplest model we use a binomial tree right what's a binomial tree um price of ethereum USD is a dollar right it has a 50 50 chance of going up to 1.3 or going down to 0.7 right and then from 1.3 is a 50 50 chance of going to 1.601 from 0.7 it is a 50 50 chance of going to one and 0.4

so you cannot make money on this tree this is the Martingale do whatever trading strategy you want never going to make any money right so now I can just like answer the question what is going on by comparing the trading strategy of three different things I can compare the profits of hold so don't do anything just hold the initial bundle you have I can compare the profits of the optimizing amm and I can compare the profits of the simple amm so what do I do I literally just calculate in each note of the tree right I go from here to here how much does my simple amm do if I optimize utility on an XY equals K optimizing amm what happened and then in each node I can do that right what I'm going to report as profits I'm just going to sort of calculate as profits Pi

T is YT plus PTX T so the number of usdc you would have if you sold all your if to binance in this node at market prices any questions on the setup here all right so going forwards here is Buy and Hold and this is just to illustrate to you my notation and what I'm doing here right the Buy and Hold strategy regardless of what prices do they go up they go down whatever all I'm doing is X and Y I hold one unit of ethereum I hold one unit of usdc right so I do nothing there's still like fluctuation in the value of my portfolio because if ethereum is worth more than dollars plus like 1.6 times the value of ethereum is like 2.6 right this is our Benchmark and then now we can ask to sort of make sure

that my optimizing a m is not a money printer why can the optimizing amm make money like what's going on here here's the optimizing AMF when prices go up the optimizing amm tends to buy sell ethereum for US dollars so comparing XY here to XY on the Buy and Hold when prices go up the optimizing amm sells a bit of ethereum and loads a bit more on uscc as a result of that if prices go up further right the optim if prices go back down right then optimizing amm holds less ethereum then um the Buy and Hold strategy right and

then you notice that the profit here 2.03 is higher than the profit of the Buy and Hold strategy right this makes sense if you sell and then prices go down you are happy right if you sell and prices go further up you are unhappy right and so over here if prices continue to go up then the optimizing a m gets 2.56 which is lower than 2.6 right the average of these two of course is exactly 2.3 which is the average of these this is just illustrating I designed a trading strategy on a Martingale I'm not making any money right and so the magic why it is that the optimizing amm makes money when price is revert it pays for it if prices don't revert in a fair market like that evens out right and then so the optimizing amn is a trading strategy which sort of buys

sales price Rises and buys price tips on the bottom you see exactly the same thing if you go down and back up you make money if you go down and down again you lose money right so this kind of strategy the market making kind of strategy does not lose money when there's volatility right um it breaks even any trading strategy breaks even what happens to the simple amm right in the simple amm first notice that at every Stitch first you start with two right intuitively what you should think is that every time the simple amm trades it trades at a price worse than p so while the optimizing amm cannot lose money the simple amm doesn't have that guarantee because of the fact that it's not trading at the binance

prices it's traced systematically worse what might you expect then you would expect to see basically that sort of at every stage the symbol amm is losing relative to the optimizing ammo that's exactly what we see 2.3 here 2.28 1.7 1.67 so already in this stage we're making less money at every given stage than the simple amm when we go back here's the magic right here's where you see basically where impermanent loss comes from right it looks like you're not losing anything when you go from Price one up and then back down to one you get exactly the same profit as you started right but the thing is that sort of this is lower than what you would have gone if you traded market prices and you're losing even more than the optimizing Benchmark if prices go up and diverge so kind of Market making strategies right

when you buy when prices rise when fall and then sell and prices rise are kind of bets on convergence the bet on convergence is useful because if you win the bet if convergence happens you make some money if convergence doesn't happen if you lose money right and then sort of what this is showing is that the amm another way to understand where the loss comes from it doesn't win when prices go up you need to win when prices recovered you need to win on reconvergence to pay for the fact that you lose on Divergence right so sort of you don't win on the convergence you lose on the Divergence you're losing money overall right so sort of this hopefully illustrates like what is going on in the difference between optimizing and simple so basically let me try and summarize why I kind of do this decomposition I separate

into three objects Buy and Hold a market making strategy that trades at good prices which is the optimizing amm and then the amm market making strategy that trades at not good prices when we talk about impermanent loss we're confounding these two effects because usually we're comparing implicitly the simple amm strategy to the Buy and Hold strategy implicitly this can be broken down into two things it can be broken down into the volatility exposure of Market making strategies that you tend to win on reconvergence and lose on Divergence and the slippage between the optimizing and simple amm where every step of that trading you're losing some money so the core idea of this decomposition is basically that we should separate these we should not

call this a loss right this doesn't lose money right sort of it's a strategy that makes you like sort of zero profits in perfectly Fair markets right this is the loss right and then so the key idea here with these thought experiments is like let's try and Define this as the loss of an em and then separate it from this I want to walk you through a couple of examples to illustrate sort of what happens if we use this definition of loss okay so first of all let me Define in this context what is arbitrage extractable value in Period T the amm is selling some amount Delta XT right um of ethereum at some price PT AMF right PTM generally differs from The

binance Price p and then so Arbitrage extractable value is something we're going to Define as the arbitrager's profits from Trading with AMF this is extremely simple you're buying this much or you're selling this much at this price and then you paid that price for it right so Arbitrage expectable value is the amount sold by the amn in Period T times the gap between the amm price and The Exchange price there's a nice graphical representation of this it's not quite the gap between the optimizing and simple amm instead it's the following right when the simple amm buys from A to B that price is slightly worse than the binance price P2 right and then the Delta X the amount sold of ethereum

multiplied by the Gap in slopes between the amm price and then the centralized Exchange price this green vertical line that is exactly that that is arbitrage extractable value and you see basically visually that sort of the arbitrager is making exactly this much when prices move right so the PT amm that's like the average spot price over this size that's the a b line slope yeah so it's exactly the yeah the average price when training with amm yeah yeah notice this is a bit different from C which is where the optimizing M goes so I use the optimizing M as sort of a thought experiment but the definition here compares the amm price to the centralized Exchange price

okay where does this definition get us if we have multiple time steps Arbitrage extractable value simply adds up over many time steps right so the thing is you go from P1 to P2 the simple amm trades from A to B the arbitrager rips off this much from the AMF we go from P2 to P3 we go from B to C and then the arbitrager rips off um This Much from the amm I've noted points B Star and C Star right what are B Star and C star B Star is the price is where you could have gotten with a if you bought the same amount of ethereum but you bought it at binance prices instead of the worst amm prices right and then so C likewise is the amount of money you could have gotten if you bought at binance prices instead of

um amm prices right and then so the way I set it up y-axis is money x-axis is ethereum so then this is like the unit of these are in dollars right yeah I'm still having a hard time understanding why the optimizing even by your quality is optimizing so maybe I can is it in a sense like a dual problem where this has to be an invariant now the problem of optimizing maximizing the U you can see it as a dual problem of keeping the U invariant subject to having more Revenue well the optimizing amm I just call it that as a like I'm just calling it something it's like why let's just program a strategy that tries to climb

the invariant curve why would you do that as a thought experiment basically there's not there's no sense in which it's like Optimal in some sense it's just I can describe its Behavior by trying to maximize a certain function but you are defining the arbitrageable value using this no no okay so um so sorry so notice that I use the optimizing amm to what did I use it I use it as a thought experiment of a guy that's playing a qualitatively similar strategy to a simple amm but doesn't lose money so I want to illustrate to you why basically what is it about the simple amm that makes it lose money purely the slippage not the qualitative nature of the market making strategy that's what I want to communicate with the optimizing AMF Market making strategies that don't incur slippage don't lose money it's purely the

slippage that loses you money then I want to Define arbitrage extractable value as the amount of money you lose from slippage you lose from what you lose from slippage which is the gap between trading at the amm price dotted line and the binance price which is P2 and the binance price is the price that you can buy ethereum an infinite amount of ethereum at binance how does it map to the model that's P2 that's PT oh it's just a data point it's just you see news every year okay and every period I could like I could buy at pte but the amm forces itself to buy at a

stupid price and then that's why it loses basically because the amm fails to buy at binance is the good price yeah thus leaving some profits for arbitragers to extract okay thank you okay so a Arbitrage extractable value adds up over many time steps um is the optimizing amm model oh I'm getting a question in chat is optimizing and model applicable when price Discovery happens on uni Swap and um this is very similar to abdu's question which is basically I'm using the CeX here yeah I am um I don't think this necessarily works when you have only the decentralized exchange we need to think about that we're going to ignore that for this talk yeah I think that it's still empirically true that most of the liquidity is on finance

compared to UNI swap um so I don't think this is a terrible assumption for IRL at this point though of course it could change Arbitrage extractable value is not always larger you have this intuition basically that oh sort of impermanent loss is high the intuition goes when prices have moved a lot this is not true about Arbitrage extractable value let me give you a simple example right when prices move from A to B to C what is impermanent loss the vertical length of these two lines right suppose instead that prices move from A to B and then so from P1 to P2 and then back to P1 right so then under the colloquial intuition that oh price Divergence is what causes loss right the loss should be higher here

than here this is not true of Arbitrage extractable value how do you see that because the vertical lines here are not very big the vertical lines here are quite big right so the arbitrager gets to rip you off one way and rip you off the other way when go prices go down and back up here the Arbitrage are rip 2 off a smaller amount right so the key is basically when you realize that the losses are really coming from Arbitrage is not how far prices sort of ended up moving that matters for how much arbitragers make it's something closer to like the total absolute value sum of price changes right because like when prices move a lot in absolute value then the arbitrator rips you off a lot that leads to another property of course which is that Arbitrage extractable value is path dependent if you start at a and then go to B and

go back to a right that's not a sufficient statistic for figuring out how much Arbitrage is made of course this has to be true in some sense right and a simple example to show that it's true is if you move further away from a before coming back to a right then the vertical bars are bigger right so the idea is that the arbitrager can like rip you off for more if prices diverge and went back right so again sort of the confounding and impermanent loss of the Fall exposure and kind of the um like slippage like obfuscates this idea that really if you look carefully at impermanent loss it's not about going far from where you started it's about how many kind of jumps you took and how many how much the arbitrager could rip you off on all these jumps right so I

use these as like pieces of intuition to illustrate that basically we're going to Define arbitrage acceptable value as this slippage between what you do on your amm and centralized exchange the whole intuition is behind what is driving this loss when it is large when it is small right are quite different from the colloquial intuitions about people thought about impermanent loss it's not a volatility effect it's a slippage effect and tired right depends on total size of price movements that have path dependent okay by total size you mean like some of the tea um I should like Square quote total size informally exactly that yeah and so the idea is that sort of more conflict yeah yeah so the thing is because of the curvature that's not yeah qualitatively you kind of like more jumps you take the more you

lose yeah guys this is the same question that two people asked already but um is there any good way of modeling if you have some opinion on a liquidity ratio on the central exchange versus the D5 pool yeah I haven't thought of that it's it seems conceivably possible that you do a version of Arbitrage that kind of takes into account price impact on centralized exchange so you might look in that direction I haven't done it out yet it's quite simple in this world it's more complicated in that world I'll mention briefly one other thing that's ignored arbitragers don't only make this in reality when noise Traders hit the the amm arbit Chargers also make profits like doing like rebalance Arbitrage right because the noise Trader like I go in and do a stupid order to buy from the amm the amm the arbitr rips

me off on the rebound right so I don't have to deal with that because I ignored noise Traders the only Traders here are Arbitrage but a definition you might use if you put in noise Traders they try and take into account the rebalance Arbitrage basically yeah okay so now we come to basically the second question which is okay I've defined for you in permanent loss it might be useful if I can use this to go in and quantify actually how much are amm's losing to impermanent loss right and it turns out we get a very nice formula for this in continuous time right suppose prices move a tiny bit DP right so we move from P to P minus DP prices decrease a bit right zoom in a lot to this function what happens to this function is basically

that the amm moves a bit along this curve from the point with slope P to the point with slope P minus DP so you'll have to believe me because I hand waved the proofs that if you zoom into a function close enough the slope between two points when you have P here and P minus d p here is p minus DP over two I think this is obvious um okay so then if this is p minus DP over two right and then we have the amm trades in amount DX right then the size of this line Arbitrage extractable value is what the gap between these two slopes so p and p minus DP over two times DX right and then so once we do that out what we have is that the size of this bar Arbitrage extractable value in a

very small time scale is DX the amount traded times the slope gap which is DP over two so dxdp over two right pretty nice formula the way that we work with this formula is that DP is an object for a price that evolves like with a geometric Rhino motion or something we understand right the way we need to what we need to do is understand what DX is on a small period of time right how does DX change DX changes because P changes and when P changes we the amm trades right so we can express this simply as dxdp the demand elasticity the demand slope of the AMF how much the amm trades um per unit price movement times DP squared over two now you can do a rather

ugly piece of algebra and figure out what dxdp is for any amm invariant right and then it is this ugly thing where you basically take a number of derivatives of the invariant function right this looks ugly I basically um you you can basically show that what this is is the determinant of I think what we call the bordered Hessian of you so what is that it actually has a very simple interpretation which is the curvature the convexity of the level curves of U why does that make sense because you stare at this thing and ask when is DX large if you have a very very convex you like a rectangle change prices X doesn't move at all if you have a very linear U change prices and then

you have to move a lot um to the right in order for the slope to change right so basically in or if the amm trades until the point where the slope is equal to the new price it's the convexity of these curves that determines dxdp hopefully you believe me on that and then sort of you can show that this is a like a proof somewhere this is um the denominator of this is exact is exactly related to the convexity of the level sets of you yeah but what's the important thing I can just like these are all derivatives any invariant function I can just throw in here and calculate what that is then what I notice is just that the expectation of DP squared in a small time period is Sigma squared P Squared

DT right and then for a geometric for any in motion I can just calculate the percentage annual volatility for like a risky asset and I get DP squared right um I probably butchered the notation here I'm not very good at stochastic calculus but then you just divide by portfolio value and then you get a term which is basically you can interpret this thing as saying in a unit of time what percentage of your portfolio value in US Dollars are you losing to Arbitrage extractable value and then we have the dxdp term which I can calculate here Sigma squared P Square over your portfolio value now I can just plug numbers in um into this formula and then it turns out um that for the constant product Market maker Arbitrage acceptable value is accrued at

this very nice rate of every year you lose Sigma squared over eight in AV yeah so you have a very nice formula um the first thing I did when James and me is Haver is scroll down see the eight and then I was very sad but at least either we both got it right or both got it wrong but basically like literally the same formula um you can do it for any other function right because these are just derivatives I can throw the quantities in and just calculate What U is so then for the balancer in econ speak called Douglas Market maker which is constant product just with some coefficients right I can calculate Arbitrage extractable value as a function of the um coefficients and then for a nice um another example stable swap is curves invariant and curves invariant is quite simple it

basically says let's do constant product let's add a linear term to constant product right so the intuition here is that like stable coins basically have price equal to one most of the time so we want to have higher demand elasticity like dxdp has got to be higher we want to trade a lot without like moving prices too much this has less convexity than this you would expect that um AEV Arbitrage extractable value should be higher when you have less convexity because every bit that the arbitrator rips you off you're trading more with that exactly what you find is that our overcharge extractable value for the stable swap invariant is Sigma squared over eight one plus Chi where Chi is the weight a chi over X or Chi is the weight on the the linear term here basically so

then it satisfies the intuition that the more linear you make this um the less convex the more it gets ripped off by arbitragers and then the more impermanent losses uh Arbitrage is expectable yeah oh I see it says the constant High scale yeah yeah so that's in practice it's actually right right yeah this is Dan Robinson did this in his post so I did the same thing yeah because then it gets messy it gets messy yeah now I just plug in numbers because I have a sigma squared over 8 and I just throw in numbers in here so you want to answer the question like you're lping for a constant product Market maker Bitcoin and US dollars right how much are you losing every year how much are Arbitrage is ripping you off every year and then you plug in that the sigma of Bitcoin is Bitcoin moves around I just

checked Google this around 81 annually right and then so Sigma squared is like 0.65 and you divide by 8 and then you're getting that sort of arbitrary extractable value is around eight percent per year for Bitcoin each had I think slightly higher volatility and then as a result East aav on a constant product Market maker is around 11.5 percent annually yeah I'm not aware of any paper other than tins that give you a formula to be able to do this so another contribution I think if you accept that a definition of improvement loss is what we've put down here um then you can like calculate what it is and another way to say this is calculate hypothetically sort of how much you can gain from building this optimizing Market maker which literally

trades at binance prices all the time right so this is kind of a here's the size of the pie if you built that thing yeah um did you actually dig into kind of like trade volumes on you know swap V2 or V3 oh it's for the fees to compensate yeah yeah yeah so I think that no I didn't um I was thinking about there's a question which is like like I said I don't know how to I just don't know how big to me but yeah I would want to back that up a little bit right right yeah and I guess like it there's a sense in which basically ultimately these should be paid by the guys trading like if you think the lpers break even right so the trade like this should in some sense be absorbed in

bigger trading fees for the noise Traders or stuff like that I haven't really thought about pass-through but yeah same question like what how to interpret this number is tricky another thing to you might like even the interpretation that arbitrages get this is wrong the reason that's wrong is because they sort of gas fight it away right and then so the thing is that there is not one guy ripping these guys off for eight percent a lot of that is probably burned in like um fee competition gas competition between different amms trying to a different Arbitrage or trying to front run yeah um okay so here's a list of things we ignored so um we assume centralized all the liquidities on the centralized exchange ignored fees ignored order flow that's

not Arbitrage um there is another thing even with these assumptions that's ignored which is if you assume that um there's a person who knows where the centralized Exchange price is going to go in form trading you have to account for that also we ignored that um and then there's this uh thing that I mentioned which is that reversion trading is also Arbitrage extractable value if you thought of it this way and then you could imagine once you put noise training in accounting for that didn't do that who pays for it so the passenger Point um we ignore gas fees and then sort of yeah that's a lot of things we ignored but yeah so the idea basically is do you want to separate basically it's not

really a ball exposure it's not sort of how much prices diverge that like this paper argues is what LPS lose what LPS this is pure slippage right and then so sort of you can set a simple model up and show with these examples how like this is a definitional paper really so it doesn't make too much sense to define the loss of amms in a way which depends on volatility it's all slippage and the other nice thing basically about defining it this way you get some like internal consistency things what the amm loses is exactly what the arbitrager gains right and the final thing is it leads to quite nice like formulas and continuous time where it can literally give you numbers for how much the amms are losing over time um all right I'm like quite early but all right done thanks foreign

[Applause] is there an obvious reason if you had a very good Oracle why you wouldn't want to implement the like Optimal and um over like the normal land um I think that one thing you might consider is that you face a bit of a trade-off in that sort of the closer prices you offer to this the less the incentive to Arbitrage you so you probably want the arbitrator to keep a little bit like and tune that to enough so they actually want to do that but in some sense like yeah like you're you're you're kind of getting towards the same place and kind of keeping more money so yeah I think

you would want to do that like if you don't have like like I mean you'd stick an Oracle in and you expose yourself to all kinds of Oracle attacks so assuming those away I don't see any reason not to do that it's not a new idea I think the idea that sort of if you had an oracle you should be trading at that you should be using external prices as inputs is an older idea I think yeah like the magic at some level of the simple amm is that you can Market make without seeing prices right but the thing is you see prices you can do better yeah yeah so do you think Arbitrage just kind of reduce price variance somewhat in this model they do not in this model ah sorry sorry go continue first in this model they do not because there is no

General equilibrium and price volatility is fully exogenous at binance Price volatility yeah yeah but you could imagine that one of the roles they play in general equilibrium is that and so once you consider mean variants utility there is a the risk component that they are reducing targets play uh systemically important role in the ecosystem and the same arbitrages need to be capitalized and we're feeding them money that helps them stabilize the ecosystem I agree with you a train of thought like that goes it's just a different interpretation of just the same thing right okay in a sense I mean the thing is multiplier on the Arbitrage money that's very positive and you're like I want to give these guys money did you play as crucial role in the ecosystem yeah that line of thought

goes through I thought about that I at first glance I would not see that as like I would like vote no on that but like conceivably depending on what they're doing outside in the ecosystem that could definitely go through yeah there's a university in which that that works I think yeah possible point of confusion around it's catchy but like I feel like the concept has nothing to do with like blockchains per se it's true like the reason we care about simple and is because of the constraints of the blockchain so yeah was any of the uh is really about like transaction ordering

yeah it's really like because of the guts of how the infrastructure is implemented right this feels like the way this is almost arguably more pure concept right that's independent of the architecture it's just about different ways to student marketing I think yes and I think in some sense I intended that way for the following reason this is essentially identical to Eric buddhist's work on hft sniping which is that if you replace this with a limit order book but a really dumb limit order book which also didn't update in response to prices and then this guy updated when the arbit charger sniped it same economic effect so I kind of got here by sort of noticing that sort of the convergence Arbitrage on amms is qualitatively the

same thing as sniping sort of discrepancies between different exchange prices so sort of I am in principle okay with this being used to refer both to that on amms and that on centralized exchanges yeah but I agree that if one wants to do or like another way to say that is that one then asks the question is it really an economically different thing what's happening on decentralized exchanges versus dumb centralized exchanges I think I would currently lean towards no it's actually the same thing like if you don't update somebody's going to update it for you and then there's a loss from that yeah but I mean it's different from like me I feel like it's not a purely economic yes it really is but it's kind of it's it's somehow like they'll get really

intertwined with the Weight Watchers right so whereas this feels more like it kind of feels like it's clear to like 10 years from now this is still a basic notion for his way because we don't know a boxing Arctic differences yeah but yeah I mean like the AV is a marketing choice and not by me yeah I don't know if I heard you correctly but I feel like I heard maybe a couple of times you made the comment that how much the arbitrager makes um doesn't necessarily depend on the size of the price movement so for example if it moves in One Direction um uh you might not make money if it sort of continuously goes in One Direction I think um there is a Nuance there where it does

depend on very much on the volatility yeah let's do that in your formulas I mean basically um your aav is kind of like the payoff of a volatility I'm sorry a variance swap in fact right yeah so it actually an extreme dependence on on volatility if uh volatility jumps or Falls yeah in the continuous time model you accrue this stuff at a continuous flow rate yeah so sort of in the discrete time model I sort of work like my definition works I think in both cases discrete and continuous time a more accurate statement would be in the discrete time model um it doesn't depend on and that that statement holds in the discrete time model and continuous time due to the nature of geometric Brownian motion um yeah like instantaneous at all determines instantaneous AV yeah

should have been more precise on that great thanks a lot yeah