Can someone explain how this tokens work can buy but can't sell

For example here is pair you can buy this coin 0x7D8867D754f745091856F7382cc14D095e6A1687 but can't sell it because of some
The contract function "swapExactTokensForNATIVE" reverted with the following reason:
but there is no reason given. So how do they do it and i see that some addresses can sell this token but not me apparently....

1 Like

Looking into this contract on avascan, there is no function named swapExactTokensForNATIVE.

Here are the functions which ARE exposed on this contract:

Ok still not get how other addresses was able to sell this token here is one for example they use swapExactTokensForNATIVE so too sell it i had to call this function manually from router contract? or there can be other caveats, like selling is allowed only to some special addresses etc? and how to know that if i buy a token i can sell it?

This is the function prototype:

     * @notice Swaps exact tokens for NATIVE while performing safety checks
     * @param amountIn The amount of token to send
     * @param amountOutMinNATIVE The min amount of NATIVE to receive
     * @param path The path of the swap
     * @param to The address of the recipient
     * @param deadline The deadline of the tx
     * @return amountOut Output amount of the swap
    function swapExactTokensForNATIVE(
        uint256 amountIn,
        uint256 amountOutMinNATIVE,
        Path memory path,
        address payable to,
        uint256 deadline
    ) external returns (uint256 amountOut);

What values are you passing to this function as input when you try to execute it?

Also, you need to approve the contract to transfer tokens from your wallet BEFORE you execute that function (using that same wallet). So there are in fact two transactions which you need to execute here:

  1. tokenContract.approve(routerContract.address, inputAmount)
  2. routerContract.swapExactTokensForNATIVE(inputAmount, ...)

Ok will try next time when stack in unsalable token as this one is rugpulled already, at least that what i think was happened to it....