How do I specify in the code to only deduct from the stable coin then send to a smart contract when selling and not the token. what would have been the default
1 Answer
It is quite complicated because there's no easy way to determine a transfer from a sell, unless you control the "market" selling the tokens. You could do something like this if the seller is a Uniswap token pair.
The other complication is deducing the fees in a different token like USDC. It is a heavy burden to require USDC in order to complete a transer. Other tokens usually deduce the fees in the original token and use an AMM like uniswap to exchange them into USDC.