This is a quote from the book "On Zero Confirmation Transactions" by Chris Pacia
...ginning of Bitcoin through today) has been programmed to accept the first transaction it sees as valid and reject subsequent double spends. If you wait until you are in your car driving away wit h the merchandise to broadcast the double spend, all miners will reject it.

But here’s where things start to break down. While every miner is programmed to use this “first-seen�
�� policy, technically there is nothing forcing them to do so. In theory, a miner could patch their code to implement some other policy and in practice some have.

Consider the case ...
read full book block explorer