How do I detect a double-spend in real-time, like Bitpay?

1

By Bitpay to pay only take 10 seconds to complete.

How do they do it?

J.Lee

Posted 2015-08-15T03:17:56.823

Reputation: 13

Answers

0

If you want to detect a double spend, you need to listen to all transactions broadcasted to the network, and write some code to detect if the address that sent you Bitcoins also sends a transaction to another address (until 1+ confirmations).

To answer your other question, Bitpay cannot guarantee the transactions not to be double spent. In an effort to promote usage of Bitcoin as a payment solution, they take on the risk of a potential double spend, and if one happens, they eat the balance (no risk to the merchant). This is a vanishingly small occurrence in practice, so any fees (or venture capital) paid to them more than cover that possibility.

LivingInformation

Posted 2015-08-15T03:17:56.823

Reputation: 263