What is impermanent loss?

Automated market making

Incognito DEX is powered by an Automated Market-Making ( AMM ) algorithm.

image

AMMs allow users to swap crypto assets, for example DAI for PRV, without requiring a centralized counterparty. This is unlike traditional exchanges such as Coinbase, Kraken, or Binance, which act as intermediaries between token buyers and sellers.

While these companies are centralized, and subject to regulations, censorship and identity control, AMMs are simply smart-contract systems operating unstoppably on top of distributed ledgers such as Incognito & Ethereum.

One of the most important qualities of AMMs is that they require some users to act as the liquidity providers in the service. Liquidity providers commit their own asset pairs to so-called “liquidity pools”.

When using Incognito DEX and swapping PRV for DAI for example, you are trading your assets against one of these liquidity pools.

Fee structure in liquidity pools

Typical AMMs like Uniswap charge a certain transaction fee to the users of the service. These are added to the liquidity pool, and distributed among users who committed funds to it, proportional to their contribution.

In the case of Incognito DEX, the trading fee is 0.0%. The main reward for the liquidity providers comes from a rewards program.
[EDIT: this program has been discontinued in favor of the Provide feature]

Impermanent loss

When contributing both sides of a pair, users who provide liquidity to AMMs can see their locked tokens change value compared to simply holding the tokens on their own. Most people don’t really understand how and why impermanent loss occurs.

What is impermanent loss?

Impermanent loss is the main difference between holding tokens in an AMM and holding them in your wallet. It occurs when the price of tokens inside an AMM diverge in any direction. The more divergence, the greater the impermanent loss.

Why “impermanent”?

Because as long as the relative prices of tokens in the AMM return to their original state when you entered the AMM, the loss disappears and you earn 100% of the trading fees + 100% of subsidized rewards.

How does it occur?

To understand how impermanent loss occurs, we first need to understand how AMM pricing works and the role arbitrageurs play.

In their raw form, AMMs are disconnected from external markets. If token prices change on external markets, an AMM doesn’t automatically adjust its prices. It requires an arbitrageur to come along and buy the underpriced asset or sell the overpriced asset until prices offered by the AMM match external markets.

During this process, the profit extracted by arbitrageurs is effectively removed from the pockets of liquidity providers, resulting in impermanent loss.

For example, consider an AMM with two assets, PRV and DAI, set at a 50/50 ratio. As shown below, a change in the price of PRV opens an opportunity for arbitrageurs to profit at the expense of liquidity providers.

  1. The DAI/PRV AMM is balanced, with equal values on both sides

image

  1. The price of PRV increases by 10%, creating an arbitrage opportunity.
    image

  2. Arbitrageurs are incentivized to balance AMM by selling DAI for PRV, until both sides of the AMM are equal.
    image

  3. As a result, liquidity providers suffer a - $2.4 loss compare to holding PRV & DAI

What’s the motivation to become a liquidity provider?

During April and May, we experimented with the first Incognito DEX rewards program which paid interest to cover any potential loss, but also required users to contribute both sides of the pair. This proved to be confusing and unwieldy.

So in June, we improved on the original program by implementing a new app feature named Provide. Provide allows users to contribute single currencies, and is designed to ensure that the original provision never changes, that earnings are steady and transparent, and that providers are protected from impermanent loss.

Check out Provide >

Please note that the Add feature (two-sided liquidity) is no longer interest-earning, and will be revised later this year with a new incentives feature.

Further reading


Resources:

  1. https://blog.bancor.network/beginners-guide-to-getting-rekt-by-impermanent-loss-7c9510cb2f22
  2. https://tokentuesdays.substack.com/p/eliminating-impermanent-loss
  3. https://alfablok.substack.com/p/coming-soon
31 Likes

@andrey I think in 2. ETH is supposed to be PRV?

8 Likes

Fixed! Thanks.

7 Likes

Have to say I struggle with this concept. I tried with a low liquidity pair, PRV RSR, and ratio change after each trade was huge, leaving me with significant losses, in terms of percentage. I guess it makes more sense with high liquidity pairs, otherwise it’s too risky, almost like gambling.

7 Likes

So it was a bit complicated for me to understand at first. But after messing around with it, I think I have a fundamental understanding of the system.

When you provide liquidity to a pair, lets say (PRV - ETH), your basically buying into the liquidity pool. You receive shares equal to the percent ownership of the liquidity pool.

Since your providing 50% PRV and 50% ETH, the price that everything was when you bought into the liquidity pool is locked in place.
This obviously isn’t good if the price of ETH goes significantly up compared to the price of PRV. You would be losing money.

However, since your buying shares in the liquidity pool, when the price changes, and somebody else provides liquidity at a different rate, the price in the pool averages out. The more people providing liquidity, the more stable the price is.

So if you lose money, as long as more people provide liquidity and average the price back out, you should be fine. The liquidity pool is also gaining from staking PRV as well as transaction fees. This get’s rewarded to the liquidity providers based on the amount of shares owned. The longer you stay in, the more you get.

Obviously low liquidity pairs are more risky in this system, but they usually offer higher rewards to supplement that beginning gap. Non mainstream coins are gonna be harder to provide liquidity for, especially if their price fluctuates heavy.

This is personally why I believe implementing a 3rd party coin exchange into Incognito would be so beneficial. Instead of having a few really big liquidity pools, we could balance it out, to coins with lower liquidity. That would mean instead of providing liquidity for one individual coin, your providing liquidity to the whole network. I believe this approach would be better. However, I wouldn’t expect Incognito’s liquidity to be balanced between all coins, just the major ones. Maybe it could be a percentage based system, 80% of the liquidity distributed between BTC, XMR, ETH, USDC/T, DAI. Then 20% of the liquidity distributed between less traded coins.

11 Likes

Thank you, that was very clear. I will definitely avoid those low liquidity pairs.

7 Likes

Yes, I am with you and I want to see this work and I think that’s pretty close to the solution. Good stuff.

7 Likes

When will this be fixed? I have link staked for liquidity and want it out now.

6 Likes

Hey @Brakley what exactly do you mean? If you use Provide to supply liquidity you will not experience impermanent loss.

8 Likes

I started providing over a month ago. I thought that this would be fixed by now and I thought that I would be earning interest compounding on my contribution not based on the dollar value. Am I missing something? I originally provided 52.44 link and now it says my share is 35.7356 link. Why is this still the case?

5 Likes

Can you please help me figure this out? I’d like to know my funds are still available. Does the price off prv have to appreciate back to the ratio it was vs. the staked contribution in order to get back my original amount provided?

4 Likes

I experienced the same with USDT and KNC. Impacts more when liquidity levels are lower than others like BTC. Your LINk will increase with the more people that trade it for PRV. It does take awhile, some longer than others. Your PRV that is provided with it should have increased to almost, unfortunately, offset the LINk that is gone.

5 Likes

Yeah, I did the math but unfortunately it doesn’t equal the amount of LINK I am missing. I will just remain patient and wait it out. I guess it just helps me hodl longer lol.

5 Likes

It was alway around $1-2 less in my case. The USDT came to a few over what I had provided. The KNC did go back up but was I think 2 or 3 less than I put in. But it was a very small pool. 2 people and only like 46 KNC.

4 Likes

Hey @Brakley, I think you confuse pDEX and Provide (pDEX v2), which have different mechanisms. pDEX still may cause impermanent loss. You provide two sides. In your case, PRV and LINK.

However, Provide has guaranteed interest and supports some major coins (PRV, BTC, XMR, USDT, USDC, DAI). It does not support ETH, LINK, MATIC etc. yet.

6 Likes

Thanks, @abduraman for jumping in.

Yep @John_May @Brakley if you use ADD tool you will be able to provide liquidity to any pairs, but you will be experiencing impermanent loss.

If you do not want to experience it, please provide liquidity with Pool functionality.

I assume you are talking about a pair LINK <> PRV. And when some trades happened the balance was changed. You get less LINK, but you do not say anything about you get more PRV.

Basically to calculate your profitability, please use this formula

Initial liquidity value LINK + PRV = in USD
Current liquidity valued LINK + PRV = in USD

Your earnings = Current liquidity value - Initial liquidity value + LP rewards.

I hope it helped.


And yes, as @abduraman mentioned, we built Pool to make it easier.

9 Likes

What about removing the add pair option when the currency is available via the new pool and migrating automaticaly the pairs in the new pool?

2 Likes

So I am just losing the link I provided unless it crashes below prv value it was at the time I added the pair? I’d like to get what I provided back out.

Over a decent period of time, you would be able to gain back the link lost from Impermanent Losses. This is why it is important for users providing liquidity to understand impermanent loss. The loss is “temporary”, and over time it can be gained back. If you take your value out now, the loss is locked in. However, because of the reward decrease for providing, and how hard people got hit with losses, the Incognito team created Pool v2. There was a lot of hub bub about it in the forums. Providing liquidity never guaranteed you would be able to take the same amount out.

Pool v2 still uses the same system, however it is guaranteed that you are able to withdraw exactly the same amount you put in. Providers don’t get hit by Impermanent loss, instead I assume the applied rate gets changed. This is much safer for investors who want to supply liquidity to the platform. Currently only a few major coins are available in Pool v2 with more getting added consistently.

6 Likes

Do you have a time frame of when I can expect this to resolve itself? Will the implementation of the new provide feature affect the old providers like me? Is it possible to continue losing more if LINK keeps appreciating in value?