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:
Where:
There are two fundamental scenarios for LP valuation.
Scenario 1: Initial Liquidity Provision
When Alice creates a new trading pair with:
of Token X
of Token Y
Alice receives:
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:
As the first provider, Alice owns 100% of LP tokens initially. After substitution:
To put the value of the initial LP tokens:
Where the value of the entire supply of LPs in terms of Token X:
To finalize:
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:
The value of the initial supply of LP tokens measured in DAI is:
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:
Key Insight:
- The price remains unchanged after adding liquidity because Bob contributes proportionally.
Step 2: Verifying Price Stability
Before Bob’s contribution:
After Bob’s contribution:
Substituting y2 from Step 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:
Since:
Therefore:
Both terms are equal, and the min function is used to prevent rounding errors.
Bob’s LP share at 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:
Thus, the value of Bob’s LP tokens is:
After substituting both inputs:
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:
LP Tokens Received by Bob:
Updated Pool State:
Value of Bob’s LP Tokens (in 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.