Author

Topic: possible to avoid double spends if accepting unconfirmed transaction? (Read 1077 times)

legendary
Activity: 2506
Merit: 1010
thus reducing the risks of a double spend. where basic terms/conditions of satoshi dice/coffee shop are that only transactions from an address with low activity will get accepted for instant use. where by addresses with alot of activity would have to wait for confirmations before the trade/sale/service is completed.

Just to clarify, there's no period of time (e.g., an "hour") that will ensure that a transaction has confirmed.  So this idea of requiring that an hour doesn't guarantee anything.

Also, it appears you are placing significance on this concept of an address having "low activity'.  Bitcoin does not use the concept of "balances".  Bitcoin transactions instead consist of inputs and outputs.  Once an output is spent, there is no further activity for that output, ever.

But you are right to express a concern.  Consider the following scenario:

Let's say SatoshiDICE made payouts using other people's wagers that hadn't yet confirmed.  And then a consumer uses the funds from that SatoshiDICE payout to make a payment at a merchant.  Then let's say those transactions never confirm and somehow further back a double spend occurred and invalidated the wager to SatoshiDICE.    What ended up happening then is that the consumer made a payment to a merchant that will never confirm.

But that is easy to identify.  The merchant needs to do more than just check that the transaction was received but also check that the input(s) for that transaction had at least one confirmation (or perhaps more confirmations, depending on the amount of the transaction / level of risk tolerance).


Accept 0-confirmation tx = trust the payer. If you do not trust the payer, you should wait for confirmations.

In the example above, the customer might have been trustworthy but probably would have been at the time unaware that the funds being used to pay the merchant hadn't been already confirmed.    So in that instance, even though the consumer had no intention to double spend that is indeed what could occur if the consumer too ended up receiving a transaction that eventually became a double spend.

So the litmus test on accepting 0/unconfirmed as payment might need to also include another check to ensure that all inputs for the payment had confirmations.  If that fails, then there is an increase in the risk of that transaction never confirming and the merchant would want to proceed in an appropriate manner.

These type of scenarios will rarely occur accidentally, so simply the prevention could be to ensure that there is no economic gain from attempting them.  A restaurant for instance will make more in profit from repeated failed double spend attempts than it would lose from the occasional one that does occur, for instance.   

But a merchant will probably want to use a payment processor that can perform the risk analysis (e.g., to know that if the payment to the merchant came from a SatoshiDICE payout that also hadn't confirmed that it then is a higher-risk payment.)
donator
Activity: 2058
Merit: 1054
Why do you think an attacker is more likely to make multiple spends from the same address than a legitimate customer?

An attacker trying to double-spend 0-confirm will likely use a Finney attack. He may do it with several merchants at once but it will likely be from a different sending address per merchant.

The traditional method (which I think is not yet completely implemented) is to wait a few seconds and check that none of your peers knows of a conflicting transaction, and hope the attacker won't do Finney. This is more than fine for buying coffee; for buying a car, not so much.
legendary
Activity: 1792
Merit: 1087
i refer to:

if satoshi dice received a transaction from 1Ex4mpl34ddr3ssn0Tr34l4tall it can check the transaction history on blockchain.info to see if 1Exa4ml34ddr3ssn0Tr34l4tall has sent any other funds within the last 10 minutes and if all the funds of 1Exa4ml34ddr3ssn0Tr34l4tall has all had confirmations.

i ask this so that if i was to send my funds all over the place within a few minutes and then walked into a coffee shop that accepts BTC with no confirms. the transaction would be on hold till the confirms are completed due to high activity.

but if i done my funds transfers an hour ago, all the funds have confirms and then walked in to the same coffee shop and bought some coffee with BTC, the transaction would complete instantly, due to low activity on my address.

much like visa/mastercard fraud protection checks to see if a customer buying fuel in the customers home town whilst also  using the card to do a transaction in another country within an unreasonable/impossible timeframe would then be flagged as a risk if that occurance happened, due to 'strange activity' on the account.

thus reducing the risks of a double spend. where basic terms/conditions of satoshi dice/coffee shop are that only transactions from an address with low activity will get accepted for instant use. where by addresses with alot of activity would have to wait for confirmations before the trade/sale/service is completed.

Forget it, that has nothing to do with double spending

Accept 0-confirmation tx = trust the payer. If you do not trust the payer, you should wait for confirmations.

Also see: https://en.bitcoin.it/wiki/Green_address
legendary
Activity: 4214
Merit: 4458
i refer to:

if satoshi dice received a transaction from 1Ex4mpl34ddr3ssn0Tr34l4tall it can check the transaction history on blockchain.info to see if 1Exa4ml34ddr3ssn0Tr34l4tall has sent any other funds within the last 10 minutes and if all the funds of 1Exa4ml34ddr3ssn0Tr34l4tall has all had confirmations.

i ask this so that if i was to send my funds all over the place within a few minutes and then walked into a coffee shop that accepts BTC with no confirms. the transaction would be on hold till the confirms are completed due to high activity.

but if i done my funds transfers an hour ago, all the funds have confirms and then walked in to the same coffee shop and bought some coffee with BTC, the transaction would complete instantly, due to low activity on my address.

much like visa/mastercard fraud protection checks to see if a customer buying fuel in the customers home town whilst also  using the card to do a transaction in another country within an unreasonable/impossible timeframe would then be flagged as a risk if that occurance happened, due to 'strange activity' on the account.

thus reducing the risks of a double spend. where basic terms/conditions of satoshi dice/coffee shop are that only transactions from an address with low activity will get accepted for instant use. where by addresses with alot of activity would have to wait for confirmations before the trade/sale/service is completed.
legendary
Activity: 2506
Merit: 1010
i ask this as some businesses are trying to figure out a way around the 10 minute confirm times by atleast seeing the transaction history of the customer

i see on blockchain info that it does list transactions even without a confirmation. is there a way for EG satoshi dice to check the senders address for any other transactions that they have sent within the last 5 minutes before the satoshi dice received theirs and decline the payment for instant use if there was more then 1 unconfirmed transaction within 5 minutes prior to the transaction.

meaning that customers who only do transactions with atleast a 5 minute gap from a previous transaction elsewhere will get an acceptable instant use acceptance.

Are you referring to how a merchant might receive a transaction that itself is based on a prior transaction that has not yet confirmed? 

If so, then yes that can be determined either from the blockchain or with the help of third party services such as Blockchain.info.

The Bitcoin.org client doesn't let a transaction use a coin that has not confirmed (unless it is change from a previous transaction) but other clients don't have that restriction.

legendary
Activity: 4214
Merit: 4458
i ask this as some businesses are trying to figure out a way around the 10 minute confirm times by atleast seeing the transaction history of the customer

i see on blockchain info that it does list transactions even without a confirmation. is there a way for EG satoshi dice to check the senders address for any other transactions that they have sent within the last 5 minutes before the satoshi dice received theirs and decline the payment for instant use if there was more then 1 unconfirmed transaction within 5 minutes prior to the transaction.

meaning that customers who only do transactions with atleast a 5 minute gap from a previous transaction elsewhere will get an acceptable instant use acceptance.
Jump to: