An Automated Market Maker (AMM) is an amazingly elegant way for decentralized exchanges (DEX) to operate in the crypto space.
However, both traders and liquidity providers can lose some of their money.
For traders, there is the matter of slippage and price impact, which we covered extensively in the past.
Liquidity providers need to deal with Impermanent Loss (IL)
It can take a substantial bite out of a liquidity provider’s earnings from trading fees, to the point of leading to a net loss!
The formula for impermanent loss is quite elegant (see first image).
"r" is the change in price of one token in the pool compared to its counterpart.
For example if BTC-ETH is trading at a 1 BTC to 10 ETH and then after some time trades at 1 BTC to 15 ETH, r is 1.5.
Let’s go ahead with some interesting observations.
1) The formula above doesn’t depend on the fiat price of the tokens, nor on the amount of tokens in the pool.
2) The only thing that matters is how much the price of token has changed relative to token.
Let's say price of token X relative to token Y doubles ( r is 2). Plugging into the equation, we’ll get an impermanent loss of 5.7%
In other words, providing liquidity to a pool where, after some time, one token doubles in value compared to the other will cause a paper loss of 5.7% compared to just HODLing the tokens.
You may have already guessed this, it doesn’t matter if token X doubled in value compared to token Y (r=2) or vice versa (r=0.5)
In both cases the impermanent loss is 5.7%
In the graph showing Impermanent loss as a function of r, you can see that for r=4 or r=0.25 your IL will be -20%. Ouch.
The most you could ever lose asymptotically is 100%, if the value of one of token drops to zero and the value of the other doesn’t.
Here is a full derivation of the Impermanent loss formula
Post #72
405


- ❤ 1
- ❤🔥 1