<p>The payout address that subsidy/fees are sent to is part of the block itself. The very first transaction in every block is called the coinbase transaction. This coinbase transaction has no inputs (it implicitly receives the subsidy and fees of the block) and its outputs define where these new coins are sent to.</p>
<p>So the answer is simply: the rewards are sent wherever the block says they go. This has to be decided before <code>submitblock</code> is invoked. In fact, it has to be decided before mining can even start: as the coinbase is part of the block, modifying it would invalidate the block's proof of work. This also prevents other parties on the network from changing the block to pay them instead.</p>

CC BY-SA 4.0
2022-09-16T17:23:52.647Z
Ok, thank you. But it's not very clear to me. If I use bitcoin-cli with the submitblock function, how can I specify my wallet address for receiving the rewards if the block is ok ?
Invest Data Systems FR
CC BY-SA 4.0
2022-09-16T17:38:39.447Z
You can't specify it. It's something you have decided *before you started mining*. The mining software and/or hardware you used to build the block needs to be aware of the payout address.
Pieter Wuille
CC BY-SA 4.0
2022-09-16T19:37:15.960Z
@InvestDataSystemsFR If you could specify the wallet address *after* making the block, what would stop someone from taking your block after you submitted it and changing the reward address?
David Schwartz
CC BY-SA 4.0
2022-09-16T20:41:11.610Z
Ok, so if I understand well, the reward bitcoin wallet address is in the data submitted with submitblock (coded in the block sent), isn't it ?
Invest Data Systems FR
CC BY-SA 4.0
2022-09-16T21:41:34.627Z
Yes, that's correct. The block you submit already has its own payout encoded in it. It's added there by the software you used to mine it in the first place.
Pieter Wuille
CC BY-SA 4.0
2022-09-17T19:25:03.717Z
Thank you very much ! I'll try to find some pieces of source code that can do that ;)
Invest Data Systems FR
CC BY-SA 4.0
2022-09-16T14:01:41.543Z
2022-09-16T14:27:18.597Z
2022-09-16T14:27:18.597Z
Pieter Wuille
<p>Where are the rewards sent when using the <code>submitblock</code> function in the case the block is okay?</p>

<mining-reward>
Where are rewards sent when using `bitcoind submitblock N`?
Invest Data Systems FR
# Where are rewards sent when using `bitcoind submitblock N`?

(Asked by: username_0 on 2022-09-16)

Where are the rewards sent when using the `submitblock` function in the case the block is okay?

**Tags:** mining-reward


---

## 1 answers

### Answer by username_1 on 2022-09-16. Score: 5 | Accepted answer

The payout address that subsidy/fees are sent to is part of the block itself. The very first transaction in every block is called the coinbase transaction. This coinbase transaction has no inputs (it implicitly receives the subsidy and fees of the block) and its outputs define where these new coins are sent to.

So the answer is simply: the rewards are sent wherever the block says they go. This has to be decided before `submitblock` is invoked. In fact, it has to be decided before mining can even start: as the coinbase is part of the block, modifying it would invalidate the block's proof of work. This also prevents other parties on the network from changing the block to pay them instead.

> **Comments:**
> **username_0**: Ok, thank you. But it's not very clear to me. If I use bitcoin-cli with the submitblock function, how can I specify my wallet address for receiving the rewards if the block is ok ?  
> **username_1**: You can't specify it. It's something you have decided *before you started mining*. The mining software and/or hardware you used to build the block needs to be aware of the payout address.  
> **username_2**: @username_0 If you could specify the wallet address *after* making the block, what would stop someone from taking your block after you submitted it and changing the reward address?  
> **username_0**: Ok, so if I understand well, the reward bitcoin wallet address is in the data submitted with submitblock (coded in the block sent), isn't it ?  
> **username_1**: Yes, that's correct. The block you submit already has its own payout encoded in it. It's added there by the software you used to mine it in the first place.  
> **username_0**: Thank you very much ! I'll try to find some pieces of source code that can do that ;)  

---

