Profitable Concentrated Liquidity Provision in 2024 Myth or Fact? by Ivan Vakhmyanin

ETHDubai 2024 · 21 Apr 2024 · 27:06

Ivan Vakhmyanin examines the profitability of concentrated liquidity on AMMs such as Uniswap v3. He discusses impermanent loss, loss-versus-rebalancing, hedging, backtesting and active liquidity management.

Speakers

Topics

From ETHDubai 2024, hosted by DeFi Dubai.

Transcript

so hello everyone uh my name is Ivan vman and I will talk today about profitable defi liquidity provision and I will focus on Unis swap but uh most of the findings are actually applicable to other uh amm so um just a few words about us so we are are a team that helps institutional investors in building um trading strategies and also so we are doing a lot of defi research so uh one of our like important direction is studying uh Unis Swap and so and developing strategies for optimal liquidity provision and so that's why we're doing this research and today I will share some of the F

findings uh well there is no question that uh defy and Dex volumes are growing right now so by the uh one of the latest U research Pieces by Kao we see that actual Market depth of um Unis swap is bigger than most of the centralized exchanges except bance uh but uh it's also widely known that un swap v3e liquidity provision is widely known to be controversal so there are a l number of researches uh the first one was uh done by topas Blue and boring back in 2021 and it it has shown that uh almost half of liquidity providers are actually

uh um have negative returns from impermanent loss and average liquidity provider loses in comparison to just holding assets uh after that uh there are a number so this this uh topic is widely researched but still it's uh not really clear how to build uh the pro the profitable strategy and uh we also um uh tried to find out if the situation has changed over time so just a few Basics so what's the impermanent losset how it hurts uh the liquidity provider so we can see that um if liquidity provider just holds assets then uh his portfolio value of his portfolio is changing by

straight line so the green line on this graph is just holding like 50% uh ethereum versus 50% usdc uh if uh the problem is that pure liquidity provision uh pure liquidity position its value is always lower than the Hodel portfolio that's a blue line so you can see that uh um the further price moves from the like starting price strike price um the the bigger is the difference and this difference is exactly impairment loss um the like widely um popular uh approach to uh fighting permanence loss is

hedging position by uh shorting uh opening the compliment complimentary short position uh structured as a like Perpetual um or U by um borrowing the volatile asset um but this doesn't create the uh truly um Delta neutal position it creates the um pay of curve like the orange line here so it's close to fully delta neutral position uh like near the price but in case of fed tail event when the price like drops of grow significantly and that happens quite often in crypto uh then you actually uh have loss so um this loss should be paid

off by fees uh and fees are actually moving uh these curve straight up um uh to the up continuously while we Fe the Cru so the the like uh the question is how we build the strategy that um statistically uh overperforms uh the Hodel by uh these fees so how we uh approached this problem so we started a large scale analytics of LP profitability uh which actually that goal was to calculate USD pnl of every single LP liquidity provider on Unis swap on ethereum and on arbitrum um we've done this by using our

data engine so we have our own indexers so we are not limited by the uh like uh performance or uh query limits of public data providers like dun for example or bit query or others and we have a full control over the lowlevel uh data and uh we have achieved a full observability of the market activity and we have and with by some of the findings I will share them to you today so what's the methodology so we fetched all unit swap V free events and transactions and and full event data into our analytical uh data warehouse so we have computed the end of block unmanipulated USD asset

prices so it's important to um even for um uh like high high liquidity pools like if to use DC it's important to use um very uh nicely filtered prices because on one hand you if you like take some 5 minute 10 minute prices uh from centralized exchanges then you uh might have huge discrepancy between the actual price of the execution of the trade like 2 3% and more and if you use only onchain data by taking the like price in the pool in the swap transaction you can get uh huge outliers created by m Bots

that can actually manipulate prices inside the block by the like large amount amounts of uh percentage so uh then we have detected and labeled all M Bots uh by using some heuristics so we can uh put them aside in our research uh and we uh what's was the most complicated thing we have recreated the unisoft V3 fear crew algorithm uh that actually allowed us to compute the uh historical position valuation for any moment in time for uh any position because uh the problem is that the the acral of fees is not recorded on the blackchain blockchain uh events until the position is closed uh that's done

for uh gas efficiently efficiency and uh but that doesn't help you to um calculate exact profitability in some moment of time and you cannot create actually query uh the historical archive node uh for every block and for every uh liquidity position for the whole time that will take like AG uh so that allowed us to calculate the daily snapshot for all individual liquidity position broken down by asset um by assets by players by loss and loss and gain and and the cruise fees uh and I will share some findings here but of course uh uh if you want some deeper research you can contact us we can provide the US the access to the um some

more detailed information so how are aggregated LP profits are structured to etherum uh that's a very interesting chart so this is the profitability structure for all liquidity providers in top eight Pools by physic routs uh taken all time so we we see these eight pools on the graph and we see that the majority of uh uh pnl both com unrealized and realized combined uh comes from vbtc BTC to ethereum pool so you can see this let me see how I can show it okay so this one the uh dark blue bar is the total uh pnl of all liquidity

