0

Just swapped some tokens on an AMM.

AMM said minimum I will receive was around 282 tokens, I really recevied around 254 tokens.

I had slippage at 12% as the token I was trading takes 10% reflections.

I assume this is why there is a difference of around 10 - 12%?

Does this means when the AMM says minimum tokens to receive it doesnt consider any tokens the contract takes?

If so is there anyway to know how many tokens the contract will take?

Also, how did the AMM know that the transaction will fail if slippage wasn't 12%. Should I just assume that if transaction will fail at less than 12% I also need to take off around a further 12% off of what the AMM says I will receive?

Thanks

2 Answers 2

1

If you're swapping tokens with hard coded tax inside on their smart contract (in your case 10%). The "minimum token" appearing on the website is wrong, because it is based on normal token contract with no tax/fees.

2
  • Hey, thanks for replying. Is this why I had to put slippage as 12% to cover the 10% contract tax? If so PCS factored in the 10% tax, as the minimum out shown by PCS dropped 10-12% when I increased the slippage, to reflect this. But then took another 10-12% out on top. Its what it looks like anyway. Also if the minimum token out on the website is doesnt take in to account the 10% tax, why does it show a message saying transaction will likely fail due to low slippage? Thanks
    – May
    Commented Sep 26, 2021 at 10:29
  • Is this why I had to put slippage as 12% to cover the 10% contract tax? - YES. PCS will detect how much the tax is (hence the fail message), but the "minimum amount" shown on their UI is for the minimum amount for no contract tax/fee. So basically, you still need to pay those fees.
    – Lonewarp
    Commented Sep 30, 2021 at 3:32
0

The AMM itself has no way of knowing how many tokens are deducted for fees. It can only calculate on the knowledge it has inside itself, so it gives you data based on its own numbers.

However, a frontend for such AMM may try to emulate such transaction to see how many tokens would be received. But I think at least Uniswap's website doesn't calculate the tokens based on such emulation, so it doesn't give any better information (in that regard) compared to just using the AMM contracts directly.

As for the slippage, the website you use may emulate the transaction and see that it will probably fail unless you use a slippage which is high enough. But the emulation probably only checks whether the transaction fails or succeeds with the given parameters.

1
  • Hey, thanks for replying. So I just checked on pancakeswap, and had set at 0.5% slippage, it said transaction may fail. I changed to 12% and the Minimum received tokens dropped to the 12% to reflect the slippage. But then my transaction was 10% less than that, So thats like 22% fees right? I think something is wrong. How can I calculate accurately how many tokens I will get each swap and how can I make sure I am not overpaying fees?
    – May
    Commented Sep 25, 2021 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.