4

I would like to create a contract that shares mining rewards between multiple accounts.

Can I set this contract address as the target address when running eth-proxy ?

1 Answer 1

5

If you are mining on a pool, unless the pool clearly states that you can because they make sure to send enough gas, you can't redirect reward to a contract without risking to loose it if the transaction runs out of gas. The reward would then be returned to the pool and you couldn't get it back.

A contract address is the same as a regular address in terms of the 0x.... goes. I know that for sending transactions, sending to a contract requires a bit more gas than sending to a standard account. The amount of gas depends on the contract itself.

For solo mining, there is no reason sending to a contract would be any different than an account as mining rewards are not deposited via a transaction like they are in bitcoin, they just appear in the account as part of the state transition in that block. (Thanks to Tjaden Hess for this last bit!)

Here is some additional information / sources:

Receiving Mining Rewards

If solo mining, you can use either Account or Contract Wallet as your Etherbase account to receive mining rewards. Apparently the protocol “pays no gas”!

When mining through a pool, it is once again safer to use an Account to receive your reward as the pool operator may not specify enough gas to cover sending to a Contract Wallet.

Stephan Tual also says "yes" here.

5
  • 1
    Yes, you're correct. Mining rewards are not deposited via a transaction like they are in bitcoin, they just appear in the account as part of the state transition in that block Commented May 4, 2016 at 2:43
  • I'm confused because you say yes and then quote "When mining through a pool, it is once again safer to use an Account to receive your reward as the pool operator may not specify enough gas to cover sending to a Contract Wallet." which for me is a no. Commented May 4, 2016 at 6:01
  • 1
    The difference is that with a pool you are relying on the pool to pass along the ETH via a standard transaction. Since contracts take more gas, it may run into an 'out of gas' exception (although some pools may support it or send more gas). The mining rewards can be delivered directly to a contract, but the mining pool / operator might screw it up. It sounds like OP would be collecting mining rewards directly, not via a pool.
    – tayvano
    Commented May 4, 2016 at 6:05
  • OK, so if the pool doesn't clearly state that you could point to a contract, you can't. Commented May 4, 2016 at 14:21
  • I also asked directly by making a ticket on Ethermine support site and the answer is "yes but please keep in mind that if the contract sends the funds back for whatever reason they will be sent back to the pool's account and we will be unable to do any automatic refunds." Commented May 6, 2016 at 17:42

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.