I kinda need help figuring out the problem here, if anyone can help its very very much appreciated!
I'm trying to test out liquidity for my own token on the Binance Smart Chain, however I'm encountering a confusing issue that I can't seem to figure out.
I created a token with a supply of 1,000,000 (lets call it TOKEN). I am holding all of them in my Metamask wallet and I go to pancakeswap to provide liquidity. As a test, I added 100 TOKEN in a liquidity pool with 0.0001 BNB, setting the price at 1 TOKEN = 0.000001 BNB. Up until this point, everything is working fine.
Then I went to buy 100 TOKEN using 0.0001 BNB, and it says that the price impact is about 99.8%, which is okay with me, and I understand that since I'm buying the entire supply of liquidity.
At this point, after the transaction, I should have 1,000,000 TOKEN in my wallet again, so theoretically, at least in my mind, I can sell my 1,000,000 TOKEN for the old price of 0.0000001 BNB x 1.998 (0.000001998 BNB = 1 TOKEN), after factoring the calculated price impact. According to my calculations, this would mean that by selling 1,000,000 TOKEN, I would receive 1,000,000*0.000001998 = 1.998 BNB after the trade.
However, when I try to execute the trade, the price Pancakeswap sets for my sale of 1,000,000 TOKEN is less than what I originally set as liquidity, meaning that I end up with less BNB than what I started with.
I'm relatively new to the concept of liquidity and setting up your own crypto token, so I would really really appreciate if anyone with more knowledge can help explain what exactly is going on here?
I don’t have any pictures right now but I’ll try to add some when I’m home later.
The template I used is here on GitHub: https://gist.github.com/mattupham/0a3af746ccbabeef3f461a9664ba4ea0
Thank you so much!