<p>You're not wrong. </p>

<p>A miner with more than 51% of the network's mining power can build the longest chain by himself, thus reaping all block rewards and dictating which transactions make it into the longest blockchain, allowing him to doublespend at will. Also see: <a href="https://bitcoin.stackexchange.com/q/658/5406">What can an attacker with 51% of hash power do?</a></p>

<p>There can only be one valid block at each height, so when the attacker broadcasts his longer chain, it replaces the blocks of the honest node exclusively up to the common ancestor.<br>
The mining reward from the honest blocks which are now not part of this longest chain will be treated as if they had never been found, as they do not represent valid blocks in the longest chain.</p>

<p>However, the malicious node's contrarian position will slow down the number of blocks found to a respective amount due to the reduced mining power supporting the longest chain (assuming he is trying to catch-up).</p>

<p>By playing selfishly, he will be in control short-term, still get only 51% of the rewards (at least until the difficulty reset), and shake the trust in Bitcoin, thus eroding the value of his bitcoins.</p>

<p>By playing cooperatively, he would gain 51% of the blocks and increase trust in the system, thus making his bitcoins more valuable.</p>

CC BY-SA 3.0
2015-06-08T15:23:33.747Z
2015-06-09T16:30:23.973Z
2017-04-13T12:47:34.187Z
Murch
<blockquote>
  <p>Now where is the honest node's coinbase transaction (25 BTC +
  Transaction Fee). Is it included in the hacker's malicious blocks?</p>
</blockquote>

<p>No, the honest node's coinbase transaction is included in its block. <a href="https://bitcoin.org/en/developer-guide#transaction-data" rel="nofollow">A coinbase transaction is always the first transaction inside a block</a>. </p>

<p>I think by asking <em>where is ...</em> you are actually wondering about <em>who will possess coinbase transaction</em>!? If so, you should remember that the coinbase transaction/block reward will be paid to the miner of the block (including coinbase transaction) after this block is buried under 100 valid blocks <strong>ONLY</strong> if those 100 blocks end up in the main blockchain!</p>

<blockquote>
  <p>However, a block must have 100 confirmations before that reward can be
  spent, so we generate 101 blocks to get access to the coinbase
  transaction from block #1.</p>
</blockquote>

<p>from <a href="https://bitcoin.org/en/developer-examples#regtest-mode" rel="nofollow">Bitcoin Developer Examples</a></p>

CC BY-SA 3.0
2015-06-08T15:05:51.453Z
Thanks for this quick response. A attacker broadcasts its malicious blocks. Now everyone will follow the attacker's blocks. Eventually the attacker will get the Coinbase reward. Right? Why does Satoshi said an attacker can EITHER <stealing back his payments> OR <generate new coins>. I think an attack can do both.
moshaholo
CC BY-SA 3.0
2015-06-08T15:13:58.230Z
You're welcome, in your scenario we assume: honest node mines block#1 and attackers mine block#2 up to block#101: At this point of time, the coinbase transaction from block#1 "matures" and is still paid to the honest node! Now if we go further and assume everyone accepts attacker's blocks and builds up on attacker's chain then with block#102 (doesn't make a difference if mined by honest or malicious node!) the coinbase transaction from block#2 is paid to it's miner, in this case to attacker, and with block#103 the coinbase tx of block#3 will be paid to it's miner and so on.
Aliakbar Ahmadi
CC BY-SA 3.0
2015-06-08T15:18:12.577Z
Why did Satoshi say an attacker can EITHER <stealing back his payments> OR <generate new coins>. However, I think an attack can do both.
moshaholo
CC BY-SA 3.0
2015-06-08T15:21:21.797Z
can you please provide sources?
Aliakbar Ahmadi
CC BY-SA 3.0
2015-06-08T15:22:39.290Z
Sure:) https://bitcoin.org/bitcoin.pdf "If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins
"
moshaholo
CC BY-SA 3.0
2015-06-08T15:36:04.367Z
1) _stealing back his payments_: this is called [double-spending](https://bitcoin.org/en/glossary/double-spend) 2)_generate new coins_: you can only **generate** coins (out of nothing) only if you succeed in mining a block! So it simply says a malicious node can get paid coinbase transactions from block he mined himself if he can achieve to maintain its blockchain, i.e. if either he mines blocks that are accepted by the majority or if others build up on his blockchain!
Aliakbar Ahmadi
CC BY-SA 3.0
2015-06-08T16:05:51.997Z
Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/24588/discussion-between-aliakbar-ahmadi-and-moshaholo).
Aliakbar Ahmadi
CC BY-SA 3.0
2015-06-08T14:55:59.603Z
2015-06-08T15:05:05.713Z
2015-06-08T15:05:05.713Z
Aliakbar Ahmadi
<p>Here is the scenario: </p>

<ol> Honest nodes build one block from Block_1. </ol>

<ol> Hacker nodes privately build four blocks from Block_1 and broadcast these malicious blocks. </ol>

<p>Now, where is the honest node's coinbase transaction (25 BTC + Transaction Fee). Is it included in the hacker's malicious blocks? <br></p>

<p>In Satoshi's white paper, he mentioned: </p>

