Author

Topic: do miners include first-to-broadcast or highest-fee spends? (Read 1505 times)

hero member
Activity: 756
Merit: 501
There is more to Bitcoin than bitcoins.
Thanks, it all makes sense now. Thread locked!
legendary
Activity: 1596
Merit: 1100
Right, I was only thinking about the time span of one block. In the case of low-risk, low-value transactions (a coffee shop, for example, that wants to immediately accept zero-confirmation transactions): Is it fair to say that the merchant should always be listening for network transactions, and checking for double spends when accepting a payment?

It is highly unlikely that a merchant would ever see a double-spend until it's too late.  The favorite double-spend example involves secretly mining a block containing the second transaction, TX #2, the double spend.  The merchant sees TX #1, hands out the goodies with zero confirmations, and then the evil thief releases his block containing TX #2.

In the other double-spend case, where TX #1 races TX #2 across the network...  Presumably the merchant is well connected to the P2P network, receiving and broadcasting transactions normally.  Any double spend not sent in a block, but rather simply sent out to the network, would probably be rejected by all the merchant's peers.  The merchant would likely never see TX #2.  The moral of the story here is merchants should always be well-connected.

Zero-confirmation transactions are fraught with danger and possible mischief.  We recommend against zero-conf transactions.

It has been shown that even 1-confirmation transactions are within the realm of a determined attacker, so I would never go below 2 confirmations for anything remotely valuable.  But at that point...  if you can wait 20 minutes, surely you can wait 60 minutes for a full 6 confirmations.

The merchant must simply ask themselves about their risk level:  if the transaction is low value, then will an attack cost more than the price of the good being sold (coffee)?  That is a business decision and not a technical decision.  Can you afford the occasional double-spent coffee, in exchange for convenience of zero-confirmation?


hero member
Activity: 756
Merit: 501
There is more to Bitcoin than bitcoins.
Presumably the fees will become the main driving force behind mining in future. Miners would then have an incentive to include in the block the spend with the highest fees, even if it is obviously a double spend against an earlier transaction that is already broadcast.

A double-spend is not relayed by the network, nor accepted by miner.  That economic incentive does exist, though, you are correct.

Also, one a transaction has been placed inside a block ("confirmed"), all nodes will refuse to relay a double-spend transaction for those same funds.



Right, I was only thinking about the time span of one block. In the case of low-risk, low-value transactions (a coffee shop, for example, that wants to immediately accept zero-confirmation transactions): Is it fair to say that the merchant should always be listening for network transactions, and checking for double spends when accepting a payment?
legendary
Activity: 1596
Merit: 1100
Presumably the fees will become the main driving force behind mining in future. Miners would then have an incentive to include in the block the spend with the highest fees, even if it is obviously a double spend against an earlier transaction that is already broadcast.

A double-spend is not relayed by the network, nor accepted by miner.  That economic incentive does exist, though, you are correct.

Also, one a transaction has been placed inside a block ("confirmed"), all nodes will refuse to relay a double-spend transaction for those same funds.

legendary
Activity: 1596
Merit: 1100
I like the attitude of D&T and koin shown above, but the user does not have much control over what nodes relay and accept/refuse their transaction, right? It's the miners that can decide.

Close.

Each node decides what to relay, or not.  Miners have no control over relaying.

As you say, the user does not have control over what nodes relay -- apart from knowing that "standard" transactions are likely to be relayed, and "non-standard" transactions are not likely to be relayed.

Miners do have control over what transactions are placed inside each block, but that is a separate issue from relaying.

legendary
Activity: 1652
Merit: 2301
Chief Scientist
Presumably the fees will become the main driving force behind mining in future. Miners would then have an incentive to include in the block the spend with the highest fees, even if it is obviously a double spend against an earlier transaction that is already broadcast.

Is this correct?

Yes, if by earlier you mean a few minutes earlier (it would have to have a 50+ BTC fee to make it worthwhile for miners to double-spend a transaction that already made it into the last block).

Two zero-confirmation transactions essentially happen at the same time as far as the network is concerned; if there was a good way for everybody to agree that they happened in a particular order we wouldn't need the blockchain. I assume that miners will take the transactions that give them the greatest short-term profit; that may not be correct (there might be a lot of miners interested in the long-term health of Bitcoin), but I think it is the safest assumption. And I think if we design payment protocols around that assumption they will be more secure.
hero member
Activity: 756
Merit: 501
There is more to Bitcoin than bitcoins.
I like the attitude of D&T and koin shown above, but the user does not have much control over what nodes relay and accept/refuse their transaction, right? It's the miners that can decide. Therefore, I don't see how choosing the higher-fee transactions over earlier transactions and ruining their reputations (in my eyes) would hurt them in any way. They can still keep going.

I don't think this is a big problem - a merchant would simply need to wait for one block (instead of waiting a few seconds or minutes nowadays to reduce the probability of simple double-spend (I am talking about small-value transactions, of course)). Still, it's something to consider.
legendary
Activity: 873
Merit: 1000
Miners would then have an incentive to include in the block the spend with the highest fees, even if it is obviously a double spend against an earlier transaction that is already broadcast.

"It takes 20 years to build a reputation and five minutes to ruin it."  - warren buffett
donator
Activity: 1218
Merit: 1079
Gerald Davis
Coins only have value if they are safe.  Miners have a vested interest in ensuring Bitcoin fulfills its role of secure transactions.   As mining becomes more specalized, niche the margins are going to be continually squeezed.  The 1000% annual ROI days are never coming back.  The 100% ROI days are probably never coming back.  As the profits get extended over time mining becomes a marathon not a sprint.  Making 1% more by crippling the network and than tanking your ROI over the next year won't make economic sense.  Some miners will but I imagine they will be a minority.

Still that is just a theory.  Like most of Bitcoin it hasn't been tested.  We will find out.
hero member
Activity: 756
Merit: 501
There is more to Bitcoin than bitcoins.
Presumably the fees will become the main driving force behind mining in future. Miners would then have an incentive to include in the block the spend with the highest fees, even if it is obviously a double spend against an earlier transaction that is already broadcast.

Is this correct?
Jump to: