0

In my project, I craeted separate Ethereum accounts for each customer on my Geth server (I have not access to private key in this way normally). Now, customer needs to send out ERC-20 token, whereas he has not any deposited ETH for gas.
After some researches, I found out one way is to use approve() and transferFrom() as I can provide the enough ETH as gas for transactions. But there are two questions here:

  1. Using these methods, who will be the final gas payer? Customer itself, or me as the exchange?
  2. When I transfer token on behalf of customer, I have to move the token to my own account. Does it need a new transaction and a new gas?
1
  • Your customer will need gas also for approve – goodvibration Apr 11 '20 at 10:09
0

Using these methods, who will be the final gas payer - the customer itself, or me as the exchange?

Your customer will pay gas for executing approve.

You will pay gas for executing transferFrom.

When I transfer token on behalf of customer, I have to move the token to my own account.

You don't have to move the token to your own account, that's the whole idea about transferFrom:

You move the tokens from the customer's account directly to the destination account.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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