Let’s assume a liquidity pool contains two assets: Bitcoin (BTC) and Ethereum (ETH). In a traditional 50/50 ratio pool, like those on Uniswap, liquidity providers (LPs) deposit equal amounts of BTC and ETH to the pool and receive LP Token(s) in return.
As buyers and sellers interact with the pool, the managing algorithm adjusts the prices of each asset based on user activity. For example:
- a user buys BTC from the BTC/ETH liquidity pool
- this causes the pool to have fewer BTC due to buying pressure
- this causes the pool to have more ETH due to selling pressure
Based on the standard formula, x * y = k, the liquidity pool will increase the price of BTC relative to ETH, so that the pool’s BTC balance/price will regain equality with the pool’s ETH balance/price.
When a user returns their LP Tokens, they receive their proportionate shares of the liquidity pool assets in equal value. As the ratios within the pool may have changed due to trading activity, the proportion of assets may look different at the withdrawal than at the time of deposit.
Let’s adjust our example to a hypothetical Ethereum (ETH) and USDCoin (USDC) liquidity pool. The liquidity pool requires the traditional 50/50 ratio of supplied assets. As we know, liquidity providers will offer an equal amount of the assets when depositing, and they’ll remove an equal amount upon withdrawal.
A note for beginners: USDC is a dollar-pegged stablecoin, so 1 USDC is (generally speaking) typically worth $1 USD. For the purposes of this example, we’ll assume it’s an even $1.00.
Let’s assume that, at the time of deposit, 1 ETH costs $1,000, so it’s equal to 1,000 USDC. In this case, we (the liquidity provider) would deposit 1 ETH and 1,000 USDC into the pool and receive LP Tokens worth $2,000 in return.
- $1,000 of Ethereum + $1,000 of USDC = $2,000
In this example, let’s assume there’s a total of 10 ETH ($10,000) and 10,000 USDC ($10,000), for a total of $20,000. Our LP Token would reflect our 10% ($2,000 out of $20,000) ownership of the liquidity pool.
Now let’s see how activity by other investors and traders in the pool may impact the value of the assets for our liquidity provider.
Let’s assume the price of ETH goes much higher in price throughout the market; on Coinbase or Binance, for example. So 1 ETH is now worth $4,000.
This presents an opportunity for arbitrage traders (arbitrageurs) who would look to capitalize on the price difference between ETH on exchanges and ETH in this liquidity pool. In this example, an arbitrageur would buy ETH from our liquidity pool and sell it on exchanges to make a profit.
This would cause our liquidity pool to see buying pressure for ETH, and selling pressure for USDC. Because of this, the ratio of ETH and USDC in the pool is now changed. Remember, Automated Market Makers (AMMs) are not order books. The price of assets in the liquidity pool is determined by their price ratio.
For the sake of simplicity, let’s assume there are now 5 ETH (vs. 10) and 20,000 USDC (vs 10,000) in the pool, or:
- $20,000 of Ethereum (5 x $4,000)
- $20,000 USDC (20,000 x $1)
Let’s assume we, the liquidity provider, want to withdraw our funds from the pool. Recall that our LP Tokens represent our 10% ownership in the pool, so we are able to withdrawal:
- 5 ETH / 10% = 0.5 ETH
- 20,000 USDC / 10% = 2,000 USDC
Reminder, our original asset ownership was:
- 1 ETH ($1,000) and $1,000 USDC = $2,000
After withdrawal from the liquidity pool, we now own:
- 0.5 ETH x $4,000 = $2,000
- 2,000 USDC x $1 = $2,000
Our assets are now worth $4,000 instead of $2,000. We see that we’ve profited $2,000. Not bad!
Let’s Calculate Our Impermanent Loss
Recall that the price of 1 ETH is now $4,000. Since USDC is a stablecoin, its value is still $1 per USDC. Had we simply held our original investment, instead of depositing to the liquidity pool, we would have:
- 1 ETH x $4000 = $4,000
- 1,000 USDC x $1 = $1,000
Had we simply held our original assets, we would have a value of $5,000 instead of $4,000.
We can see that holding our original investment as single assets in our wallet would have been the most profitable option. This difference of $1,000 is the impermanent loss, made permanent if/when we withdrawal our funds from the liquidity pool.
Please keep in mind that, in this simple example, we have not considered the trading fees the LP Token would have earned the investor. Popular protocols, like Uniswap, charge 0.03% on every trade executed in a liquidity pool. Many others follow this rate, but newer projects may charge lower fees to attract users to the platform.
Popular platforms with high trading volume can see very high trading fees. This can be profitable to liquidity providers.
We have also not considered additional steps the investor could take to earn other assets with their LP Tokens, like Liquidity Mining or Yield Farming.