Tulip Protocol
Published in

Tulip Protocol

SolFarmer’s Education — Impermanent Loss

Hello and welcome to our second SolFarmer’s Education. In this edition, we will be going over the infamous “impermanent loss”.

Automated market maker (or AMMs) are a concept that is popularized by Uniswap, allowing users to provide liquidity in a fixed ratio that enabled permissionless trading of any tokens.

Despite its name, impermanent loss (IL) usually means the performance difference between simply holding versus providing liquidity with that asset. Impermanent meaning the loss is only realized when you withdraw liquidity, and that your provided assets could return to previous prices. The effects of IL are notable in a standard liquidity pool (unlike stableswaps) where the liquidity provider (LP) has to provide both assets at a correct ratio and one asset is more volatile.

The easiest way to comprehend IL is to observe an example. For our example, we will use SOL-USDC. Assuming we’re the sole LP provider, we deposit $10,000 worth of assets into a SOL-USDC pool. Since this is a standard liquidity pool, it means $5,000 in SOL and $5,000 in USDC was provided at a 50/50 ratio. If a user buys SOL on the AMM and pushes price up 5% and the assets in the pool ratio is rearranged. His LP is now worth ~$10,246.95, with SOL and USDC worth ~$5,123.47 each with a net PnL of $246.95 (2.4695%). Another user held his $5000 in SOL and $5,000 in USDC which would now be worth an aggregate of $10,250 with an outperformance of $3.05 (+0.0297%) versus the LP. This is what is known as impermanent loss. You can use an impermanent loss calculator to simulate these changes. You can also use any coin as the price doesn’t matter in the simulation, only the % change is relevant. If you wish to read further on this topic, check out the link below.

Source: https://pintail.medium.com/uniswap-a-good-deal-for-liquidity-providers-104c0b6816f2

Given the previous example, why would anyone provide liquidity? Well, when a trade is made on an AMM there are incurred trading fees which goes to the liquidity providers. This gives the potential for the pool participants to offset IL or even profit as long as collected fees > IL. AMMs like Raydium or Orca also offer incentives for users to form a LP position; such as Fusion Pools or Aquafarm. These APRs can vary depending on price and emissions, but when the number is large enough degen farmers can be enticed and potentially end up rekt by IL. But how does this happen, and what should you do if this was you?

In the past there was a Raydium Fusion Pool that attracted a lot of interest as it was providing 4 digit APR, which translated to an extremely attractive APY. Users could gain multiple % of their investment in rewards, but it required them to purchase the token at market price. This caused the price to keep getting pushed up, simultaneously increasing APR (remember, APR is a function of price * emission rate over TVL), resulting a short term positive feedback loop where there were more buyers looking to enter than farmers selling rewards. When demand finally subsided with an elevated price, sell pressure would remain the same/increase as the high emission rate is still on going with early farmers also looking to take profit on their positions. This created a negative feedback loop, as late farmers are looking to cut losses while early farmers are taking profits with emissions still ongoing, and simultaneously decreasing APR while painting an unfavourable chart for potential new entrants. This resulted in some farmers losing money on their initial buy, and also on their stablecoin side of the LP as they are now holding way more of a token that is worth less.

Late farmers holding the bag

General Guidelines

Now that we have gone over the scary parts, how does a humble farmer take advantage of these scenarios?

For a high APR farm, you would generally look at how long the farm has been around, how long current rate of emissions will last, whether volume has been decreasing, and what the FDV is. The earlier you are, the higher margin of safety you have; whether it is in farmed rewards or appreciation of the LP assets. Emissions rates being reduced can cause early farmers to sell off as they continue to chase higher yields or less buyers due to decreased APR.

For general LPing, your time horizon matters the most. If you expect high short term grow, then you may reconsider LPing. Some users use LPs to scale out of a position as they prefer to scale out after x price rather than trying to time the market with a swap. Others may choose to LP to scale in. Some may be price agnostic and LP for fees + farming incentives long term.

Again, these are general guidelines and not specific rules. The only limit in the DeFi space is your creativity!

Happy farming SolFarmers and I will see you in the next edition!

__

About SolFarm

🌐Website

🐦Twitter

💬Discord

📧contact@solfarm.io