I’m developing an exchange. When a new user register on website we will create new eth wallet for them. When they deposit USDT on their wallet how can I transfer that USDT amount to another address (pool) and pay gas fee with another account (because new user’s eth balance is 0)?

1 Answer 1


The most Ethereum friendly solution would be

  1. Create and deploy a controller smart contract. This co-ordinates that we have deterministic addresses for payment forwarded smart contracts.

  2. For each new deposit address deploy a payment forwarded smart contract using CREATE2 from depositor controller. You need deploy a batch of these smart contracts upfront and then assign them to the customers as they come in.

  1. The smart contract has only one function - forward deposited ETH and tokens to a hot wallet. The exchange fee wallet calls this function and the exchange pays the fees.

An overview of Coinbase merchant non-custodial architecture. An example forwarder contract. Other CREATE2 users are most of mobile smart contract based wallets that support "recover wallet by friends" and non-ETH fee markets e.g. Pillar, Gnosis, Argent.


  • Can handle ERC-20 transfer() transactions from centralised exchanges that do not support ERC-20 approve() and transferFrom() mechanism

  • Using CREATE2 EVM opcode, the contract can be retroactively deployed to a deterministic address where the user already sent the payment even if the deployer system is down for some reason


  • May use more gas (see CREATE2 gas cost stats)

  • Needs a centralised co-ordinator for allocating payment forwarder addresses

  • Extra gas cost for the merchant to deploy forwarded contract per user and then calling this contract to forward its contents ETH and tokens to a centrally managed wallet

Difference over plain Ethereum account forwarders

  • You do not need to top up plain Ethereum forwarding accounts with gas money, as gas for the forwarder contracts can be centrally paid

  • Non-custodial logic - even if the deployer private key is compromised the system as a whole is not compromised

  • Smart contract can interact with payment forwarder contracts

However plain Ethereum accounts with hierarchically deterministic private keys may work as well, as long as you figure out how to keep them topped up for gas money.

  • can you please explain what is depositor smart contract and how should it works? Commented Jun 26, 2020 at 13:56
  • Here medium.com/valus/… Commented Jun 27, 2020 at 8:14
  • And for C# impl refer to github.com/Nethereum/Nethereum.WalletForwarder
    – Khosro
    Commented Nov 25, 2020 at 16:09
  • Hi @MikkoOhtamaa, please can you explain, I find the part where you say "You need deploy a batch of these smart contracts upfront and then assign them to the customers as they come in." contradictory to the coinbase article, where it says the smart contract is only deployed once the payment is sent to the pre-calculated address? -> "This enables the same user experience as preemptively deploying a forwarding contract for each merchant, without incurring the expense of deploying these contracts on the blockchain" ?
    – ivpavici
    Commented Jan 13, 2022 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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