<p>If a node receives a transactions it saves it. If you now send another transaction with the same input it rejects it, because there is already a transaction. So you cant double-spend this way. </p>

<p>If you would send the second transaction with fees to a miner which does not received your first transaction, he would perhaps include it faster and therefore it would override the first transactions, still the first transactions cant be included in a new block because the output was already used.</p>

<p>If a merchant accepts 0-confirmation transactions, he has to accept that the transaction can be reversed. So he only should do that if he trusts you for more than the amount you transferred to him. </p>

CC BY-SA 3.0
2014-06-12T05:54:10.267Z
2014-06-12T05:54:10.267Z
Dennis Kriechel
<p>The original design assumes a common behavior of processing the incoming transaction on <strong>FIFO basis</strong>. That means the first transaction received by a miner wins and all conflicting transactions received after it will be ignored (no matter if the first one is already confirmed or not).</p>

<p>While this <strong>standard behavior</strong> is beneficial for the Network as a whole, some <strong><em>"smart"</em></strong> miners might employ a bit different approach: when building a block, always take the transaction with the highest fee, no matter the order in which it was received.</p>

<p>It might seem this is just a marginal misuse of the protocol and there won't be enough <strong><em>rogue miners</em></strong> doing this, so it doesn't matter. Well, unfortunately, there already is (at least) <a href="http://www.bitundo.com/" rel="nofollow">one mining pool</a> that tries to build its business exploiting this idea. Should it prevail, services accepting zero-confirmation transactions will need to reconsider their policy.</p>

CC BY-SA 3.0
2014-07-07T07:21:25.593Z
Great answer, except for one thing: It doesn't need a lot of 'rogue miners' for this to become a problem. Even if it is just 5% of miners who do it, this could make accepting zero-confirmation transactions impossible.

Here is how it would work:
I spend 100 mBTC on a dinner in a regular transaction that the restaurant accept with no confirmations.
I send another transaction returning 90 mBTC of the inputs to myself and paying 10 mBTC as a miner's fee.
There is no risk for me! Worst case I paid for what I spent anyway. But with x% chance, I only have to pay 10% of the dinner!
Brian Fabian Crain
CC BY-SA 3.0
2014-07-08T17:05:21.927Z
Sure, the phrasing "enough rogue miners" was in no way meant as a majority, but more like "enough for the chance being noticeable". 5% is a big number already. Anyway, it only highlights the risk in accepting zero-confirmation transactions if you cannot reclaim the service IRL. In your example with the restaurant, this could be considered as leaving-without-paying, which is already a risk anyway - and there are some ways to deal with this (including police). So, just be sure you consider the whole social aspect when evaluating your risk.
knaperek
CC BY-SA 3.0
2015-07-15T08:59:17.367Z
From what I read, we've reached the point where zero-confirmation is no longer viable. If you are still in the loop on the topic, you could perhaps update your excellent answer. :)
Murch
CC BY-SA 3.0
2016-11-28T13:34:04.647Z
Are you sure? I'm not aware about any significant situation change in the recent years; it is still possible to accept payments immediately when the transaction is spotted, especially with some reclaimable online services and it can be OK as long as it is taken into consideration and measures are implemented to further ensure the transaction gets confirmed properly.
knaperek
CC BY-SA 3.0
2014-06-12T15:52:28.403Z
2014-06-12T15:52:28.403Z
knaperek
<p>I realize that if somebody makes a transaction without any fees and there have not yet been any confirmations, then the transaction could be double spent by just spending the same inputs to a different address, but with a standard fee. </p>

<p>My question is, if somebody sends a transaction with a standard fee, and there have yet to be any confirmations, could that transaction be just as easily overridden by rewriting the transaction, but with a higher fee? If so, what would be the implications for a party that accepts zero confirmation transactions such as BitPay?</p>

<transaction-fees><doublespend><zero-confirmation>
Could any standard fee transaction be double spent by using a higher fee?
DJG
# Could any standard fee transaction be double spent by using a higher fee?

(Asked by: username_0 on 2014-06-12)

I realize that if somebody makes a transaction without any fees and there have not yet been any confirmations, then the transaction could be double spent by just spending the same inputs to a different address, but with a standard fee.

My question is, if somebody sends a transaction with a standard fee, and there have yet to be any confirmations, could that transaction be just as easily overridden by rewriting the transaction, but with a higher fee? If so, what would be the implications for a party that accepts zero confirmation transactions such as BitPay?

**Tags:** transaction-fees, doublespend, zero-confirmation


---

## 2 answers

### Answer by username_2 on 2014-06-12. Score: 5 | Accepted answer

The original design assumes a common behavior of processing the incoming transaction on **FIFO basis**. That means the first transaction received by a miner wins and all conflicting transactions received after it will be ignored (no matter if the first one is already confirmed or not).

While this **standard behavior** is beneficial for the Network as a whole, some ***"smart"*** miners might employ a bit different approach: when building a block, always take the transaction with the highest fee, no matter the order in which it was received.

It might seem this is just a marginal misuse of the protocol and there won't be enough ***rogue miners*** doing this, so it doesn't matter. Well, unfortunately, there already is (at least) [one mining pool](http://www.bitundo.com/) that tries to build its business exploiting this idea. Should it prevail, services accepting zero-confirmation transactions will need to reconsider their policy.

> **Comments:**
> **username_3**: Great answer, except for one thing: It doesn't need a lot of 'rogue miners' for this to become a problem. Even if it is just 5% of miners who do it, this could make accepting zero-confirmation transactions impossible.  Here is how it would work: I spend 100 mBTC on a dinner in a regular transaction that the restaurant accept with no confirmations. I send another transaction returning 90 mBTC of the inputs to myself and paying 10 mBTC as a miner's fee. There is no risk for me! Worst case I paid for what I spent anyway. But with x% chance, I only have to pay 10% of the dinner!  
> **username_2**: Sure, the phrasing "enough rogue miners" was in no way meant as a majority, but more like "enough for the chance being noticeable". 5% is a big number already. Anyway, it only highlights the risk in accepting zero-confirmation transactions if you cannot reclaim the service IRL. In your example with the restaurant, this could be considered as leaving-without-paying, which is already a risk anyway - and there are some ways to deal with this (including police). So, just be sure you consider the whole social aspect when evaluating your risk.  
> **username_4**: From what I read, we've reached the point where zero-confirmation is no longer viable. If you are still in the loop on the topic, you could perhaps update your excellent answer. :)  
> **username_2**: Are you sure? I'm not aware about any significant situation change in the recent years; it is still possible to accept payments immediately when the transaction is spotted, especially with some reclaimable online services and it can be OK as long as it is taken into consideration and measures are implemented to further ensure the transaction gets confirmed properly.  

---

### Answer by username_1 on 2014-06-12. Score: 1

If a node receives a transactions it saves it. If you now send another transaction with the same input it rejects it, because there is already a transaction. So you cant double-spend this way.

If you would send the second transaction with fees to a miner which does not received your first transaction, he would perhaps include it faster and therefore it would override the first transactions, still the first transactions cant be included in a new block because the output was already used.

If a merchant accepts 0-confirmation transactions, he has to accept that the transaction can be reversed. So he only should do that if he trusts you for more than the amount you transferred to him.


---

