0

This 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?

1 Answer 1

4

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.

3
  • 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
    Commented Jun 29, 2021 at 17:24
  • @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
    Commented Jun 29, 2021 at 19:38
  • 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
    Commented Jun 29, 2021 at 22:12

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.