5

With Bitcoin, it works because of the joinable UTXO's , like this:

  1. Generate a key pair for each customer, and associate the public address with the customer id.

  2. Receive payments from multiple customers, simply identified by the addresses.

  3. Periodically spend the total amount to offline wallet, with a single transaction.

You can accumulate hundreds of payments in a simple and economical way.

How to implement this with Ethereum?

Note: identifying customers by their sending address is not an option for multiple reasons.

Note: if the answer is resolved to be "It's not feasible", the follow-up question would be, "What is the best alternative?".

1

What I would do is create an instance of a "receiver" contract for each customer. And have a single instance of an "accumulator" contract.

The "receiver" contracts just forward the money to the "accumulator" contract. The accumulator contract just have a single method that just sends the accumulated money to the owner (you).

  • This sounds good. If I understand correctly, it would allow to identify the payments, and to accumulate them without paying a fee for each incoming transaction, great. The downside is, each incoming transaction would invoke the contract, and special instructions should be given to provide enough gas for the contract to run. Simple transfer from most wallets maybe will not work. – Hristo Hristov Apr 15 '16 at 18:51
  • Another downside - creating instances of the receiver contracts costs ether, while generating hundreds of simple key pairs is free. If there are many "potential" customers, this becomes an issue. – Hristo Hristov Apr 15 '16 at 18:54
  • If you just need accounting, then a single contract would do. You can use the source address or a parameter in a method to identify the source and then just increment the accumulated amount send for that source. – jbaylina Apr 15 '16 at 19:10
  • You can limit the amount of ether needed to deposit to a receiver contract by limiting the logic as much as possible; at a minimum you could simply receive it and do nothing; a periodic process would call another method to 'empty' the wallets and log the deposit. – Nick Johnson Apr 16 '16 at 11:16

Your Answer

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.