In-depth analysis of the Binance theft incident: Block reorganization, the only beneficiaries are miners!

In-depth analysis of the Binance theft incident: Block reorganization, the only beneficiaries are miners!
On May 7, 2019, Binance was hacked and lost 7,000 BTC. Soon after, we saw Jeremy Rubin (Bitcoin core developer) tweet suggesting that Binance CEO Zhao Changpeng use block reorganization to "undo the theft":

Tweet translation: @cz_binance (Changpeng Zhao): If you disclose the private keys of the attacked coins (or part of those keys), you can coordinate a block reorganization (reorg) at zero cost to undo the theft.
This apparently led Binance to consider a block reorganization, which according to Binance CEO Changpeng Zhao was aborted after consultations with some people:



Tweet translation: @cz_binance (Changpeng Zhao): If you disclose the private keys of the attacked coins (or part of those keys), you can coordinate a block reorganization (reorg) at zero cost to undo the theft.



In this article, the author (Jimmy Song) will go into detail about the incentives behind a possible chain reorganization. In a sense, Jimmy Song has already calculated how much it would cost for Binance to reorganize its blocks through a previous tweet:



1/ The cost of reorganizing 58 blocks through mathematical calculation (based on the confirmed hash values ​​of the stolen transactions on Binance that have been obtained so far):


Minimum cost: 58*12.5 BTC = 725 BTC (assuming that each miner receives roughly the same transaction fee on the reorganized new chain, and 100% of miners agree to the reorganization. Note: The current Bitcoin block mining reward is 12.5 BTC)


2/ However, if only 75% of miners agree to the reorganization, it will take an average of 116 blocks (equivalent to the mining rewards that Binance needs to compensate these 75% of miners is about 1,450 BTC, that is, 116*12.5=1,450) to catch up with the current main chain. Similarly, if 60% of miners agree to the reorganization, it will take an average of 290 blocks (the mining rewards that need to be compensated to these miners are 3,625 BTC) to catch up with the current main chain; if 55% of miners agree, it will take 580 blocks (the mining rewards that need to be compensated to these miners are 7,250 BTC).



3/ Since 7,250 BTC > 7,000 BTC, at least 55% of the computing power (miners) must agree to the chain reorganization. If the number of reorganized blocks exceeds 58, at least 60% of the computing power is required; if the number of reorganized blocks is 116, at least 65% of the computing power is required; accordingly, 174 blocks require at least 70% of the computing power, and 232 blocks require at least 75% of the computing power. Assuming that all miners agree to the reorganization, the cost will increase rapidly.



4/ But there is also a great risk for any miner who chooses to reorganize and abandon the original main chain, because this greatly increases the risk of wasting computing power, which could have been effectively used to mine the original longer main chain.



5/ According to the extra fees charged by miners for this risk, the decision to reorganize will be made much shorter than the time it takes for 232 blocks to be generated. If a reorganization occurs, the money will eventually be taken from the hackers to pay the miners. Binance has not benefited much from this.



6/ The minimum loss is still 725 BTC, which is still a significant change.



7/ Binance is squeezed by both time and risk. Every new block is another block that needs to be surpassed, with a minimum cost of 12.5 BTC. It may not be easy to quickly coordinate with existing mining pools (for reorganization). It may take more than a day (144 blocks) to reach an agreement. (Note: The current Bitcoin blockchain generates an average of 1 block every 10 minutes, and 144 blocks in 24 hours).



Below, the author will continue with a more comprehensive discussion of the consequences of restructuring.



Differences

In the tweet below, you can see that Ari Paul (investment director of blockchain investment company BlockTower Capital) and Adam Back (cypherpunk, co-founder of blockchain startup Blockstream) disagree on whether to reorganize:



Adam Black (below) tweet translation: Bitcoin reorg is not going to happen. I doubt that any Bitcoin community, miners or developers would consider a reorg. Think about the $473 million loss suffered by (Mt. Gox) in 2014, the $72 million loss caused by the Bitfinex hack in 2016, and the $40 million loss of Binance in 2019, etc. (Reorg) #none of them happened


