No More Sending Tokens to the Wrong Address

Written by usamaro | Published 2023/02/15
Tech Story Tags: cryptocurrency | crypto-wallet-security | blockchain-money-transfer | token-transfer | lost-tokens | defi-guide | tool | open-source

TLDRThis guide will walk you through how to use Etherscan to transfer your tokens safely. This method also works with any EVM blockchain explorer such as Polygonscan, BscScan, Snowtrace, FtmScan, etc. There are two ways to do so, one is manual and the other is through a free open-source tool called SafeTransfer.via the TL;DR App

In the past few months, there were a few stories about tokens being sent to the wrong address. Among them, Optimism Foundation sent 20 million OP tokens to a Wintermute multisig that wasn’t deployed or the Juno whale who sent $36 million Juno tokens to the wrong address due to a typo. There are many more such cases that you can encounter simply while exploring token contracts on Etherscan (E.g: 411K USDT are sitting on the USDT contract)

With transactions being immutable on most blockchains, this becomes an important problem. In most cases, there is no way to recover the tokens. Therefore there is no solution once tokens are sent to the wrong address but, there is a solution to prevent it.

What if instead of sending tokens, you set a specific amount that the receiver can “claim” using his wallet? The best thing about this method is that it makes mistakes easy to correct as you will only need to revoke the approval.

There are two ways to do so, one is manual and the other is through a free open-source tool called SafeTransfer. Both methods will be presented in the following lines.

Using a blockchain explorer

This guide will walk you through how to use Etherscan to transfer your tokens safely. This method also works with any EVM blockchain explorer such as Polygonscan, BscScan, Snowtrace, FtmScan, etc.

Alternatively, the following video is available and explains the process step-by-step: https://youtu.be/K25cwTw1EQI

Approving tokens to send

In order to send tokens in the way described previously, you will need to approve the amount you want to send and select the receiver.

  1. Head to the Coingecko or CoinMarketCap to find the token you want to transfer:

    In our case we will use Ethereum hence we'll be copying the Ethereum contract address.

  2. Go to Etherscan or to the EVM blockchain explorer of the blockchain you use.

  3. Select the “Contract” tab, click on “Write Contract” and connect your wallet by clicking on “Connect to Web3”. This should display a similar page as the one in the screenshot below

  4. Once you’re connected, look for the “approve” function and expend it. You should see two fields. One for the spender’s address and one for the amount you want to approve. As I was used to multiply by 10**18 every amount I want to transfer, I didn’t notice beforehand that it was different with the USDT contract as the USDT token only supports 6 decimals.

In the amount field, multiply the amount you want to transfer by 10**6 with 6 being the decimal places of the USDT ERC-20 token that you’re transferring.

By default, ERC20 uses a value of 18 for decimals. Always check in the token page on your EVM blockchain explorer.

In the screenshot below, I am approving 40 USDT to be spent by 0x9d….7A6D. The next step is to click on “Write” and complete the approval on your wallet.

Receive the tokens

  1. To receive the tokens, send the token contract page to your receiver

  2. Your receiver will then have to connect his wallet to Etherscan and go the “Write Contract” the same way the sender did but, this time, the receiver has to look for the “transferFrom” function.

  3. After filling the fields, the receiver should something similar to the screenshot below.

  1. The last step is to click on “Write” and complete the transaction in his Metamask. If there is any mistake, you can still revoke the approval using RevokeCash.

Voilà! The receiver was finally able to “claim” tokens directly from your wallet. With this method, there is no way to send tokens to the wrong address. The biggest limitation of this method is how time consuming it can be. It also requires you to know how to interact with contracts on Etherscan (which can be a great thing). The second method follows the same pattern but makes all this process easier.

Using SafeTransfer

SafeTransfer is a free and open-source solution that does all of the above for you. This guide will walk you through how to use Polygonscan to transfer your tokens safely.

Alternatively, the following video is available and explains the process step-by-step: https://youtu.be/K25cwTw1EQI

Approving tokens to send

  1. Go to safetransfer.cash. Connect your wallet, select the network, put the receiver’s address, select the token and the amount you want to transfer.

  2. Lastly, click on “Approve” and complete the approval in your wallet. This should generate a link that you can send to your receiver. You should have something similar to the screenshot below.

If you open the link yourself, you should also be able to cancel the approval.

Receive the tokens

  1. To receive the tokens, send the link SafeTransfer generated to your receiver where he simply need to connect his wallet and click on “Receive” button and complete the transaction in his wallet. The receive page should resemble the screenshot below.

That’s it, as simple as that. Both methods work the same. Feel free to use the one you like to make your token transfers safer than ever before.


Written by usamaro | An internet bunny who loves decentralized stuff.
Published by HackerNoon on 2023/02/15