3

What is the practical difference between these "supporting fee" functions and the other swap functions and when should I call one rather than the other?

And what special value do the SupportingFeeOnTransfer functions bring to the table so that they can be used instead of the other swap functions during an exchange?

1 Answer 1

1

Some tokens include a separate transfer fee. So if the exchange rate is 1 to 1 normally and you want to trade 100 tokens, the token transfer decreases the sender balance by 100 and increases the receiver balance by, for example, 98. Such fees will basically screw up Uniswap's regular swap functions.

That's why there are separate functions to use when you're trading tokens which include a transfer fee. I'm not sure of the technical difference between the function types, but basically the other one allows a transfer fee while the other one doesn't.

I have no idea how Uniswap's frontend decides which function to use. There also isn't any way to know for sure whether a token has a transfer fee, except by analyzing its code. You can simulate a transaction and that will probably tell you if there's a fee, but you can never be 100% sure that the fee is always there - except by analyzing the code yourself.

4
  • thank you so much.
    – nadia
    Dec 13, 2022 at 16:57
  • So apart from that there is no particular interest in using its SupportingFeeOnTransfer functions?
    – nadia
    Dec 13, 2022 at 17:02
  • I'm not really familiar with the details, so can't say for sure. Dec 13, 2022 at 18:48
  • Ok, thanks you Sir.
    – nadia
    Dec 14, 2022 at 14:26

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.