3

I am use Web3J 4.5.7 with Java 1.8

I am integrating ERC20 tokens for an exchange. We have a scenario.

A user doesn't have any ETH in his address, but has ERC20 token, let's say USDT. Now the user wants to withdraw his USDT to some other wallet. But as he doesn't have any ETH in his wallet to cover the gas fees, transaction results in error.

I am trying to figure out a way to resolve this.

Is there any way, where we can assign one exchange Wallet which pays all the gas for all the transfer events ? If yes, can someone point to correct docs or maybe a small code snipped on how to achieve it.

Thanks.

  • Anyone to my rescue ? – Gladiator9120 May 15 '21 at 12:54
  • Did you solve it? I'm looking for the solution too. – Alex Pavlov Mar 17 '23 at 21:46
  • @AlexPavlov unfortunately, it's not possible with Ethereum or any similar chains. You have two options, either use third-party service like Fireblocks of CryptoApis dot com that provide "Gas Station" which allows you have ETH in one master wallet. Or manually transfer little ETH to your user's account and sweep their tokens to your master wallet. I implemented the second option. – Gladiator9120 Mar 18 '23 at 06:17

0 Answers0