I'm hoping to build a system that would let me, in one transaction, transfer ETH from WalletA and receive DAI in Wallet B.

Is there a contract out there that currently does it? or is it even possible to build a contract that does this?

Keep in mind the toToken, fromToken, walletB addresses would all be parameters on a given function call.

New contributor
ben church is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Yes, it's possible. You can directly interact with UniswapV3 or Sushiswap router contracts to swap ETH to DAI and send that to a particular receiver address.

Here's the example with Sushiswap (UniswapV2) router:


  1. payableAmount: ETH amount you want to swap
  2. path: [WETH, DAI]
  3. to: walletB

Your Answer

ben church is a new contributor. Be nice, and check out our Code of Conduct.

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.