<blockquote>
  <p>If a greedy attacker is able to assemble more CPU power than all the
  honest nodes, he would have to choose between using it to defraud
  people by <strong><em>stealing back his payments</em></strong>, or using it to <strong><em>generate new coins</em></strong></p>
</blockquote>

<p>I think a hack with more than 50% power could do BOTH, <strong><em>stealing back his payments</em></strong> and <strong><em>generate new coins</em></strong>. Why am I wrong?</p>

CC BY-SA 3.0
2015-06-08T15:19:26.193Z
related: [What can an attacker with 51% of hash power do?](http://bitcoin.stackexchange.com/q/658/5406)
Murch
<doublespend><coinbase-transaction><majority-attack>
Where is coinbase transaction after a hacker successfully performs >50% attack?
moshaholo
# Where is coinbase transaction after a hacker successfully performs >50% attack?

(Asked by: username_0 on 2015-06-08)

Here is the scenario:

Honest nodes build one block from Block\_1.

Hacker nodes privately build four blocks from Block\_1 and broadcast these malicious blocks.

Now, where is the honest node's coinbase transaction (25 BTC + Transaction Fee). Is it included in the hacker's malicious blocks?

In Satoshi's white paper, he mentioned:

> If a greedy attacker is able to assemble more CPU power than all the
> honest nodes, he would have to choose between using it to defraud
> people by ***stealing back his payments***, or using it to ***generate new coins***

I think a hack with more than 50% power could do BOTH, ***stealing back his payments*** and ***generate new coins***. Why am I wrong?

**Tags:** doublespend, coinbase-transaction, majority-attack

> **Comments:**
> **username_1**: related: [What can an attacker with 51% of hash power do?](http://bitcoin.stackexchange.com/q/658/5406)  

---

## 2 answers

### Answer by username_1 on 2015-06-08. Score: 3 | Accepted answer

You're not wrong.

A miner with more than 51% of the network's mining power can build the longest chain by himself, thus reaping all block rewards and dictating which transactions make it into the longest blockchain, allowing him to doublespend at will. Also see: [What can an attacker with 51% of hash power do?](https://bitcoin.stackexchange.com/q/658/5406)

There can only be one valid block at each height, so when the attacker broadcasts his longer chain, it replaces the blocks of the honest node exclusively up to the common ancestor.  
The mining reward from the honest blocks which are now not part of this longest chain will be treated as if they had never been found, as they do not represent valid blocks in the longest chain.

However, the malicious node's contrarian position will slow down the number of blocks found to a respective amount due to the reduced mining power supporting the longest chain (assuming he is trying to catch-up).

By playing selfishly, he will be in control short-term, still get only 51% of the rewards (at least until the difficulty reset), and shake the trust in Bitcoin, thus eroding the value of his bitcoins.

By playing cooperatively, he would gain 51% of the blocks and increase trust in the system, thus making his bitcoins more valuable.


---

### Answer by username_2 on 2015-06-08. Score: 2

> Now where is the honest node's coinbase transaction (25 BTC +
> Transaction Fee). Is it included in the hacker's malicious blocks?

No, the honest node's coinbase transaction is included in its block. [A coinbase transaction is always the first transaction inside a block](https://bitcoin.org/en/developer-guide#transaction-data).

I think by asking *where is ...* you are actually wondering about *who will possess coinbase transaction*!? If so, you should remember that the coinbase transaction/block reward will be paid to the miner of the block (including coinbase transaction) after this block is buried under 100 valid blocks **ONLY** if those 100 blocks end up in the main blockchain!

> However, a block must have 100 confirmations before that reward can be
> spent, so we generate 101 blocks to get access to the coinbase
> transaction from block #1.

from [Bitcoin Developer Examples](https://bitcoin.org/en/developer-examples#regtest-mode)

> **Comments:**
> **username_0**: Thanks for this quick response. A attacker broadcasts its malicious blocks. Now everyone will follow the attacker's blocks. Eventually the attacker will get the Coinbase reward. Right? Why does Satoshi said an attacker can EITHER <stealing back his payments> OR <generate new coins>. I think an attack can do both.  
> **username_2**: You're welcome, in your scenario we assume: honest node mines block#1 and attackers mine block#2 up to block#101: At this point of time, the coinbase transaction from block#1 "matures" and is still paid to the honest node! Now if we go further and assume everyone accepts attacker's blocks and builds up on attacker's chain then with block#102 (doesn't make a difference if mined by honest or malicious node!) the coinbase transaction from block#2 is paid to it's miner, in this case to attacker, and with block#103 the coinbase tx of block#3 will be paid to it's miner and so on.  
> **username_0**: Why did Satoshi say an attacker can EITHER <stealing back his payments> OR <generate new coins>. However, I think an attack can do both.  
> **username_2**: can you please provide sources?  
> **username_0**: Sure:) https://bitcoin.org/bitcoin.pdf "If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins "  
> **username_2**: 1) _stealing back his payments_: this is called [double-spending](https://bitcoin.org/en/glossary/double-spend) 2)_generate new coins_: you can only **generate** coins (out of nothing) only if you succeed in mining a block! So it simply says a malicious node can get paid coinbase transactions from block he mined himself if he can achieve to maintain its blockchain, i.e. if either he mines blocks that are accepted by the majority or if others build up on his blockchain!  
> **username_2**: Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/24588/discussion-between-username_2-and-username_0).  

---