providers the light blue bars uh is the uh total fees ACR so we can see that in the most popular pool usdc to ethereum with 500 fet tier uh the fees ACR they actually the highest on the on this blockchain but on aggre gate uh liquidity providers actually suffered a loss uh there and only on in the in the biggest pools the the real profit they get from BTC to ethereum pool and it's interesting that uh exactly uh the same situation happens on arbitrum uh despite the fact that arbitrum has a like lower lifespan and it has lower um gas fees so

at first we we thought that that might impact the situation um because low gas fees actually uh might help you to more actively manage position but in reality uh the situation is very very very similar and um uh the reason for this is that BTC to ethereum are actually highly correlated assets which means that the probability of uh the rebalance event when your um position the price goes out of your price range of your position is much lower than for any uh crypto asset against USD uh or usdc usdc doesn't matter so um that creates the uh

interesting fact that on average um BTC to ethereum uh is more profitable but that doesn't mean that same is applicable to individual investors of course and individual strategies um so the the good question is also on agregate is it better to actively manage LP position or like uh use use some relatively wide range and leave and forget um and it's interesting that uh if we take again again we take not like top players we take like all liquidity providers we see that the more positions uh liquidity provider has um then generally the less is aggregated profit

so you see that um for all LPS uh for top eight pools uh com um total profit combined is actually uh positive and for LPS uh filtered uh LPS with 20 positions plus it's actually negative uh by the like almost the same value so which means that on average uh it's better for for um liquidity provider to uh choose the positions with like longer uh lifespan against uh again we have a number of limitations here in this research and I want to you to main uh to actually understand them so one is uh we

uh are um considering that one wallet one ethereum wallet address is one liquidity provisor obviously in reality that might be different so one liquidity provider might use multiple um wallet addresses and um uh if for example multiple liquidity providers are using some sort of like aggregated uh uh liquidity provision management W they can use uh one wallet uh we also see only uh Unis swap positions in reality they can be uh part only part of some portfolios but uh even even with these limitations we might draw draw some interesting conclusions from this so but

uh another question is uh how profitable is liquidity position for leaders so if we uh take only uh top LPS by a only those active in last 3 months with position sizes bigger than 50k uh USD um with Max maximum size of a position bigger than 5K USD the situation is quite different so we can see that um some of them manag to achieve like one more than like three digits uh apis and these are these are actually true apis not those that are shown in uh most like liquidity uh calculators available publicly where

they uh actually ignore the uh impairment loss and the probability of uh fat tail events and you can actually see that activity duration days uh um for many of them are over 100 days so which means that this is not like a gamble positions like you invest the to uh some paper to Something pool uh in the morning then something happens and you um uh get high profits in the evening so the these are not um these outliers so this is uh these are some sophisticated uh Traders so what key takeaways we can see from here so so one is that it's

still hard to be profitable at uh LP provisioning using unhedged positions so that situation doesn't changed uh much since 2021 and it's completely the same on arbitrum and uh we we haven't done this research on other chains but I my uh intuition here is that it's completely the same on others uh then um for top LPS it's still possible to achieve three digigit apis although they constitute the little minority of the market and I need to mention here that that might be uh this takeaway might be subject to survivorship beers um which means that you need to treat treat with uh with caution so in general um active

concentrated uh position management is worse than just keeping a reasonably wild position so uh and we have found no uh would say signs that there are some Auto Solutions at the market that actually uh can help with this so it doesn't matter if you do it manually or you use some automated public solution so uh in general uh also in general liquidity provision is more profitable for correlated payers like BTC to ethereum uh which of course doesn't uh directly guarantees that this will be same uh in the future because for example in last months we see that correlation between btcs if is uh like

at record lows but um still we have this finding and the last one uh we see that me and gas fees have little effect on LP profitability um um at first we thought that this would be different and me BS will like capture a majority of LP profit but in reality it's not and um we also couldn't find any uh significant differences between ethereum and uh uh arbitrum in terms of the like General uh mechanics that works for LP providers other that than of course on ethereum you must have a higher Capital to

justify gas cost because gas costs are uh actually flat fee uh not cor not linearly uh connected to the size of your position and uh which means that it's not it doesn't make any sense to have a like 10K position on uh ethereum that would be all all your when your all fees of cruise would be wiped by the gas costs in like uh one one rebalance or open closer position so that's all uh for today so I would be happy uh to connect we are uh um located here in Dubai but we are always uh happy to discuss so uh feel free to check out our website we have

multiple links to our researches available on medium there as well not only on Unis swap liquidity provision but also on uh flashh Arbitrage and some other topics like TX de Arbitrage so thank you and we be happy to answer your questions thank you very much for your talk it really really interesting um I was going to ask how you get your data how are you able to produce such brilliant research I mean obviously there's a lot of data

