3

I have a confusion, When we create new address/account for an ERC20 token then it have 0 Eth balance. When we send some tokens to this address and then withdraw token again from this address require a gas fee in ETH but this account don't have any ETH. So how we can send the transaction when account have 0 ETH for Gas fee. Can we use a separate address to pay ETH fee for all address of Token ? I am developing ERC20 token wallet application in C# so kindly answer accordingly.

Thanks

2
  • 1
    You can either ask someone to send Ether to your Ethereum account (they will most likely ask you to pay them for that in some way, for example, transfer dollars to their bank account). Or you can download a miner app and configure it to run on your machine and accumulate the mined Ether onto your account. Mining probably won't get you that far at this point in the evolution of the Ethereum network (unless you set up a whole server-farm in your backyard). So you're probably gonna have to buy it in the old-fashion way... Jun 12, 2019 at 19:39
  • You can do so by creating a contract (that holds gas for the sub wallets that receiver ether) and deploy contracts that act as receivers. I've added an answer and code on the question that has already been asked's page. Sep 24, 2019 at 10:24

1 Answer 1

2

ERC20 tokens consist of smart contracts which are built on top of the Ethereum network. This mean you must comply with the protocol specific pillars of this network, i.e. paying fees for network addition of your transactions etc.

If you can't pay the network fee, then you can't add the transaction. Now if you can't add the transaction then you can't make changes to the state of your ERC20 token smart contract. There are design patterns to work around having the sender being the payee, i.e. by using replenishing deposits, refundable gas, etc.

TLDR: Someone or something must deposit the necessary ether in some way to cover the costs associated with adding the transaction to the network.

1
  • I know I have to pay the fee for transaction but my question is if any client signup on my wallet and get a new address then how I can handle the withdraw fee for him because he is not aware of it he only know about my token not about ether so what should I do technically to get fee from him in the form of token and give him some ether is it right way? Jun 13, 2019 at 8:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.