# Maximal Extractable Loss-Versus-Rebalancing

- Channel: [ETHTokyo](https://streameth.org/ethtokyo)
- Date: 2024-09-17
- Topics: cryptocurrency, ethereum, blockchain, data science, economics
- Watch: https://streameth.org/watch/66e9327a752c2afdaf6e5e17

## Description

This talk will discuss mehtods to empirically determine the maximal extractable amount of such CEX-DEX arbitrage value in an attempt to measure the upper bound of this LVR problem to date. The video features Ricky Yudhoyaga from Sorella Labs discussing the hidden costs associated with being a liquidity provider (LP) in cryptocurrency markets, particularly in the context of Uniswap's V2 and V3 pools. He begins by explaining the difference between passive LPs and LPs who trade against informed traders, highlighting that informed traders have market insights that LPs lack, which can lead to LPs incurring losses. Ricky introduces the concept of LP's hidden costs or LVR (Liquidity Provider's Value at Risk) and discusses methods to quantify these costs.

He details three approaches: a filtered markout based on historical trades, an implied volatility-based model, and a max LVR method. The filtered markout method calculates the difference between the price at which a trade is executed and the price shortly after, adjusted for volume and whether it's a buy or sell. This method also distinguishes between informed and uninformed trades by looking for signals such as high priority fees.

Ricky presents data from an open-source MEV classification tool called Brontis developed by Sorella Labs, which shows that LPs have potentially lost over $200 million since March due to not performing proper delta hedging. He also discusses how varying the time delay in

## Transcript

Hello, nice to meet you. This is Yuki Yudhoyama. I'm currently researching growth at Sorella Labs. I'm not sure if you guys are familiar with Sorella, but we are a project that is also coming out of the UBC. And today, I wanted to talk and share a little bit about quantifying LP's hidden cost. So LP as in liquidity for letters. So yeah, and then for the table of contents, we'll be going through how I sort of like frame the cost of LP. And then we'll be also explaining different ways in which people quantify those costs. And then lastly, a bunch of mark-out analysis, mark-out parties. So LP's hidden cost, I think just kind of given the context of what LP actually does nowadays, let's start with a happy scenario. So we have a passive LP on the left, where they're depositing 50-50 ETH and USDC into V3, V2 pools. And then you have those uninformed traders, uninformed users, who are swapping ETH, USDC in and out of the pool. As they do so, LPs are passive LP. Those are counter-trading. They are essentially facilitating those trades, and hence they are the maker for those trades that are happening uninformed. So what does those LP do? Well, they essentially generate a fee from those swap revenues. And LP, importantly, does not trade against the market on average, given that they are all uninformed. And obviously, LP can also adjust the price range. And they themselves oftentimes enjoy the market exposure that they gain from having 50-50 ETH USDC exposure. But what about LP with informed users or informed traders? So to kind of name a few that I thought about, there are quite a few informed traders in the market, the likes of Wintermute, SCP, and other searchers in the space. So how does the LP look like in that kind of paradigm? Just to give a bit more context, what does informed traders actually mean or what does informed flow means? Informed flow essentially means that they are traders who know information about the market that LPs are not acting on. So, for example, Winter Mirrored or SCP, they might be aware of the fact that the Ethereum price on Binance is moving and deviating from the ETH USDC price on Uniswap. That's an information that LP does not know that informed traders does. They may also know that there are huge trades that is happening on Binance, OKEx, Bybit, and they know that there's someone that is dumping or buying big in the market, that's also informed flow. And with that information, they can go to the LP and say, hey, LP doesn't know any of this. I'm going to be able to take advantage of the fact that LP doesn't know this information and be able to trade against LP to their own advantage. So what does LP gain in this case? LP, like the Kim Jong-un on the right side, is essentially eating up all, counter trading all those toxic flow and is essentially losing a lot of money doing counter trading against those informed traders. So they, in average, the LP trading against those informed flow would be almost always trading against the market, which is to essentially say that they are always counter trading, buying and selling at a bad time and price. And that is what I consider as the LP's hidden cost, or as I like to call it, the LVR, which I'm not sure if some of you might have heard. So that's the cost that they bear, being a passive LP on Uniswap today, on both V2 and V3. And that's a problem that we're also trying to better understand and solve as well. So how to quantify those costs? How to quantify those LVR? There are a few ways we can go about it. And I will kind of go through it a bit by bit and share some data with you guys as well. So the first approach is to use a filtered markout for realized LVR based on historical traits. And then you have the implied volatility-based model, which again we'll elaborate. And then we have the max LVR. So mainly three approaches. So let's start off with a filtered markout for Realize-AOVR. So what is Mark-out? To kind of just go through and explain what is Mark-out, here's some sort of example where we have a trader who just executed a trade at t equals to zero with price being thousand. t equals to zero with price being thousand then after execution they will look at it five seconds later and say okay what is the future price they will see and realize that the future price is thousand five so the price has increased by five dollars in this case this guy would have been better off if they bought the token at $1,000, but they would have been worse off if they sold the token at $1,000 because the price moved against them. So that difference between the future price and the executed price is basically what Markout is. This is the rough formula for Markout. So essentially it's basically just calculating with the volume that they have executed what is the delta between the future price and the executed price multiplied with the volume and with a T being the signal for whether it's a buy or sell from the angle of LP or traders. So that's kind of like the rough idea of what Markout does. Markout essentially calculates the delta between executed price right now and the future executed price or as some call it, fair market value of the assets. So why Markout? of the assets. So why markout? A lot of the time people use markout because they assume that the future market price is the fair market value of the assets, meaning that people believe that if this asset is 5, 10 seconds, 12 seconds in the future, that is the actual fair market value of that asset and that you want to make sure that you are trading in your own favor and do not want to trade against the market. So essentially the question that often gets asked when you are calculating mark-out is to say whether you should execute your trade now or execute the trade later for your own benefit. And then you notice here that we discuss about the time delay of t equals to zero to t equals to five. This is called a time delay for Markout. You can say you want to use time delay for five seconds, 12 seconds, whatever seconds. There isn't a specific single standard for what markout delay you want to use. However, if you talk to some crypto Twitter people on this topic, some may argue that, we should use five minutes. Some may argue that we should use 13 seconds. Some may argue that, oh, we should use five minutes. Some may argue that we should use 13 seconds. So there are various different perspectives that are oftentimes subjective around what kind of markup we should use, what kind of markup delay we should use. So I will also kind of go through that later as well. So what is filtered markup and why is it important? markup and why is it important? Filtered markup is essentially the idea that we use the historical traded, historical trades and filter for any informed trade. How do we filter for informed trade? We filter it by either identifying that they are trying to bribe the builders or proposers, or that they are having a very high priority fee. And that is a great signal for us to know that, aha, this trade is informed, because they are trying to, they display competition for accessing contentious states, meaning that there are multiple people that are trying to do the similar things and accessing similar swap transactions aka contentious state which in this case informed and and conversely those that are not competing for those contentious states are oftentimes considered uninformed because they don't have time and time urgency they're not trying to compete to get first access into a certain slot of the Ethereum states. So what does the data look like? So recently on the Sorilla side, we released an open source MEV classification tool called Brontes. With Brontes, we can help analyze various types of MEVs, including things like sex-sex arbitrage, LVR, those hidden costs. And we have found with some underestimation that conservatively, we have up to around a little over $200 million of LVR so far since the merge. This is the amount of money that LP could have made if they have performed proper delta hedging, but they didn't. So they basically like essentially lost on a lot of these values on V3 and V2. So the takeaway from this graph is that LPs are losing money, and LPs are losing money in a way that maybe they don't even realize. And this amounts to quite a bit of money, which is around like $200 million since the merge. And again, this is an underestimate. There could be more stuff that we might have missed from the Bronte analysis, but it should give a pretty good picture. So the previous data is on zero-second delay. Now, some may argue that, oh, well, zero-second delay is not good enough. Maybe you should do 12 seconds, whatever, whatever. So I want to just also show that I have run some Markov analysis with a varied delay period too. We have 0.5 seconds, 12 seconds, 60 seconds, all the way up to one day. And you will see that from the top, the red line is the three minutes delay, having the least Markov. And then it goes down by three minutes, 60 seconds, 12 seconds, 0.5 seconds, and then you have the rest, like five minutes, 10 minutes, 50 minutes, and whatnot. The point I want to kind of deliver here is that, sure, zero second time delay may have some biases in the data, which is expected. But if you look at the markout per trade, average markup per trade, with different time delay, while there are some differences, but we believe that it's not a significant enough differences for us to say that one is better over the other, which is also the reason why we decided to stick with a zero second mark out based on Binance price. And I also just plotted out the linear graph between the square root of time against the confidence interval width, just as a sort of like a sanity check to make sure that we have a linear relationship, because it should. So that was filtered Markow. Now the second method that people often time may use is to understand LVR is implied volatility based model. So this, that on the right is basically a formula for implied volatility. This is the paper from Jason. Essentially laying out in a mathematical term what the LVR look like. And to kind of just give a brief overview because that formula itself is like derived from like quite a bit of like steps. But the idea here is essentially that you can calculate slash estimate the LVR based on here the sigma, which is implied volatility or realized volatility, depending on if you're looking at in the past or looking into the future. So you can use the sigma with the price of the assets, P, and then basically deduce what is the expected LVR for the specific token pairs. And this model with implied volatility also assumes that we have an infinite centralized exchange liquidity. And that's a very important assumption because that's all that's not always true for long tail tokens so as i said here possibly there would be a fair bit of over estimate of the lvr value because that the long tail tokens has less liquidity on binance and other uh centralized. So this model may start to break down as we go down the list of token pairs from the top to bottom. And just for reference, Jason have also presented a graph to showcase that the Delta Hedge position plus fee minus LVR would look something like this. And for a pool of a size around like $300 million-ish, this is how much profit that they will be making on ETH USDC on UNIV2. And then lastly, I wanna also share about some of the ongoing work that we have on top of the filter market, which is MaxLVR. So to kind of explain in simple terms, MaxLVR is essentially, instead of doing a mathematical modeling to give an estimate that may be a bit of an overestimate, we also wanted to study LVR based on simulations such that we would be performing the price arbitrages via simulation to understand what is the amount of volume that needs to be traded between, let's say, the amount of volume that needs to be traded between, let's say, the ETH-USDC pair on Binance and the ETH-USDC on Union V3. And by doing this sort of examination, we can actually determine, okay, this is the amount of volume that we need to trade in order to get the same price on both venues within certain margin. And then this also allows us to flexibly change the hedging and rebalancing strategy on the Binance side so that we don't have to execute and rebalance everything at T0. We can adjust that rebalancing strategy a little bit more flexibly. So that's basically what we're trying to do. And why Max LVR? So our goal here with max LVR is to determine what is the empirical amount of maximum LVR that can be observed. And we're trying to calculate that per bra. And obviously, we can also adjust the time delay to determine what is the optimal time delay for maximum LVR as well. And the important part is that because this is simulation-based, this model would also work with any mid- to long-tail tokens as long as they have some levels of sex liquidity. long tail tokens as long as they have some levels of sex liquidity. And then lastly, this work gives us a better empirical estimate of the sort of like a maximum LVR and minusing any filtered Markov value would give more data on what is the leftover LVR on the table. Meaning that the amount of LVR that were not captured by Win2Mute and SCP and other folks in the searching space. And this is very much in progress, and unfortunately I couldn't present much data on this one because, again, we're still working on it. But, yeah, this is our attempt at trying to better understand this whole LVR space. So just to kind of give a bit of a summary, LP's cost is hidden in the form of various markouts. Filter markouts, max LVR, implied volatility-based models are all markouts in different forms of shapes, essentially comparing price A against another price B in a future context. And filter market law gives the empirical realized LVR based on historical trades so that we can gather as much as we can, like how much LVR that actually happened on chain. Implied volatility based model use the theoretical approach estimate to, actually happened on-chain. Implied volatility-based model used the theoretical approach estimate to and it used the volatility metrics to essentially estimate and predict how much LVR can be expected within a token pair. And lastly, max LVR performs assimilation for price adjustments between six DEXs such that we can empirically determine how much maximum amount of LBR that can be extracted per block. So, yeah. So, those are three. And, again, we are Sorolla Labs, and we're here to better understand and make it better, make this whole DeFi space better for LP. Thank you very much. Thank you. Thank you.
