How to track and handle double-spend attacks?

1

  • If a double-spend attack is pulled off, how to manually verify transactions via the bitcoin daemon and how to know how much amount lost? Will the saved transaction hash be re-usable to obtain info about the transactions using gettransaction?

  • Is it possible to pull off the attack after 48 hours?

Alessandro Genovese

Posted 2016-01-18T11:04:43.153

Reputation: 13

1Regarding "48 hours", it's not time that determines that. It's the number of confirmations. If you have one confirmation, 48 hours later you will have about 300 confirmations. Which is not double-spendable anymore with (bordering to) absolute certainty. It's also possible you still have 0 confirmations however, then double spending is likely. Usually 6 confirmations is considered safe. For small amounts in low risk situations 1 confirmation might be good enough.Jannes 2016-01-18T13:31:07.793

Answers

1

You can just wait for enough confirmations. Most wallet and blockchain websites will show you the number of confirmations for a transaction id.

If it is a small transaction (less than 100 Bitcoins) then waiting for 3 confirmations should be enough. 6 confirmations means that roughly 10% of the network has confirmed your transaction and is the ball park used by many cautious services.

Every confirmation takes a minimum of around 10 minutes.

It has happened less than 15 times that transactions with 3-4 confirmations were reversed and it has happened almost 1000 times that transactions with only one confirmation was reversed. (What is the longest blockchain fork that has been orphaned to date?)

So, technically, it's really so difficult to pull off a double spend after 50 minutes, that nobody has ever done it.

If it does happen, the whole transaction basically just "never happened" so the transaction doesn't take place and the whole amount is "lost".

Dagelf

Posted 2016-01-18T11:04:43.153

Reputation: 165

I don't understand what you mean with "6 confirmations means that roughly 10% of the network has confirmed your transaction"?Murch 2016-01-19T09:05:52.133

@dagelf therefore Executing gettransaction on a reversed transaction will return an error?Alessandro Genovese 2016-01-19T15:56:51.757

Gettransaction on a reverted transaction will simply report 0 confirmations.Pieter Wuille 2016-01-20T14:44:29.193