Calculating Redeemable Value of a Liquidity Pool

THORChain University
3 min readApr 21, 2022

--

Part 1: Basics

In this article, we will break down the components that make up the redeemable value of a Liquidity Pool (LP).

In a LP, it is helpful to always think in terms of 50:50 of the two assets, including the initial deposit and eventual withdrawal. Therefore, all discussions below are based on this 50:50 basis.

When you deposit into an LP, THORChain keeps track of your deposit, not in USD value, but in the actual quantities of the two assets. This is also known as your HODL Value, i.e. the quantitative value of the same assets as if you had just hodl them in your wallet, without doing LP.

Once your deposits are in the LP, you start to gain/lose value, which is tracked via a concept called Liquidity Unit Value Index, or LUVI. Gains are from trading fees and block rewards. Synth leverage can either give gains, or loses. These gains/loses (or LUVI change) are accrued directly into the LP once every THORChain block (about 5–6 seconds). There are no external LP tokens or any harvesting of rewards necessary.

In additional to LUVI changes, when the prices of the two assets change in relation to each other, you will also incur Impermanent Loss (IL). IL may expand and contract over time depending on price movements.

Your redeemable value, then, is your HODL Value, plus/minus LUVI change, minus IL, as shown below:

HODL Value +/- Luvi change - Impermanent Loss = Redeemable Value

The actual redeemable quantity of both assets will depend on prices during withdrawal, split 50:50 by value. If this redeemable value is greater than your HODL Value, then great, you have profited from the LP!

However, there may be scenarios where the IL is more than the positive LUVI change at the point of withdrawal. This also means your redeemable value is less than your HODL Value.

Finally, the last scenario is when a negative LUVI change was experienced.

Part 2: Additional Deposits

Let’s explore the concept of additional deposits (again, let’s just consider the symmetrical 50:50 basis). In this case, your HODL Value is now the SUM of all the deposits.

For example, on Day 1, you deposited 500 RUNE (at $10 price) + 0.1 BTC (at $50k price). Your HODL value now is 500 RUNE + 0.1 BTC, irrespective of price changes.

On Day 20, you deposited another 400 RUNE (at $8 price) + 0.05 BTC (at $64k price). Note that this is still a symmetrical 50:50 entry at the new prices.

The new HODL Value (for the purpose of calculating Redeemable Value) is now 900 RUNE + 0.15 BTC.

Part 3: Let’s Do Some Maths!

Continuing the example above, let’s assume after some time:

- Prices are now $12 RUNE and $48k BTC

- Thus, HODL Value is 900 RUNE @ $12 + 0.15 BTC @ $48k = $18000

- IL is 2.02% = $363.67. This is calculated based on average deposit prices as per the IL equation here.

- Let’s assume a positive LUVI change of $423.67

- Therefore, your redeemable value is $18000 — $363.67 + $423.67 = $18060. At current prices, this is 752.5 RUNE + 0.188 BTC (rebalanced for 50:50 value).

Part 4: Partial Withdrawals

Let’s say, instead of doing a full withdrawal, you chose to withdraw 50%. This means the withdrawal value would be $9030, or 376.25 RUNE + 0.094 BTC.

- Your remaining HODL Value is also halved: 450 RUNE + 0.075 BTC

Feel free to hop into the TC University Discord to chat about this, or any other THORChain questions that you may have.

Explore THORChain: Website, X, Telegram, Developer Discord.

Explore Maya Protocol, the first friendly fork of THORChain: Website, X, Discord, Telegram.

Decentralized, permissionless, non-custodial, trust-minimized, open-sourced, economic-secured, non-wrapped, native-to-native cross-chain swaps, savings and soon, lending!

--

--

THORChain University
THORChain University

Written by THORChain University

THORChain University aims to educate communtiy users on how to optimally engage with the @THORChain Network

No responses yet