Free lesson · DeFi models
LP value versus holding the original tokens
Open interactive lessonPractice calculationsExplore labs
Start with the idea
A liquidity provider can make money in dollars while underperforming a passive holding of the initial tokens. The benchmark must be named.
Symbols, units & horizon
- r: final base price divided by initial base price, positive and dimensionless
- IL: relative value difference versus holding original tokens
- no-fee, full-range constant-product pool
- one terminal comparison
When and why to use this
Compare LP terminal value with a transparent buy-and-hold benchmark before adding fee income.
A liquidity provider can make money in dollars while underperforming a passive holding of the initial tokens. The benchmark must be named.
Start with equal-value base and quote reserves in a no-fee constant-product pool. After a price ratio change r, pool value grows with the square root of r while the original holdings have one asset growing with r.
The commonly called impermanent-loss ratio compares these two terminal values. It excludes fees and is not loss-versus-rebalancing, which uses a dynamically rebalanced benchmark. The underperformance can become realized when the position closes.
LP value versus holding the original tokens
- Normalize initial reserve values to one quote unit on each side.
- After price ratio r, passive holdings are worth 1+r while aligned pool value is 2√r.
- Divide pool by hold value and subtract one.
If base price doubles, r=2. Pool/hold=2sqrt(2)/3≈.942809. Relative underperformance is −.057191, or −5.7191%, before fees.
Apply it in a strategy
- Compare LP terminal value with a transparent buy-and-hold benchmark before adding fee income.
- Record the input timestamp, executable quantity, currency and horizon. Reconcile the result with a cash-flow or state table.
- Stress this failure condition: This no-fee full-range ratio cannot be applied unchanged to concentrated liquidity, rebalancing or path-dependent fee income.
Research deliverable
Build and explain a lp value versus holding the original tokens worksheet. Compare LP terminal value with a transparent buy-and-hold benchmark before adding fee income.
Evidence boundary: Synthetic arithmetic and scenarios illustrate mechanics. They are not historical returns, a paper replication, or evidence of an executable edge. Research sources and their access limitations are recorded at the end of this module.
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
# Python 3.10+; standard library unless NumPy is imported below.
# Inputs and outputs use the units defined in this lesson. Synthetic teaching example.
from math import sqrt
def holding_difference(price_ratio):
if price_ratio<=0: raise ValueError("Positive price ratio required")
return 2*sqrt(price_ratio)/(1+price_ratio)-1
print(holding_difference(2))Continue learning
DeFi: AMMs, Liquidity Provision and Lending — all lessons- Constant-product swaps with an input fee
- LP inventory after price changes
- LP value versus holding the original tokens
- Concentrated liquidity and range boundaries
- LVR and the price of stale inventory
- Lending utilization and rate response
- Collateral health factor and correlated shocks
- Liquidation incentives after execution costs
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations