I'm building a crypto payment processor, and once of the "hindrances" is in moving ERC20 tokens around.
For reference, the current payment pipeline looks as follows:
- User requests ETH address
- User sends ERC20 to ETH address
- System forwards ERC20 from ETH address to cold wallet.
The issue here being step step 3 requires there to be ETH in the ETH address for the ERC20 to be sent to the cold wallet.
The current solution I'm looking at is sending a small amount of ETH from the hot wallet to the ETH address any time an ERC20 token lands in the account - only if there isn't sufficient ETH already in the account.
This seems slightly wasteful as it requires the system to "guess" how much ETH will be needed to cover the transaction, and it's also expensive since it requires two transactions to be made and ETH fees are quite ridiculous..
Is there any possibility that the hot wallet would be able to "forward" the ERC20 token by means of a contract and pay the gas fee? I.e. is there any way to overcome ETH address needing ETH to handle ERC20 tokens?
I've seen relay networks but from my understanding they would require custom contracts to be deployed for the ERC20 tokens meaning I couldn't accept any ERC20 on the ETH network.