Demo: Confirmations

Let’s say that k in this case is equal to 2 confirmations.

In other words, Rustie will assume that the transaction is finalized after 2 confirmations.

I publish my transaction to Rustie, and it has been included within a block.

One confirmation….

Two confirmations.

Rustie notices the two confirmations and feels confident about the transaction’s finality.

He now sends me the iPhone so as not to keep me waiting.

But that was exactly what I was expecting.

This whole time, I was mining on a private chain which I did not reveal to the rest of the network.

This chain contains a transaction from the same UTXO, to a different address which I also control.

This transaction from me to myself is to make sure that the transaction from me to Rustie is forever invalid and can never be republished.

This is because once the network accepts the transaction from me to myself, the corresponding UTXO is used up, and since both this transaction as well as the transaction from me to Rustie spend from the same UTXO, this then invalidates the transaction from me to Rustie.

When I broadcast my chain, the rest of the network accepts my chain over the previous chain because it’s longer.

Because of this, the entire chain of blocks, containing the transaction from me to Rustie, and onward is invalidated.

The rest of the network will continue mining on my chain, meaning that I will have received Rustie’s iPhone while still keeping my own money.

Hooray! I have successfully double spent! However, notice that my double spending of Rustie relied on my ability to produce a longer chain than the honest network.

You might be wondering: what is the probability of me being able to produce a chain longer than the rest of the network? Well, we’ll see right away how that’s possible.

Probability Analysis