Wallet Crumbs

How to sell a token on Etherscan

You can sell a token without any swap app by calling the exchange's router contract yourself on a block explorer like Etherscan or BscScan. It takes two transactions: approve the router to take your tokens, then swap them for ETH (or BNB). This works for the classic "V2" pools on Uniswap, PancakeSwap, SushiSwap and their copies, and it's the usual way out when an app refuses a trade, for example in a dead pool.

It looks technical, but it's just filling in a form. Take it slowly and double-check addresses.

Before you start

Amounts are in the token's smallest unit

Contracts don't use decimals. If a token has 18 decimals, 1 token is written as 1000000000000000000 (1 followed by 18 zeros), and 250 tokens as 250 followed by 18 zeros. Get this wrong and you'll approve or sell a tiny fraction of what you meant, or the transaction fails. Copy numbers rather than typing zeros by hand where you can.

Step 1: check what you'll get

  1. Open the router's page on the explorer and go to Contract โ†’ Read Contract.
  2. Open getAmountsOut. In amountIn put how much you want to sell (in the smallest unit). In path put the token address, then the wrapped coin's address, like [0xYourToken,0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2] (that's WETH on Ethereum; on BNB Chain use WBNB, 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c).
  3. Click Query. The last number in the answer is how much ETH (in wei, 18 decimals) you'd receive. Try a few amounts: in a thin pool, selling more soon stops paying more.

Step 2: approve the router

  1. Open the token's page and go to Contract โ†’ Write Contract. Click Connect to Web3 and connect the wallet that holds the token.
  2. Open approve. Set spender to the router address and amount to exactly the amount you'll sell. Don't approve an unlimited amount; you don't need to.
  3. Click Write, confirm in your wallet, and wait until it's confirmed.

Step 3: swap

  1. Back on the router's page, go to Write Contract and connect.
  2. Open swapExactTokensForETHSupportingFeeOnTransferTokens (on PancakeSwap it's the same name; some forks say AVAX or BNB instead of ETH). This version also works for tokens with a transfer tax.
  3. Fill in:
    • amountIn: the same amount you approved.
    • amountOutMin: the getAmountsOut result minus a little, say 2% (or more if the token has a tax). If the trade would pay less than this, it cancels instead.
    • path: the same [token,WETH] list as before.
    • to: your own address. This is where the ETH is sent. Check it twice.
    • deadline: a time far in the future, like 9999999999.
  4. Click Write. If your wallet warns that the transaction will fail, stop: something's off (amount, path, or the token blocks selling). Otherwise confirm, and the ETH lands in your wallet when it's confirmed.

Staying safe

Related: What is a dead liquidity pool? ยท Why can't I sell my token?

Wallet Crumbs does the fiddly part for you: for each sellable token it finds the right router and amount, and writes these steps with every field already filled in. Free, no login, nothing to connect.

Scan an address