I can give you an example of how it works:. Imagine you have 100% of the ADAX / ADA pool, 100k ADA and 100k ADAX for.

20 Jun 2022, 06:38
I can give you an example of how it works: Imagine you have 100% of the ADAX / ADA pool, 100k ADA and 100k ADAX for. someone comes along and wants to buy 1k ADAX. First of all, he will not pay 1k ADA for it, as the price shifts with the ratio. So to calculate how much he has to pay, you need to use something called Constant product formula: (number of token A) * (number of token B) = constant . This means that the product of assets inside the pool needs to be the same before and after a trade. So the CP on that pool is = 100k*100k = 10B If someone takes 1k ADAX, how much ADA do they need to pay? 99k ADAX remaining. so 10B/99k= 101 010 ADA. 101 010 - 100 000= 1010 ADA Now all that is left is the fee. So, instead of getting 1k ADAX, you need to pay the trading fee of 0.3%, so you leave behind 3 ADAX In the end the pool is left with 99 003 ADAX and 101 010 ADA So what is the impermenent loss? Well, the ratio betweetn the assets went fom 1 ADA/ADAX to 1.02 ADA/ADAX So how much is your liquidity worth now? 202 020 ADA And how much is your initial token count worth? Lets say I have the same amount you had initially, but never provided liquidity. I have 100k ADA + 100k ADAX which is now worth 202 027 ADA So you had an IL of 7 ADA So why offer liquidity you may ask? Well, now imagine that someone else comes along and sells 1k adax back into the pool. The ratio goes back to 1, and you have won 0.3% fees on those trades. So in the long run, you will make money, as long as the price does not go parabolic and volume keeps coming in