Uniswap LP Growth : A Deep Dive
A buy and hold portfolio has a linear relationship with its value since the value of the portfolio increases or decreases
with price linearly. The liquidity provider has a near linear relationship with price moves around the initial price only. When the price
drops to zero the portfolio value drops sharply to zero, since the liquidity provider is buying more and more of the asset losing its
value until the price is exactly zero and all of the other liquidity asset has dropped to zero. When the price increases the liquidity
provider loses more and more of the upside gains since he is selling more and more of the appreciating asset as the price increases.
This is the reason why the liquidity provider is losing money in both directions. He is buying the asset that is dropping in value and
selling the asset that is rising in value. Ideally the liquidity provider wants the asset prices to hover around his initial price, so one can
therefore think of the liquidity provider being ‘short volatility’ and ‘short convexity’. His position looks similar but is not identical to
someone being short a call and put option (a straddle). The risk profile here is nonlinear.
Figure 5: Risk Profile of a Uniswap v2 liquidity provider and a Buy'n'Hold
The impermanent loss of Uniswap v3 can be calculated similarly to v2, first one needs to solve Eq. (5) and Eq. (6) for x and y,
similarly to Eq. (1),Eq. (2) and Eq. (4), which amounts to finding the roots of a quadratic equation in x and y.
�` + √� a�
1
=�789:
+ =�345b ∙ � + �� ∙ a
=�345
=�789:
− 1b = 0
and
�` + √�a 1
=�789:
+ =�345
� b ∙ � +
�
� ∙ a
=�345
=�789:
− 1b = 0
Which can be solved using the ordinary p-q formula. Substituting this in the formula for the difference in the market to market move
of a 2-asset market making portfolio compared to a fixed quantity portfolio yields the impermanent loss of a Uniswap v3 liquidity
provider. We note from these quadratic equations that when �345 is zero and �789: is infinite we return the same equations as given
Eq. (4) in.
UNISWAP: Impermanent Loss and Risk Profile of a Liquidity Provider
Aigner, Andreas A. 7
Figure 6: Impermanent Loss of various Uniswap v3 liquidity positions and a Uniswap v2 liquidity position
Examples for various price ranges are shown in Figure 6 and compared to the impermanent loss of a Uniswap v2 liquidity provider. It
is obvious that when the fixed range of the liquidity provider approaches the semi-infinite domain of the v2 liquidity provider the
impermanent loss functions become similar. For smaller ranges the impermanent loss gets more symmetric and decreases around the
initial value having steeper losses than an ordinary Uniswap v2 position with a semi-infinite domain will have.
For example, when the price moves by 20% the impermanent loss of a v2 liquidity position will be −0.56% and −0.46% while a
fixed range of 25% and 125% of initial will have an impermanent loss of −4.75% and −3.8%. Some more examples are collected in
Table 1.
Table 1: Impermanent Loss of various Liquidity Positions
%Move/Range -20% Initial 20%
[0%, inf) -0.56% 0 -0.46%
[0%, 200%] -0.86% 0 -0.70%
[25%, 175%] -1.5% 0 -1.22%
[50%, 150%] -2.34% 0 -1.91%
[75%, 125%] -4.75% 0 -3.8%
Consider a fixed range of 80% and 120%, the risk profile of such a liquidity position will look like Figure 7. Since the liquidity
outside of this range is composed entirely of one or the other asset the value of the portfolio will decline linearly below the lower
bound, since the pool consists of 100% of the declining asset, and remain constant above the upper bound, since the pool consists of
100% of the asset that is not appreciating. Compare this to a buy and hold portfolio of the same initial asset distribution, which
increases/decreases linearly with price. Note that when the price drops to zero for one asset your buy and hold portfolio will still be
worth 50% whereas the market making portfolio will be have lost 100% of its value since it was long 100% of the declining asset
already since it breached the lower bound.
UNISWAP: Impermanent Loss and Risk Profile of a Liquidity Provider
Aigner, Andreas A. 8
Figure 7: Risk Profile of an 80%-120% liquidity position.
Figure 8: Impermanent loss of an 80%-120% liquidity position.
Figure 8 shows the corresponding impermanent loss of a [80%, 120%] range liquidity provider. We note here that a liquidity provider
portfolio risk profile is always at a disadvantage to a buy and hold portfolio. Some websites interactive calculators erroneously show a
risk profile that indicate that you will lose less than a buy and hold portfolio. This is not the case. In essence as exhibited by the PNL
profile, Figure 7 and Figure 8, it is similar to being synthetically short variance (short Gamma) on the underlying, earning Theta
(yield). Extreme spot price moves will manifest this short gamma; in further papers we will discuss periodic delta hedging strategies
and short dated puts to ameliorate and subdue the risk characteristics endemic in the form of liquidity positions discussed in this paper.
IV. CONCLUSION
Current investors can purchase crypto using centralized exchanges (CEX), which are companies in the conventional sense that provide
a platform or app to deposit fiat currencies into or offer the option to purchase using credit cards. They provide an on-ramp facility for
investors to exchange fiat currencies into crypto. Many of these platforms offer interest rates on crypto (and fiat) deposits and further
investment products such as locked staking.
In contrast to centralized exchanges there are decentralized exchanges (DEX) which have no central entity managing the deposits.
Instead the interactions between participants are handled by smart contracts on the Ethereum chain. Assets get exchanged using a
smart contract using a deterministic market making function that has a set price for every amount of token that gets offered or bid.
This function of liquidity represents a distribution of bid offers similar to order book type markets provided by centralized exchanges.
Instead of having a dynamic order book with market depth the depth of bid-offers is fixed, as long as the amount of liquidity
UNISWAP: Impermanent Loss and Risk Profile of a Liquidity Provider
Aigner, Andreas A. 9
underlying doesn’t change. The liquidity in such a liquidity pool is not provided by a centralized entity, as would be the case on a
CEX, but instead by other individual market participants who get compensated by trade commissions in return for the risk they take
on. The risk that a liquidity provider takes on is essentially of two kinds. When setting up a position initially an amount of each asset
is provided and usually in a ratio of about 50% each. A liquidity provider therefore has, without any other interaction, a linear risk of
the price of one of the assets changing versus the other asset. This is normally called Delta risk, since Delta in the option market is the
rate of change of one asset with the change in the other asset. Usually the other asset in such case is the base currency such as the US
Dollar. When you have a liquidity position you can have two assets which are both different to your US Dollar, so in practice you
have Delta risk on both currencies already.
The second risk that a Liquidity Provider has is the change in his position due to other market participants interacting with his liquidity
pool. Every time part of his position gets bought or sold, the price of the asset changes. And at either one of the extreme ends of the
prices, albeit 0 and infinity or a fixed range (�345 and �789:) he will have swapped one of the assets into the other assets completely.
The difference between the value of the portfolio of two assets with and without these transactions is called impermanent loss. It can
also be called unrealized loss in this situation, because if the price of the asset reverses to the initial price a liquidity provider would
end up with exactly the same position as what he set out with, having zero loss, but would have earned commissions along the whole
price swing. The Delta risk above is also an unrealized loss, since the Liquidity provider ends up with zero loss or gain when the price
drops back to the same initial price.
To summarize both the Delta as well as the impermanent loss are unrealized as long as the liquidity provider does not withdraw his
liquidity from the pool. At the point where the liquidity provider withdraws his funds from the pool, is when his loss or gain due to the
impermanent loss gets realized. His loss or gain due to the Delta risk is only realized once he sells out of his position or swaps one of
the assets for the other.
Here we have described the underlying mechanics of a market making function in Section II, and have derived the impermanent loss
function for Uniswap v2 and v3, in Section III. We have provided an improved impermanent loss formula for the commonly quoted
Equation for v2 and online calculators for v3. We have charted the risk profile of positions in v2 and v3 and compared various
different ranges of liquidity, showing that v2 is approached in the limit of the range going to infinity.
Uniswap is one of the most liquid decentralized exchanges. There are other exchanges that offer similar market making products that
will work according to different market making functions. There is still ongoing research into these which can be found in our
references below.
What other risks exist for a liquidity provider? One of the key properties of a liquidity provider is that he is willing to own all of either
one of the assets at either his lower price limit or zero (in the case of v2). This means that when one of the assets has huge price
swings or is compromised, as for example in the recent case of Mark Cuban (ironfinance, Titan-DAI). The liquidity provider would
have sold all of his reliable assets to purchase the compromised asset. A liquidity provider cannot be certain that he will own any or
part of either asset at the time of redemption. If a liquidity provider is happy to own either one of the assets at its low and sell out of it
at a higher level, he will get compensated for this through the commissions he will earn when participants are trading on his liquidity
pool.
Since market making functions are using individual liquidity curves there are also various arbitrage opportunities. Some with external
order book type exchanges as well as internally between a trio of currency pairs that end up quoting different cross exchange rates for
the exchange rate in the first pair [72]. Provided the arbitrage opportunity is greater than the transaction costs required it will be
utilized. The work involved in taking advantage of these opportunities is extensive, especially if its across different exchanges. There
is however the advantage of using atomic transactions, meaning one smart contract transaction that will exercise a round trip in the
arbitrage. Building such arbitrage tools as a regular person will be too difficult, but suffice to say it is most certainly done already to
some extent. In fact decentralized exchanges such as Uniswap can represent a ‘fair’ price of assets since it will have been arbed
already, these are called price oracles and Uniswap is regarded as such as well [44] .
As of time of writing the biggest liquidity pool on Uniswap (ETH-USDC) is earning an average of 1.5% weekly [90, 100, 101], which
amounts to 78% annually at the current trading volumes. A liquidity provider who provides an equal amount of liquidity mapped
along the price curve can expect to earn the same or similar return.
There are other risks involved with crypto with have to do with smart contract risk, fraudulent DEXs, regulatory clampdowns, ISP
provider censorship and other exterior risks [102-106]. There are discussed widely in the literature here and here. Useful websites for
monitoring the Defi space and security issues are vfat.tools, RugDoctor and rekt.news.
APPENDIX I: DERIVATION OF THE IMPERMANENT LOSS FUNCTION V2
We start off with the change in the Value of a portfolio of a liquidity provider versus the change of portfolio of a fixed-asset portfolio.
UNISWAP: Impermanent Loss and Risk Profile of a Liquidity Provider
Aigner, Andreas A. 10
�G − �N − L�e8Efg − �NM
Notice how we can cancel the �N term and write
�< + �G ∙ �< − (� + �G ∙ �)
Substituting Equations 1,2 in Equation x gives
=� ∙ �G + �G ∙ h�
�G
− i=� ∙ �N + �G ∙ h�
�N
j
When you expand this you get
√� ∙ L=�G − =�NM + √��G ∙ ih 1
�G
− h 1
�N
j
The initial value of the portfolio is
�N = � + �N ∙ � = =� ∙ �N + �N ∙ h�
�N
= 2=� ∙ �N
Dividing this by �N we get
√� ∙ L=�G − =�NM
2=� ∙ �N
+
√��G
2=� ∙ �N
∙ ih 1
�G
− h 1
�N
j
Cancelling out the terms gives
L=�G − =�NM
2=�N
+
�G
2=�N
∙ a
=�N − =�G
=�N ∙ =�G
b = 1
2ih�G
�N
− 1j +
1
2 h
�G
�N
∙ i1 − h
�G
�N
j
When we introduce the ratio of prices
� = �G
�N
This can simply be written as
� = 1
2 L√� − 1M +
1
2√�L1 − √�M
Which becomes
� = √� − 1
2 ∙ (� + 1)
Comparing this to the commonly quoted impermanent loss function, where the change in value as relative to the final portfolio value
is calculated instead of the initial value, you would divide by �e8Efg instead of �N and get [97, 107-109]
UNISWAP: Impermanent Loss and Risk Profile of a Liquidity Provider
Aigner, Andreas A. 11
� = 2√�
1 + � − 1
APPENDIX II: HOW TO BE A LIQUIDITY PROVIDER
We want to explain the steps involved and the fees involved in initiating a liquidity position. We choose the most liquid and biggest
liquidity pool on Uniswap which is ETH vs USDC. USDC is a stablecoin which is backed by US Dollar 1-1. The company which
issues these stablecoins is backed by investors such as Coinbase.
1. First, we transfer by wire transfer or SEPA say 2000 USD to a centralized exchange for free.
2. Then we buy 1000$ worth of ETH and incur a fee of say 0.00061814 ETH ($1.19 with ETHUSD = 1930$).
3. We transfer this ETH to a wallet accepted by Uniswap and incur a fee of 6.98$ (0.0036ETH). We use Metamask.
4. We purchase 1000$ worth of USDC for a fee of about $1.19.
5. We also transfer this amount of USDC to the accepted wallet and incur a fee of 8$
6. Connecting your wallet to Uniswap we find the most liquid pool using the charts. One of the options is to provide liquidity.
Since all the liquidity pools have to use a wrapped ETH (WETH9) to provide liquidity we have to convert the ETH we have
in our wallet to WETH9. We do this using Uniswap which incurs a 1.17$ fee.
7. Now we can start with setting up the liquidity position. We choose to allocate all of the wrapped ETH (WETH9) and it will
return us the required USDC we need to allocate. If the balance of ETH versus USDC is not exactly 50:50 then you will need
to transfer for USDC from as described above. Alternatively start off with buying more of the assets or reducing the amount
of ETH to deposit.
8. In our example we end up having a balance of 58% versus 42% roughly.
9. Then one confirms the wrapped ETH and USDC position which costs 1.41$ and 1.87$ in fees.
10. After waiting for these two transactions to go through you can confirm the liquidity position as a whole, which costs 13.26$
to mint.
11. After paying this last fee after a couple of minutes have passed one will see the position listed under ‘your positions’ and can
UNISWAP: Impermanent Loss and Risk Profile of a Liquidity Provider
Aigner, Andreas A. 12
12. View the Ethereum Address of this position on the Ethereum chain using Etherscan. One can also view the running fees
collected for the liquidity pool. Which in this case is already around 0.54$ in fees after about 1-2hrs online.
In the whole process we have spent 35,07 USD or in this example 1.25% of the total value of the portfolio, which is less than the
theoretical return in commissions in one week (1.5%).