Skip to main content
Commonmark migration
Source Link

You can do something similar to what you're doing with Bitcoin, but with Ethereum. The simplest way may be to run your own Ethereum node (since you don't want to use external services). From here, you can generate an account/address on-demand. For example, you can do this from the geth console using [personal.newAccount("passphrase")][1] or with [nethereum][1]nethereum. You can then poll the account balances until the desired amount is received (you might want to use a back-off algorithm [like this][2]like this or simply put a deadline for payment receipt) and then do the rest of your backend stuff to fulfill the order. If you accept payments this way, you can easily send the received amount into a master account. The downside to this is, unless you have [replication][3]replication, if your backend system goes down, you might lose the private keys for the accounts you just created. Also, hot wallets are involved, so theft is made easier (but if someone can compromise the backend, they can just have payments sent to their own accounts, anyway).

You can avoid this by pre-generating a set of accounts, as you suggested, using an automated method as described above. You are still able to check the balances of the accounts for payment purposes, but you won't be able to sweep the ether automatically. Instead of using a plain account, you could potentially create a contract to do that automatically, but would need to spend more gas (either you or your clients). If you use this method, you don't need to run your own node and can use something like a public blockchain explorer. The downside is you now need to trust the explorer to a) not give you false data, b) maintain good uptime, and c) not change their API all of a sudden.

See also How to list transactions from account address? . [1]: https://www.quora.com/How-do-I-create-a-new-account-with-Nethereum [2]: https://en.wikipedia.org/wiki/Exponential_backoff [3]: https://en.wikipedia.org/wiki/Replication_(computing)

You can do something similar to what you're doing with Bitcoin, but with Ethereum. The simplest way may be to run your own Ethereum node (since you don't want to use external services). From here, you can generate an account/address on-demand. For example, you can do this from the geth console using [personal.newAccount("passphrase")][1] or with [nethereum][1]. You can then poll the account balances until the desired amount is received (you might want to use a back-off algorithm [like this][2] or simply put a deadline for payment receipt) and then do the rest of your backend stuff to fulfill the order. If you accept payments this way, you can easily send the received amount into a master account. The downside to this is, unless you have [replication][3], if your backend system goes down, you might lose the private keys for the accounts you just created. Also, hot wallets are involved, so theft is made easier (but if someone can compromise the backend, they can just have payments sent to their own accounts, anyway).

You can avoid this by pre-generating a set of accounts, as you suggested, using an automated method as described above. You are still able to check the balances of the accounts for payment purposes, but you won't be able to sweep the ether automatically. Instead of using a plain account, you could potentially create a contract to do that automatically, but would need to spend more gas (either you or your clients). If you use this method, you don't need to run your own node and can use something like a public blockchain explorer. The downside is you now need to trust the explorer to a) not give you false data, b) maintain good uptime, and c) not change their API all of a sudden.

See also How to list transactions from account address? . [1]: https://www.quora.com/How-do-I-create-a-new-account-with-Nethereum [2]: https://en.wikipedia.org/wiki/Exponential_backoff [3]: https://en.wikipedia.org/wiki/Replication_(computing)

You can do something similar to what you're doing with Bitcoin, but with Ethereum. The simplest way may be to run your own Ethereum node (since you don't want to use external services). From here, you can generate an account/address on-demand. For example, you can do this from the geth console using [personal.newAccount("passphrase")][1] or with nethereum. You can then poll the account balances until the desired amount is received (you might want to use a back-off algorithm like this or simply put a deadline for payment receipt) and then do the rest of your backend stuff to fulfill the order. If you accept payments this way, you can easily send the received amount into a master account. The downside to this is, unless you have replication, if your backend system goes down, you might lose the private keys for the accounts you just created. Also, hot wallets are involved, so theft is made easier (but if someone can compromise the backend, they can just have payments sent to their own accounts, anyway).

You can avoid this by pre-generating a set of accounts, as you suggested, using an automated method as described above. You are still able to check the balances of the accounts for payment purposes, but you won't be able to sweep the ether automatically. Instead of using a plain account, you could potentially create a contract to do that automatically, but would need to spend more gas (either you or your clients). If you use this method, you don't need to run your own node and can use something like a public blockchain explorer. The downside is you now need to trust the explorer to a) not give you false data, b) maintain good uptime, and c) not change their API all of a sudden.

See also How to list transactions from account address? .

Source Link
lungj
  • 6.7k
  • 2
  • 18
  • 45

You can do something similar to what you're doing with Bitcoin, but with Ethereum. The simplest way may be to run your own Ethereum node (since you don't want to use external services). From here, you can generate an account/address on-demand. For example, you can do this from the geth console using [personal.newAccount("passphrase")][1] or with [nethereum][1]. You can then poll the account balances until the desired amount is received (you might want to use a back-off algorithm [like this][2] or simply put a deadline for payment receipt) and then do the rest of your backend stuff to fulfill the order. If you accept payments this way, you can easily send the received amount into a master account. The downside to this is, unless you have [replication][3], if your backend system goes down, you might lose the private keys for the accounts you just created. Also, hot wallets are involved, so theft is made easier (but if someone can compromise the backend, they can just have payments sent to their own accounts, anyway).

You can avoid this by pre-generating a set of accounts, as you suggested, using an automated method as described above. You are still able to check the balances of the accounts for payment purposes, but you won't be able to sweep the ether automatically. Instead of using a plain account, you could potentially create a contract to do that automatically, but would need to spend more gas (either you or your clients). If you use this method, you don't need to run your own node and can use something like a public blockchain explorer. The downside is you now need to trust the explorer to a) not give you false data, b) maintain good uptime, and c) not change their API all of a sudden.

See also How to list transactions from account address? . [1]: https://www.quora.com/How-do-I-create-a-new-account-with-Nethereum [2]: https://en.wikipedia.org/wiki/Exponential_backoff [3]: https://en.wikipedia.org/wiki/Replication_(computing)