Bitcoin Forum
November 05, 2024, 02:01:30 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: possible to avoid double spends if accepting unconfirmed transaction?  (Read 1093 times)
franky1 (OP)
Legendary
*
Offline Offline

Activity: 4396
Merit: 4755



View Profile
December 24, 2012, 12:26:24 PM
 #1

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.

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
December 24, 2012, 08:50:13 PM
 #2

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.


Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


franky1 (OP)
Legendary
*
Offline Offline

Activity: 4396
Merit: 4755



View Profile
December 25, 2012, 08:49:51 AM
 #3

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.

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
jl2012
Legendary
*
Offline Offline

Activity: 1792
Merit: 1111


View Profile
December 25, 2012, 10:16:16 AM
 #4

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

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
Meni Rosenfeld
Donator
Legendary
*
expert
Offline Offline

Activity: 2058
Merit: 1054



View Profile WWW
December 25, 2012, 01:05:01 PM
 #5

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.

1EofoZNBhWQ3kxfKnvWkhtMns4AivZArhr   |   Who am I?   |   bitcoin-otc WoT
Bitcoil - Exchange bitcoins for ILS (thread)   |   Israel Bitcoin community homepage (thread)
Analysis of Bitcoin Pooled Mining Reward Systems (thread, summary)  |   PureMining - Infinite-term, deterministic mining bond
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
December 25, 2012, 02:08:10 PM
 #6

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.)

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!