Liquidity Provider Fundamentals: LP Share Valuation (Part 2)

You are currently viewing Liquidity Provider Fundamentals: LP Share Valuation (Part 2)

From Pool Valuation to Individual LP Shares

In our previous discussion, we established how to value an entire liquidity pool. Now we turn to a more practical question: How do we determine the value of an individual liquidity provider’s share?

The fundamental formula for any LP provider Alice is:

\displaystyle \text{Share}(LP)_{\text{Alice}} = \frac{LP_{\text{Alice}}}{\text{Total}(LP)}

Where:

\displaystyle \text{Total}(LP) = \sum LP_i

\displaystyle LP_{\text{Alice}} = \text{Alice's LP token balance}

There are two fundamental scenarios for LP valuation.

Scenario 1: Initial Liquidity Provision

When Alice creates a new trading pair with:

  • \displaystyle x_{\text{init}} of Token X
  • \displaystyle y_{\text{init}} of Token Y

Alice receives:

\displaystyle LP_{init} = \sqrt{x_{init} \times y_{init}}

A very important clarification is that initial quantities of Token X and Token Y will be taken with all decimal places (e.g. DAI token has 18 decimals, eGHST token will have 9 decimals, etc.).

The LP share (initial LP share in this case) is:

\displaystyle \text{Share}(LP)_{\text{init}} = \frac{LP_{\text{init}}}{\text{Total}(LP)}

As the first provider, Alice owns 100% of LP tokens initially. After substitution:

\displaystyle \text{Share}(LP)_{\text{init}} = \frac{\text{Total}(LP)}{\text{Total}(LP)} = 1

To put the value of the initial LP tokens:

\displaystyle \text{Value}(LP)_{\text{init}} = \text{Value}(LP)_{\text{total}} \times \text{Share}(LP)_{\text{init}} = \text{Value}(LP)_{\text{total}} \times 1 = \text{Value}(LP)_{\text{total}}

Where the value of the entire supply of LPs in terms of Token X:

\displaystyle \text{Value}(LP)_{\text{total}} = 2 \times x_{\text{init}}

To finalize:

\displaystyle \text{Value}(LP)_{\text{init}} = \text{Value}(LP)_{\text{total}} = 2 \times x_{\text{init}}

Practical Example

Consider a Pool with the following initial liquidity:

  • QD(DAI)init = 10,000 DAI
  • QD(eGHST)init = 10,000 eGHST

DAI token has 18 decimals (e.g. 1018) and eGHST token has 9 decimals (e.g. 109), while LP token has 18 decimals (e.g. 1018).

Thus, the initial supply of LP tokens is:

\displaystyle LP_{init} = \sqrt{QD(DAI)_{init} \times QD(eGHST)_{init}} = \frac{\sqrt{10^4{\times}10^{18}{\times}10^4{\times}10^9}}{10^{18}} =

\displaystyle \frac{\sqrt{10^{35}}}{10^{18}} = 0.3162278~\text{LP tokens}

The value of the initial supply of LP tokens measured in DAI is:

\displaystyle \text{Value}(LP)_{\text{init}} = 2 \times QD(\text{DAI})_{\text{init}} = 2 \times 10,\!000 = 20,\!000\ \text{DAI}

Scenario 2. Adding Post-Initial Liquidity.

What happens when a new liquidity provider (Bob) wants to join an existing Token X – Token Y liquidity pool after initial liquidity has been deposited?

Assume the pool already has reserves x₁ (Token X) and y₁ (Token Y) due to prior trading activity. Bob must contribute tokens in a ratio that maintains the pool’s current price to avoid disrupting the equilibrium.

Step 1: Determining the Contribution Ratio

Bob must contribute Token X and Token Y in the same ratio as the existing reserves.

Given:

  • Current reserves: x₁ (Token X), y₁ (Token Y)
  • Bob wants to contribute x₂ of Token X.

The required amount of Token Y (y₂) is calculated as:

\displaystyle \frac{y_2}{x_2} = \frac{y_1}{x_1} \implies y_2 = x_2 \times \frac{y_1}{x_1}

Key Insight:

  • The price remains unchanged after adding liquidity because Bob contributes proportionally.

Step 2: Verifying Price Stability

Before Bob’s contribution:

\displaystyle P(Y)_1 = \frac{x_1}{y_1}

After Bob’s contribution:

\displaystyle P(Y)_2 = \frac{x_1 + x_2}{y_1 + y_2}

Substituting y2 from Step 1:

\displaystyle P(Y)_2 = \frac{x_1 + x_2}{y_1 + x_2 \times \frac{y_1}{x_1}} = \frac{x_1 + x_2}{y_1 \times \frac{x_1}{x_1} + x_2 \times \frac{y_1}{x_1}} =

\displaystyle \frac{x_1 + x_2}{\frac{y_1}{x_1} \times (x_1 + x_2)} = \frac{1}{\frac{y_1}{x_1}} = \frac{x_1}{y_1} = P(Y)_1

Conclusion:

  • The price does not change because liquidity is added in the correct ratio.

Step 3: LP Token Allocation

Bob receives LP tokens based on his share of the total liquidity.

The formula for LP tokens issued to Bob (LP₂) is:

\displaystyle LP_2 = \min\left(\frac{x_2}{x_1} \times Total(LP)_1, \frac{y_2}{y_1} \times Total(LP)_1\right)

Since:

\displaystyle \frac{y_2}{x_2} = \frac{y_1}{x_1} \rightarrow \frac{x_2}{x_1} = \frac{y_2}{y_1}

Therefore:

\displaystyle LP_2 = \frac{x_2}{x_1} \times Total(LP)_1 = \frac{y_2}{y_1} \times Total(LP)_1

Both terms are equal, and the min function is used to prevent rounding errors.

Bob’s LP share at time T:

\displaystyle Share(LP)_2 = \frac{LP_2}{Total(LP)_{Time\, T}}

Step 4: Value of Bob’s LP Tokens

The total value of all LP tokens (in terms of Token X) at time T is:

\displaystyle Value(LP)_{total,Time\, T} = 2 \times x_{Time\, T}

Thus, the value of Bob’s LP tokens is:

\displaystyle Value(LP)_2 = Value(LP)_{total,Time\, T} \times Share(LP)_2

After substituting both inputs:

\displaystyle Value(LP)_2 = 2 \times x_{Time\, T} \times \frac{LP_2}{Total(LP)_{Time\, T}}

Practical Example

Current Pool Reserves:

  • QD(DAI) = 100,000 DAI
  • QD(eGHST) = 10,000 eGHST
  • Total(LP) = 0.3162278 LP

Bob’s Contribution to LP:

  • Q(DAI)Bob = 5,000 DAI
  • Required eGHST to the LP:

\displaystyle Q(eGHST)_{Bob} = Q(DAI)_{Bob} \times \frac{QD(eGHST)}{QD(DAI)} = 5,\!000 \times \frac{10,\!000}{100,\!000} = 500\ eGHST

LP Tokens Received by Bob:

\displaystyle LP_{Bob} = \frac{Q(DAI)_{Bob}}{QD(DAI)} \times Total(LP) = \frac{5,\!000}{100,\!000} \times 0.3162278 = 0.0158114\ LP

Updated Pool State:

  • \displaystyle QD(DAI)_{new} = 100,\!000 + 5,\!000 = 105,\!000\ DAI
  • \displaystyle QD(eGHST)_{new} = 10,\!000 + 500 = 10,\!500\ eGHST
  • \displaystyle Total(LP)_{new} = 0.3162278 + 0.0158114 = 0.3320392\ LP

Value of Bob’s LP Tokens (in DAI):

\displaystyle Value(LP)_{Bob} = 2 \times x_{Time\, T} \times \frac{LP_{Bob}}{Total(LP)_{Time\, T}} = 2 \times 105,\!000 \times \frac{0.0158114}{0.3320392} = 10,\!000\ DAI

Interpretation:

Bob’s LP tokens are worth 10,000 DAI, matching his combined contribution (5,000 DAI + 500 eGHST at the pool’s exchange rate).

The total supply of LP tokens remains constant, but their value fluctuates in response to price movements within the eGHST-DAI trading pair.