Double Bitcoin spending that never happened

Interest in Bitcoin “double spending” grew after recent news that the Bitcoin network had processed the same bitcoin (BTC) in two transactions – Bitcoin’s very “double spend” scenario was designed to stop it.

Except the double spending didn’t happen, at least not in the traditional sense.

“Investors have been shocked by bitcoin’s ‘double spend’ media headline, but it’s a misunderstanding of how the Bitcoin network operates. In this case, a chain reorganization of one block occurred, which is quite a common occurrence, ”Jason Lau, COO of OKCoin exchange, told CoinDesk.

Put another way, no bitcoin was “spent twice” because no new coins were added to Bitcoin’s supply. Instead, the same coins from the same wallet were registered in two different blocks during a typical partition in the Bitcoin blockchain.

The reason this doesn’t qualify as double spending is because only one of these transactions (the one recorded on Bitcoin’s longest blockchain history) is considered valid by the network while the bitcoin cannot be spent in the other transaction because the network does not consider it to be valid.

What is Bitcoin Block Reorganization?

Due to the highly classified and competitive nature of Bitcoin mining, mining mines periodically dig the same block at the same time and thus cause a split in the blockchain’s history. When this happens, miners add to both blocks until one history wins out over the other.

Let’s say, for example, mine mine A and mine mine B dig block simultaneously, resulting in two different blockchain histories (versions A and B). Going forward, all other miners have to choose which version of the chain to build on. Let’s say the miner who finds the next block in the sequence chooses to build on version A, but then the next two or three or more miners decide to build on version B. Version B eventually wins out as more miners choose to mine that transaction history.

The other history has been excused from the network and is considered irrelevant and any blocks that are dug on it become outdated.

This was the case in block 666,833, where two blocks were spawned by separate mining pits and one block reorganization occurred, as described by Lau. The above scenario is why Satoshi Nakamoto stated in the white paper that a transaction should only be considered final after six confirmations (ie, six new blocks are being excavated on the chain that has recorded the transaction).

No, double spending never really happened

The assumed double spend became first news yesterday after BitMex Research reported block 666,833’s abnormalities on Twitter. The reorganization meant that an “old block” (also known as an “orphan block”) was excavated that included bitcoin also spent on a valid Bitcoin chain, so a transaction involving the same bitcoin was entered on the chains relevant and irrelevant.

What BitMEX research initially called a “double spend scenario” now look like a perfect storm caused by the one block reorg and a fee replacement transaction. An RBF transaction occurs when you tell your wallet to send the same bitcoin again but with a higher fee, with the hopes that it will be confirmed before the lower fee transaction.

This is what really happened

It went down like this: Someone sent 0.00062063 BTC to this address but set the lowest possible fee (1 satoshi per byte, or less than a fraction of a percentage, per byte of transaction data).

As the fee was so low, the transaction took some time to confirm, so the sender tried to defeat it by sending what is known as a “fee transaction instead of a fee” (RBF).

Instead of the RBF replacing the slow transaction as planned, however, the transaction first cleared a lower fee and made it into the block that was mined on the longest chain.

Meanwhile, the higher fees transaction found its way onto the vintage block. End result: 0.00062063 BTC is recorded as existing at address 1D6aebVY5DbS1v7rNTnX2xeYcfWM3os1va on the irrelevant transaction history while 0.00014499 BTC exists at the same address but on the relevant transaction ledger.

Conflict transaction flowchart, adapted by BitMex Research from image originally produced by 0xB10C
(BitMEX Research)

Importance of 6 affirmations

Technically, the same bitcoin was spent twice in this scenario. But one transaction was doubly spent in reference on a transaction history that the Bitcoin network does not consider valid (if you query the transaction ID for the “lost” transaction in any Bitcoin block explorer, for example, nothing arises).

“It’s kinda double spending but not really. Double spending usually refers to when you intentionally replace a transaction that sends money to someone with one that sends it to your own wallet, ”said Ben Carman, contributor and developer of Bitcoin Core at Suredbits, told CoinDesk.

In this scenario, “the important thing to know is, yes, there may be different versions of the same transaction, but only [one] eventually accepted ”by Bitcoin network nodes and users, Bitcoin Metrics Coin network data analyst Lucas Nuzzi he wrote on Twitter.

Double spending usually involves a sender cheating a recipient to accept a transaction that the sender sends to himself as well. This is why it is considered best practice for traders to wait for six confirmations before a payment is finally considered to avoid an outcome such as this one.

As CoinMetric co-founder and CoinDesk columnist Nic Carter opined on Twitter, what happened yesterday was actually pretty pedestrian to Bitcoin, let alone something Satoshi Nakamoto describes in the white paper itself.

Source