in crypto how do you you go from the chain through to a report like this so technically it works like this so we have a a fleet of our nodes uh in house for ethereum and for some other popular l1s and l2s all evm based so we maintain they all in house so most of them are Aragon based uh and we also mod are modifying them uh for the performance of data extraction then we have uh our high performance ETL processes that actually put the data in our analytical uh database um uh data warehouse based on

click house uh and because our team actually came from the Enterprise data analytics uh creating like data warehouses and um predictive modeling for huge enterprices for many years that would be that was easy for us to to build this Pipeline and uh after after we have all this data uh inside and by the way this ETL process is very complex because it's not just uh you take log data and put it to database you need to um for each um um for each uh Dex protocol we have a separate um uh ETL process that takes into account the

internals of the process to actually compute the liquidity or all other data which can be used in in the research and then we just write SQL queries uh use some analytics and so on if I may just have one followup um which would just be uh do you have inra transaction or do you stick to end of block data uh sorry do you have within transactions and transaction level data or do you stick to end of block uh level data uh that's a rather uh good question so in our warehouse we have uh inter transaction data so and we also have uh the feature that we called um uh sub time stamps

virtual time stamps because um in all transactions in one block you have one time time stamp and uh we use Virtual time stamps to actually sort the events um accordingly so you can easily do that uh transaction uh and for example we use uh this transaction data to identify meev because me um liquidity just in time liquidity provisional flash Arbitrage you can easily identify it inside the block uh but for this uh research we use end of block prices because we don't want to actually uh um to see manipulated prices inside the block oh yeah CU they' be unsettled prices

basically from your perspective okay cool thank you very very much it was uh hi uh have you tried this on solar where the transaction fees are low and the users are primarily uh making more transactions on dexes uh sorry can you repeat uh doesn't hear clearly here sorry have you tried this on other blockchains where the transaction fees are low because that that means that the end users will use

Deus more uh that's a good question so as I said uh we are focusing on evm based blockchains and we this particular research we've done on ethereum and arbitrum and the reason for that was that the these blockchains have the biggest liquidity so uh uh we also um took some like not the full featured research but like sneak peek into B&B smart chain uh and polygon and the general mechanics is this is very similar so we haven't uh uh the the limitation here is with uh we uh have studied only uh Unis Swap and Unis Swap

fors and um there are there is a significant sharing protocols that use liquidity uh liquidity book U um protocol instead of a constant product formula but we haven't included them in this research as well thank you thank you what what do you think about using like ref and all of the other like ETL tools that like the Paradigm team is trying to build in terms of like

extracting data in a way that's like more lightweight than something like you know Eragon uh so just um can you rephrase the question so so using some short part that bre the rust G uh G mhm so yeah Paradigm is the fund is like doing a lot of research with rust based tools and you know the thought there is that using W as a node is lighter and easier to extract data and it's more reliable that's actually a very painful question for us but very good question uh because uh selecting the right like backand and

right notes very important for performance um the reason why we've chosen uh Aragon is that uh because it's uh more efficient in terms of storage so in go e the storage is very inefficient and because for example for beans be smart chain for uh to maintain an archive note right now you need over 50 terabytes of SSD uh on so which is crazy on Aragon it's much more uh efficient but but we have some problems with Aragon as well because um Aragon has recently dropped the support for some of the chains focusing on ethereum um and which makes it more painful to support all the hard Forks happening for us uh

we have explored uh ref uh in maybe like year ago and it was too immature uh to for us at that moment but I think we will definitely like get back to it uh in the nearest Future because um it's there are a number of problems in go ethereum and it's also was announced by the uh core team of the core ether core go etherum team that um the archive functionality is not a PRI priority for them so which means that we are focusing on like life performance on the nodes uh which is great by the way uh but for uh data providers like us uh

that's actually difficult because we need archive nodes to to build on them so definitely we will explore other clients and systems like this I had a question um like like you you have this fire hose of data when you're running the node so how often do you actually run the your analysis like you take a snapshot how often like how do you deal with that so currently currently for this particular research we uh have a uh update uh once a day so we just like once a day it refreshes all the dashboards because uh

most of the positions are like leing longer than a week so it doesn't make sense to to do it more often but uh in some other Pro projects we have uh down to um subblock latency updates especially for for example for Arbitrage Pro projects where you just cannot wait for 12 seconds for block finalization and you cannot wait for finality uh because most of the data public data providers they actually are waiting for the um finality like five blocks seven blocks uh depending on the blockchain and which means that you have a huge delay in your data for which is which is okay totally okay for liquidity

provision but it's not okay for like Arbitrage and um of course they are doing this for a reason because if you uh start listening for data on the subblock level you have you need to implement the uh reor handling because you can get some like price and then you can get the updates that this price was invalidated so uh and on ethereum this actually um happens quite often on the CH uh chains like two two two two to three blocks so you can uh and in congestion times you can actually have like you see the uh trade happened in the block and then uh it's be it it's

being pushed back to in the M Pool and sits there for like half an hour 1 hour so you need to handle this properly and this is additional layer of complexity so for most of the projects you don't you don't need this but yes it's it's possible