1

We are currently in the process of developing a payment plugin for merchants to accept crypto payments. We are currently generating a unique order for every order which is placed in the merchant store. We easily implemented BTC, BCH and LTC since they support multiple UTXO transactions.

I went through most of the posts in the forum and noticed that this is not possible in ethereum using JSON RPCs just outside the box. Can someone please guide me if there is an alternate way to implement transactions from multiple addresses to a single address using Ethereum or if there is a better way to deal with merchant based transactions?

Thanks!

  • 1
    In Ethereum, every transaction has a single from address, so the method you used for Bitcoin etc. won't work here. There are two popular options: 1) Use a single address, but indicate via call data or the amount itself what order each payment corresponds to, or 2) Use multiple addresses, but have each be a smart contract that automatically forwards funds it receives. – user19510 Jan 16 at 4:15
  • The second option totally makes sense! But when i forward eth from a contract to another address, won't it cost more gas and be recorded as a separate transaction in the blockchain? – Arvind Jan 16 at 16:08
  • If you just forward immediately when ether is received (e.g. in the contract's fallback function), no separate transaction is required. But yes, it will cost more gas (~9,000, so it will add about 45% to the transaction fee.) – user19510 Jan 16 at 20:02
  • Thanks a lot! I have looked at a few forwarder contracts in solidity. Hopefully, they do the trick – Arvind Jan 17 at 15:30
  • You were right! It worked. But i am just curious if this is the only way to implement an ethereum based payment system since this requires me to implement one contract per order/transaction to track separate buyer payments and requires me to spend my own money on deploying each of these contracts! – Arvind Jan 18 at 6:01

Your Answer

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

Browse other questions tagged or ask your own question.