Ari Paul (above) Tweet translation: The last idea is inspired by Adam Back (but I disagree with him). Past data is useless here. Incentive realignment is a difficult coordination problem, and fairly simple new technologies may be able to solve it.


Essentially, Adam thinks such a reorganization won’t happen, and Ari thinks the incentives make it possible. So who is right? This is where we need to do some game theory analysis. Let’s start with the most basic scenario:



A simple model



Let’s assume a very simple model where 100% of the hashrate (miners) are willing to help Binance with block reorganization.


This is the easiest scenario to analyze. We assume that Binance has contacted every mining pool (although this is unlikely), and reached an agreement on the compensation amount for each miner (although some miners may agree, others are unlikely to agree), and reached consensus. We assume that no one disagrees at this time (although this is extremely unlikely), and no one will set up a backup mining pool to continue mining the current longer main chain.

First, let’s look at what is a reasonable amount to compensate miners. Assuming a miner has 10% of the network’s computing power, and 100 blocks need to be reorganized after the attack, this means that the miner will have to give up the rewards for the 10 blocks he has mined on the original chain (i.e. 100*10%=10) and the corresponding transaction fees, that is, giving up 125 BTC (i.e. 10*12.5=125) and the corresponding block transaction fees.

(Note: Block reorganization (reorg) is also known as transaction rollback. As long as there is more than 51% computing power, a new fork will be mined before the stolen coin transaction block, and only the stolen transaction (and subsequent transactions) will be removed, and other transactions on the original chain will be packaged normally. Then, when the length of the new fork exceeds the original stolen chain, block reorganization will occur. Reorganization can be simply understood as: the new fork covers the original stolen chain, and the effect is: without affecting other transactions, the stolen coin transaction is rolled back alone.)

You might think that the miner will be able to mine on the reorganized chain and get about 10% of the block rewards, which can offset this, but this is not the case . Because during the period of block reorganization, the miner could have continued to mine on the original main chain with his own computing power and get 10% of the block rewards (and transaction fees), without giving up the rewards (and transaction fees) of the 10 blocks that had been mined on the original chain. This means that the miner will lose at least 125 BTC by helping Binance with block reorganization.

Therefore, the miners who help Binance reorganize will ask Binance to compensate them for the rewards (and transaction fees) of the blocks that these miners have already mined on the original chain. In this scenario, assuming that each block has a fee of 0.5 BTC, a total of 130 BTC (i.e. 125 + 0.5*10=130) needs to be compensated to the miner with 10% of the computing power.

That’s not all! There is also a risk premium in case something goes wrong. If no one else is willing to use Binance’s new reorg chain except this miner with 10% of the hashrate, then that miner’s hashrate is wasted that could have been used to mine the original chain.

If the reorganization effort is unsuccessful, Binance will have to agree to either compensate for this premium risk or take the loss of wasted hashrate. This will be a significant portion of the compensation, but for the sake of keeping this article short and to the point, we will ignore this aspect for now.

Therefore, if Binance starts trying to reorganize 100 blocks after the theft, they will have to pay a cost of 1,300 BTC (i.e. 100*12.5+100*0.5=1,300, where 12.5 is the block reward of the Bitcoin chain and 0.5 is the transaction fee that miners can get after each block is mined) to recover the stolen 7,000 BTC, which means that Binance can recover 5,700 BTC. From Binance's perspective, you can think of this as an ideal scenario because they can recover a large amount of money.

What are the consequences of this scenario? Most obviously, something like this would prove that Bitcoin is centralized, because if Binance can force a reorganization of those 100 blocks, any other sufficiently powerful entity could do the same.

This will lead to many double spending attempts, and anyone who transacted during those 100 blocks will have to scramble to figure out what happened. In fact, there is a chance that a larger double spending problem than the current 7,000 BTC lost could occur through the reorg! This will cause major disruption to everyone transacting on the Bitcoin network, as no one will accept 3-6 confirmations given what Binance could have done.

In other words, exchanges, merchants, and users will have to endure at least a big headache, and at worse, deal with more pain to deal with possible double spending problems.

Wait, we haven’t even talked about what a thief (hacker) would do yet!

