Weighted-Average LP Duration

    What is the average duration of liquidity held in each pool, weighted by the size of the LP? Hint: use thorchain.liquidity_actions

    Introduction

    Using Thorswap users participate in providing liquidity for the following tokens:

    Left assets with RUNE:

    ['ETH', 'BCH', 'BNB', 'TERRA', 'BTC', 'DOGE', 'LTC']
    

    Right assets with RUNE: ['THOR', 'XRUNE', 'BCH', 'USDT', 'RAZE', 'ALCX', 'AAVE', 'WBTC','YFI', 'HOT', 'BTCB', 'SUSHI', 'UOS', 'LUNA', 'XDEFI', 'TWT','HEGIC', 'BNB', 'CREAM', 'UST', 'ETH', 'AVA', 'FOX', 'FRM', 'ALPHA', 'SNX', 'DAI', 'BTC', 'DOGE', 'USDC', 'GUSD', 'LTC', 'ADA', 'BUSD', 'TGT', 'PERP', 'KYL']

    The following can be obtained by providing a GET request to the following URL

    This investigation will be about figuring out how long users keep their assets in each LP pair.

    Loading...
    Loading...

    Average LP Duration

    Let's first look at the Average LP stay in hours...

    Average LP Duration

    Let's first look at the Average LP stay in days, giving us a more intuitive way to understand the data.

    Loading...
    Loading...

    NOTE: What first needs to be noted about my approach to getting these results (look at SQL query), is that I am guessing this is not the most valid way of getting their difference. I am very curious to see a more correct way of going about doing this, as I am not sure that my way of doing it is indeed correct. But hopefully, it is still "within the ballpark" magnitude of the answer.

    What we can see is that ETH-ALPHA, ETH-RAZE and ETH-SNX are the top 3 pools people stay the longest* (See my NOTE).

    I was frankly not aware of ALPHA or RAZE as tokens. This result is indeed very interesting and I wonder how that would look with time.

    What is also interesting is that popular pools such as TERRA.UST and TERRA.LUNA have users staying just about 200 or fewer hours in the pool. Maybe people pulled out due to recent price action, not wanting to lose a lot of their UST or LUNA, even with the LP protection that is provided.

    We can again seeTERRA.UST and TERRA.LUNA have users staying just about 9 or less days in the pool. Maybe people pulled out due to recent price action, not wanting to lose a lot of their UST or LUNA, even with the LP protection that is provided.

    Summary

    This was a satisfying and rewarding question to do, although I do not think my SQL query is fully correct. I found a creative way to go around my lack of knowledge on how to tackle it and I think even the journey to getting to a semi-correct answer was very rewarding.

    If the results hold any weight in magnitude, it is still very interesting to me to see that the TERRA pools have people leaving so early and other ETH based pools have people staying for much longer. ETH does have higher fees and hence to go back and forth it has to be worth it for the user to pay gas to do so and definitely come out at a profit, so this may be a reason why, but there could also be other reasons.