[Ethereum] ERC20 :: Transferring tokens without sender gas

erc-20gasout-of-gastokens

Let's assume we have 50 ERC20 tokens that we would like to support (deposits) on our website. People are depositing tokens to the ETH adresses we've generated for them.
In the end of the day, we want to geather tokens from all the generated addresses and send it to our cold wallet.

How can we make the transfer to the cold wallet if the newly generated addresses don't have any ether on it (this means no gas) and we don't want send there any ether?

Preferably, I would like to pay all the GAS that's requried for transactions from the cold wallet address – is it possible?

How exchanges are managing such situations? Do they generate the adresses and every time they are sending there eth to have enought for gas? In the end of the day, they have to move assests to one account. That's sounds… unefficent.

Best Answer

This is not currently possible with the ERC20 standard. There are a few proposals that address this issue from different angles, but none of them is accepted as a standard yet:

  • EIP 865 supports delegatedTransfer
  • EIP 965 extends ERC777 with a "Cheque Operator". The use case you asked about is described here.

Both these proposals require changes in the token contract though, so they won't work for already existing ERC20 tokens.

So the obvious solution, unfortunately, is to send just enough ether to the generated addresses to cover the gas costs for moving the tokens out.

If you happen to own significant mining power to produce a block every X hours and you're ready to wait X hours to move those tokens out, you can configure your mining software to include your own zero-fee transactions in your own blocks.

Related Topic