So I did another test (previously I asked how PCS estimates the amount of slippage on a trade). A sell of 0.05% of my token supply was expected to give back 0.00119681 BNB according to PCS. Price impact was estimated to be 0.21%. Doing the trade returned me 0.0008967 BNB. That's about 75% of what was expected by PCS, which is close to perfect given that the tax on my token is exactly 25%.

However, this trade only worked by setting slippage = 34%. Anything lower than that and PCS threw an error when trying to execute.

I looked at the failing call (when slippage is set too low) : PCS calls swapExactTokensForETH with a required minimum BNB of >0.7% of what is expected if price didn't move at all and tax would be 0%. However, slippage was set to 33%. Why does it do this?

Aug 30, 2021, 5:39 PM

© 2024 Draquery.com All rights reserved.