<blockquote>
<p>When the attacker broadcasts the chain they had been working on in private, will they get mining rewards for all those new blocks after the reorg?</p>
</blockquote>
<p>Yes, the majority attacker can create the longest blockchain entirely on their own. They will create every block in the chain, and thus also create the coinbase transaction in each of those blocks. Presumedly, they would pay the coinbase transaction to an address that they control.</p>

CC BY-SA 4.0
2021-06-29T17:24:02.693Z
Thank you! And the folks who had earned the mining rewards on the prior canonical chain would still keep those rewards? I am sure that is true, but wanted to verify :)
septerr
CC BY-SA 4.0
2021-06-29T19:38:05.553Z
@septerr only blocks that are in the longest chain can possibly pay a block reward. Any blocks that were in the chain originally, but then were reorganized out when the attacking chain was published, would no longer be valid and thus their coinbase UTXOs would not exist on the network. Very old blocks that were no reorg’d out would still be valid though.
chytrik
CC BY-SA 4.0
2021-06-29T22:12:49.457Z
Ahhh! That makes sense, thank you so much!! I did not think of the fact that after the reorg, the coinbase transactions on the old chain are no longer part of the canonical chain. Thanks again!
septerr
CC BY-SA 4.0
2021-06-29T04:15:06.623Z
2021-06-29T04:15:06.623Z
chytrik
<p><a href="https://academy.ivanontech.com/blog/breaking-down-proof-of-work-mining-and-51-attacks" rel="nofollow noreferrer">This</a> article gives an example of a 51% attack in theory as:</p>
<blockquote>
<p>In a 51% attack the hacker will typically mine in private to attain a
longer chain than the publicly seen chain in hopes of double-spending
coins. Cryptocurrency exchanges are often the target of the hack due
to their deep pockets and acceptance of coin deposits and withdrawals.</p>
<p>By having control over more hashpower than anyone else the attacker
has the advantage to find winning blocks faster. If they can mine
selfishly, meaning they secretly mine successful blocks but don’t
broadcast them to the network, they can build up a number of blocks
and when ready broadcast a longer chain of blocks to the network. All
the miners would favor building on the longer chain.</p>
<p>Meanwhile, the attacker would have sent some of the coins they mined
previously to an exchange using the chain that is seen publicly. Once
their deposit is confirmed, the attackers are able to exchange their
mined coins for other coins that they’ll quickly withdraw from the
exchange.</p>
<p>Then, the longer chain that was mined in secret is broadcast to the
network. The longer chain would contain a transaction using the same
coins that were deposited to the exchange.</p>
<p>Now that the miners see the longer chain they will build blocks at the
tip of the longer chain. This has two effects. One, the blocks in the
shorter chain are now orphaned and their transactions dumped back in
the mempool. That means the transaction to the exchange was reversed
like it never happened and the exchange was effectively robbed of the
withdrawn coins. Two, the attacker’s second transaction gets
completed, in effect spending the same coins twice.</p>
</blockquote>
<p>When the attacker broadcasts the chain they had been working on in private, will they get mining rewards for all those new blocks after the reorg?</p>

<majority-attack>
Can a 51% attacker earn mining rewards on the blocks they tampered with?
septerr
# Can a 51% attacker earn mining rewards on the blocks they tampered with?

(Asked by: username_0 on 2021-06-29)

[This](https://academy.ivanontech.com/blog/breaking-down-proof-of-work-mining-and-51-attacks) article gives an example of a 51% attack in theory as:

> In a 51% attack the hacker will typically mine in private to attain a
> longer chain than the publicly seen chain in hopes of double-spending
> coins. Cryptocurrency exchanges are often the target of the hack due
> to their deep pockets and acceptance of coin deposits and withdrawals.
>
> By having control over more hashpower than anyone else the attacker
> has the advantage to find winning blocks faster. If they can mine
> selfishly, meaning they secretly mine successful blocks but don’t
> broadcast them to the network, they can build up a number of blocks
> and when ready broadcast a longer chain of blocks to the network. All
> the miners would favor building on the longer chain.
>
> Meanwhile, the attacker would have sent some of the coins they mined
> previously to an exchange using the chain that is seen publicly. Once
> their deposit is confirmed, the attackers are able to exchange their
> mined coins for other coins that they’ll quickly withdraw from the
> exchange.
>
> Then, the longer chain that was mined in secret is broadcast to the
> network. The longer chain would contain a transaction using the same
> coins that were deposited to the exchange.
>
> Now that the miners see the longer chain they will build blocks at the
> tip of the longer chain. This has two effects. One, the blocks in the
> shorter chain are now orphaned and their transactions dumped back in
> the mempool. That means the transaction to the exchange was reversed
> like it never happened and the exchange was effectively robbed of the
> withdrawn coins. Two, the attacker’s second transaction gets
> completed, in effect spending the same coins twice.

When the attacker broadcasts the chain they had been working on in private, will they get mining rewards for all those new blocks after the reorg?

**Tags:** majority-attack


---

## 1 answers

### Answer by username_1 on 2021-06-29. Score: 4 | Accepted answer

> When the attacker broadcasts the chain they had been working on in private, will they get mining rewards for all those new blocks after the reorg?

Yes, the majority attacker can create the longest blockchain entirely on their own. They will create every block in the chain, and thus also create the coinbase transaction in each of those blocks. Presumedly, they would pay the coinbase transaction to an address that they control.

> **Comments:**
> **username_0**: Thank you! And the folks who had earned the mining rewards on the prior canonical chain would still keep those rewards? I am sure that is true, but wanted to verify :)  
> **username_1**: @username_0 only blocks that are in the longest chain can possibly pay a block reward. Any blocks that were in the chain originally, but then were reorganized out when the attacking chain was published, would no longer be valid and thus their coinbase UTXOs would not exist on the network. Very old blocks that were no reorg’d out would still be valid though.  
> **username_0**: Ahhh! That makes sense, thank you so much!! I did not think of the fact that after the reorg, the coinbase transactions on the old chain are no longer part of the canonical chain. Thanks again!  

---