Therefore, a restructuring scenario is highly unlikely, as all those who would experience pain in such a scenario would resist it.


A more controversial choice

The reorg will result in a contentious fork and a race to become the longer chain. Having 55% of the hash power to reorg these 100 blocks and overtake the current main chain means that approximately 1,000 blocks need to be mined on the new chain (in this case, 2 weeks). This number can vary quite a bit, and in this scenario, it would not be surprising to need to mine 500 blocks or 1,500 blocks.


Even if you have 99% of the computing power, you still need to mine 101 blocks on the new chain (about 20 hours). (Note: The current Bitcoin chain mines a block every 10 minutes on average, so 101 blocks will take about 20 hours)

In this case, both the original main chain and the reorganized new chain hope to attract each other's miners. The original main chain has an advantage because it is 100 blocks ahead when the competition begins.

The original main chain is supported by many exchanges, merchants, and users who do not want to reorganize these 100 blocks. They are likely to compensate the miners on the original main chain. They can easily compensate the miners: spend a UTXO (unused transaction output) on the original main chain with a high fee, and this UTXO is only valid on the original main chain. If the fee is high enough, many miners will be tempted to switch to mining on the original main chain.

It should be pointed out here that there is a special user on the original main chain - the hacker who launched the attack. He may also initiate similar transactions (UTXO involving stolen transactions) to compensate miners through higher fees on the original main chain.

On the other side of the equation is Binance, which has to contend with all of these exchanges, merchants, and users, not to mention the hackers who launched the attacks.

The hacker has already stolen 7,000 BTC from Binance, so the hacker can use all of this amount to incentivize miners to continue mining on the original main chain and organize block reorganization.

By contrast, Binance would have to spend 1,300 BTC + the amount the hacker was willing to spend to prevent the reorg + the amount other exchanges/merchants/users were willing to spend to prevent the reorg. This is clearly a losing battle. Unless Binance thinks it’s worth spending 1,300 BTC to punish the hacker (or 13 BTC * number of confirmations of the stolen transaction), the reorg is not in Binance’s favor.


Summarize



There are further complications, especially with a lot of offline mining rigs, but all of this is easy to analyze. Hackers can incentivize miners, so it's a losing battle for Binance, which has to bear the cost of reorganizing every block and the funds lost in the theft.


Just like a protracted lawsuit is really only good for the lawyers, the only people who benefit in a block reorganization scheme are the miners. The money went to the miners through controversial transactions (from Binance or hackers). Deep down, this is how the Bitcoin protocol was designed, and it is very expensive to change it.

There is a reason why people don’t attempt reorganizations, even after massive thefts. Reorganizations hurt not only the theft perpetrators, but everyone else as well. There is a huge collective incentive not to change Bitcoin’s transaction history.


Reference Links:


https://medium.com/@jimmysong/reorg-scenarios-binance-hack-edition-849fc7e7df07

Author | Jimmy Song

Compiled by | Jhonny


<<:  Market analysis: BTC fell for the first time this month, and a staged top appeared

>>:  Babbitt In-depth | Revealing the sudden drop in Bitmain’s computing power, 20% to 50% off to clear out S9 and launch 17 series

Recommend

What does the location of the Yin Xi lines mean?

In physiognomy, many lines have their own specifi...

How to read the ring finger of palmistry

The ring finger, called the sun finger in western...

What to do if your nose collapses

What should I do if I have a flat nose? Indeed, a...

What kind of earlobes are good for men?

In physiognomy , ears are called "hearing or...

Palmistry signs of bad luck

A person's temperament and fortune can be see...

Zhang Xinlong: What does a large forehead on a man or woman represent?

Zhang Xinlong: What does a large forehead on a ma...

A mole on the upper right corner of a woman's mouth indicates

In ancient times, the theories on mole physiognom...

Vitalik Buterin: Immutability is worthless in the face of blockchain development

Money 20/20 is considered the highest level event...

Embracing or banning stablecoin regulation is a difficult question

Source: Securities Times Reporter: Wang Junhui Tu...

Short chin features

There is no identical face in the world, not even...