ChainPortalChainPortal Docs
Features
Features

Taxable Tokens

Create tokens that take a buy and sell tax on DEX trades, on every supported chain, and what works differently on each one.

Overview

A taxable token takes a percentage of DEX buys and sells and sends it to a tax wallet you choose. ChainPortal offers it on all six ecosystems. EVM has had it from the start (TaxableERC20). The other chains get it with the new contracts. Each chain has its own transfer rules, so the result is not identical everywhere. The differences are listed below and are also shown in the app.

Shown only after the new contracts are deployed on that chain. On NEAR, Cosmos, Aptos and SUI, the taxable create form and the Tax management tab only appear once the app has confirmed that the chain runs the new token contracts. Until then the create page works exactly as before. Solana's version is the Token-2022 transfer fee of the Solana token factory, which is also gated this way.

Rules on every chain

RuleValue
Buy and sell taxEach side is capped at 25% (2,500 basis points) on its own. Buy and sell are set separately
What is taxedBuys from a registered pool and sells into one. Wallet-to-wallet transfers are not taxed, and neither are deposits into ChainPortal tools (locks, staking, launchpad, airdrop)
Roundingtax = floor(amount × rate / 10,000). The tax comes out of the amount you send. Example: selling 10,000 tokens at 5% puts 9,500 into the pool and 500 in the tax wallet
Changing the taxA new rate or tax wallet is queued and can be applied 24 hours later. You can cancel it while it is pending
Trading switchTransfers by accounts that are not excluded fail until you enable trading, and you cannot turn trading off again
ExclusionsYou can only exclude accounts from tax before trading is enabled. You can include them again at any time
Anti-snipe (optional)An extra buy tax of up to 50% for up to 100 blocks after trading opens (SUI: up to 5 minutes). It is set when the token is created and cannot be changed later
OwnershipOn non-EVM chains the token's admin cannot be renounced

The create form shows a rounding preview ("sell 10,000 → pool 9,500, tax 500") and refuses values the contract would reject before you sign anything.

Per-chain behaviour

ChainHow the tax is collectedWhere the tax goesWhat works differently
EVMEVMOne DEX pair, set when the token is createdSwapped to ETH (the chain's native coin) and sent onYou can renounce ownership only after trading is enabled (new factory). Tokens from the older factory can still renounce at any time
NEARNEARA list of registered poolsPaid in the token itself to the tax walletA new tax wallet must be registered for storage on the token before you queue it
CosmosCosmosA list of registered pools (Send delivers the after-tax amount)Paid in the token itselfTaxable tokens are managed by address on the Cosmos tokens page
AptosAptosTransfer hooks on the fungible asset, with registered poolsPaid in the token itselfExcluded accounts are still taxed when they trade with a pool. Register only DEX pools that measure their balance
SUISUIThe ChainPortal tax router, on swaps built by ChainPortalPaid in the token itselfThe tax is voluntary. Only swaps made through ChainPortal pay it
SolanaSolanaToken-2022 transfer feeHeld back in the recipient's account, then withdrawn by the creatorOne flat fee on every transfer: no separate buy and sell rates, no exclusions, no trading switch, no anti-snipe

EVM

Tax is collected in the token. On sells, the contract swaps the collected tokens for ETH (or the chain's native coin) and sends it to the marketing wallet / auto-liquidity. The swap can never block a transfer. Only the newest factory blocks renouncing ownership until trading is enabled. On these tokens, the Ownership tab explains this and shows the contract's TradingNotEnabled error as readable text.

The swap of the collected tax runs inside a sell only when the sell has enough gas. Wallets estimate the gas, and on some networks (Sepolia's current gas schedule, for example) the estimate leaves too little for it. The sell still goes through, but the tax stays in the token contract for now. Nothing is lost:

  • When you send a taxable token from ChainPortal (the transfer forms) straight to the token's trading pair, ChainPortal raises the gas limit so the swap can run.
  • Sells on third-party DEXs and swap aggregators (including the Relay-powered swap page) are built by those services, not by ChainPortal, so they may skip it.
  • A ChainPortal keeper checks every taxable token and, when the collected tax reaches the token's swap threshold, runs the swap on its own. Anyone else can trigger it too: swapBack() on the token needs no permission.

NEAR

The NEAR fungible-token factory creates the taxable token, with the same creation fee and up-front referral discount as a normal token. In the Tax tab you can queue, apply or cancel a rate change, register or remove pools, exclude or include accounts (exclusions only before trading), and enable trading. Before trading is enabled a new pool is added at once. After that, adding a pool takes 24 hours (removing one is instant). The tax is paid in the token, and there is no swap to NEAR.

Cosmos (CosmWasm)

The taxable token factory (cw20-taxable) creates the token with its supply, minter and optional cap, launch protection and tax. Pools that receive the token through Send are told the after-tax amount, so they credit what actually arrived. Management works the same way as on NEAR.

Aptos

The tax is applied by the fungible asset's transfer hooks. These hooks cannot see the other side of a pool trade, which has two consequences:

  • Excluded accounts are still taxed on trades with a pool. Exclusions only let an account move tokens before trading is enabled. Adding or removing your own liquidity counts as a trade, so set the tax to 0 until your liquidity is in place, then queue the real rate (it takes effect 24 hours later).
  • Register only DEX pools that measure their balance. A DEX that books the amount before the sell tax is taken would credit itself too much and fail to balance.

SUI

SUI coins have no transfer hook, so the tax is applied by the ChainPortal tax router when the ChainPortal swap card builds the trade (sell: tax, then DeepBook swap; buy: DeepBook swap, then tax). Anyone who trades the coin on a DEX directly pays no tax. The create form, the Tax tab and the swap card all state this. Registering a coin as taxable requires its TreasuryCap in your wallet. Registration gives you a TaxAdminCap, and whoever holds that cap manages the tax. The swap card appears only after DeepBook is configured for the network, and it works only with fee-free (whitelisted) DeepBook pools.

Solana

Solana uses the Token-2022 transfer fee: one rate (up to 25%) with an optional maximum fee per transfer, charged on every transfer. See Solana token factory and Token-2022.

On this page