Tokens with taxes

For tokens subject to taxes, specific adaptations are essential in trading workflows:

  1. Disable Exact Out Feature:

    • Disable the exact out feature for these tokens since they are predominantly traded with the exact in trade type. Trade involving taxed tokens and using Exact Out will result in an error message.

  2. Increase Slippage:

    • Elevate the slippage tolerance to compensate for reduced proceeds when selling taxed tokens.

    • Recommend increasing slippage directly on the UI when dealing with taxed tokens, with adjustments corresponding to the tax rates.

    • Dynamically adjust slippage based on the tax amount provided for each token in the trade to ensure successful transactions despite the tax implications.

Tax Information is included in Quotes Endpoint and Information Endpoints:

Tax details for each token involved in a trade are included in the quotes endpoint response. Attributes such as buyTax and sellTax for each tokenFrom and tokenTo are present in the information, facilitating users' understanding of tax implications and aiding informed decision-making.

For instance, when querying the quotes endpoint, the UI should will return tax-related information for each token involved, such as buyTax and sellTax. Additionally, the UI should dynamically adapt the slippage settings based on the tax amount associated with each token, promoting seamless trading experiences despite tax considerations.

"tokenFrom": {
      "name": "ZCX",
      "symbol": "ZCX",
      "decimals": 18,
      "contractAddress": "0xc52c326331e9ce41f04484d3b5e5648158028804",
      "chainId": 1,
      "buyTax": 0,
      "sellTax": 0
    }

You can also find the tax information in the endpoints that return information about tokens (popular tokens, search, token information).

Last updated