This is a quote from the book "On Zero Confirmation Transactions" by Chris Pacia
...w to double spend
read full book
Double spending an unconfirmed Bitcoin transaction is actually rather easy for people with the technical ability. The easiest way is to create two transactions
which spend the same Bitcoins. The first transaction sends the coins to the merchant, while the second sends the coins back to yourself. The trick here is you need to make sure the merchant see
s the legitimate transaction first and the double spend second (or preferably not at all), while ensuring the mining pools see the double spend first and the legitimate transaction second. Given...