Security – How Ethereum ERC-20 Tokens Were Stolen Using Uniswap

erc-20Securityuniswap

I was using my Trust wallet on my mobile and tried to do a swap from ETH to an ERC20 token but realized a day after that it got drained to this account: https://etherscan.io/address/0x2b5b060d57b1333c9b2739e9c15b039726dd51ec#comments

It also seems that this person was able to steal from others too. My main question now is how did this happen?

When I did the swap, I received my ERC-20 tokens, and it was sitting in my account fine. But looking at the blockchain, 5 hours later it moved to this person's wallet. However I bought another ERC20 token and managed to get it out when it arrived. So its safe to assume this "loophole" is done manually and there isn't a bot monitoring my address. Currently my ETH account still has $150 worth of ETH that isn't drained.

So I'm not sure what type of loophole did this hacker is using to steal my ERC20 tokens. Right now the possibilities is either trust wallet or Uniswap is comprised.

Best Answer

There are many possibles reasons that this happened and I will try to list them all.

First of all, the problematic transaction called the transfer() function on the POLS token contract, not the transferFrom() function. It means that this fraud has nothing to do with the approval you made earlier to Uniswap. The transaction must have been signed either by you or by someone who has access to your private key.

Possible reasons:

  1. You made this transfer transaction yourself thinking that you were making another transaction, possibly through a phishing website.
  2. You lost your private key or mnemonic. For instance, you stored it insecurely or on a compromised device, you entered it on a phishing wallet (fake wallet that sends your mnemonic to the scammer), you uploaded it on github by mistake or anywhere public, etc.
  3. Your phone where you keep your wallet is seriously compromised.
  4. There is a very serious issue with Trust Wallet. However, from the comments on etherscan it seems that some may have use Metamask and not Trust Wallet. Also, many more users of Trust Wallet would have been affected if it was a problem with Trust Wallet.

My advice would be to create a new wallet (new mnemonic) on a different device and transfer everything you have to that new address. Assume that all the devices you used are compromised.