Get to know in practice how the Liquidity Pool works

in #hive-1503292 years ago

The liquidity pool uses the law of supply and demand, so if a token has a lot of supply and little demand, the price drops and if there is a shortage, the price goes up.

Let me show you in practice more or less how it works, imagine that you have 200 dollars and you decide to buy 2 Tokens, A and B... And you see a pool of liquidity and decide to put it in the pool, the beginning would look like this:

Token A - Qt.USDPRICEToken B - Qt.USDPrice
3333 A$ 100$0.03175.43 B$100$0,57

Now let's assume that Token B drops to 0.55 cents, so we must multiply 175.43*0.55= 96.4865 and add the 100 dollars to the result and then divide by two, (96.4865+100)/2 = 98.24325... that is each side must have 98.24 dollars... Now just 98.24/0.03 = 3274.775 A and 98.24/0.55= 178.61 B

Token A - Qt.USDPRICEToken B - Qt.USDPrice
3274.77 A ⬇️$98,24⬇️$0.03178.61 B ⬆️$98,24 ⬇️$0,55 ⬇️

As you can see, the liquidity pools are kept in balance using the average of the pair to balance the price... In this example we can see that the investor who put his tokens in the liquidity pool lost about $3.51 dollars, but what if it goes up? ?

Token A - Qt.USDPRICEToken B - Qt.USDPrice
3274.77 A ⬇️$98,24⬇️$0.03178.61 B ⬆️$98,24 ⬇️$0,55 ⬇️
3423,43 A ⬆️$102,703⬆️$0.03171,17 B ⬇️$102,703 ⬆️$0,60 ⬆️
3566 A ⬆️$106,98⬆️$0.03164,58 B ⬇️$106,98 ⬆️$0,65 ⬆️
3703,1 A ⬆️$111,093⬆️$0.03158,70 B ⬇️$111,093 ⬆️$0,70 ⬆️
3835,3 A ⬆️$115,059⬆️$0.03153,412 B ⬇️$115,059 ⬆️$0,75 ⬆️

As we can see if one of the tokens increases the price or both we will make a profit, but not as much profit if we were just holding it, but for a better understanding let's do the calculation

115,059 + 115,059= 230,118-200 = 30,118 Profit

Now let's see how much Profit we would have if we didn't have it in the Pool.

178,61 B * 0,75 = 133,95-100= 33,95 Profit

As we can see the profit on holding is much greater than leaving it in the pool, in the example I considered token A as a stablecoin, so the profit could be lower if token A had fallen and greater if it had risen. Of course, as I skipped several prices in the liquide pool, the profit should be much smaller.



Pixabay License

Posted using Proof of Brain

Sort:  

Congratulations @d-silva! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You received more than 200 upvotes.
Your next target is to reach 300 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

HiveBuzz World Cup Contest - Recap of Day 9
Hive Power Up Day - December 1st 2022
HiveBuzz World Cup Contest - Check your ranking
Support the HiveBuzz project. Vote for our proposal!