Bitcoin Forum
November 01, 2024, 12:10:40 AM *
News: Bitcoin Pumpkin Carving Contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Double-spending with Contracts?  (Read 882 times)
dperfect (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
December 29, 2013, 01:23:45 AM
 #1

Lately, I've been interested in learning more about the script features of bitcoin, and the ability to create low-trust contracts.

I've been reading the wiki page about contracts here: https://en.bitcoin.it/wiki/Contracts


In a couple of the examples mentioned on that page, the transaction isn't broadcast to the network until a fairly late stage in the sequence of events. For instance, in Example 3 (Assurance contracts), the final transaction isn't broadcast to the network until enough "pledge" transactions are sent (directly, not via the bitcoin network) to the entrepreneur. A similar situation exists in some of the other examples as well.

This leads to my question: in the scenario of the assurance contract, what prevents someone from "pledging" an amount that they have at the time they create their pledge transaction, but after sending that transaction to the entrepreneur (and before the final transaction is broadcast and verified by the network) spending all of their bitcoin elsewhere? Does the entrepreneur just have to verify all of those pledges (some of which may now be invalid) himself/herself before merging and broadcasting the final transaction?

Similarly, in example 4 (the old man sending inheritance to his grandson), is there anything in place to ensure that when the old man gives his grandson the transaction (which isn't broadcast at first) that the old man won't spend (with broadcasted transactions) his bitcoin - including the inheritance - before any of the conditions are met for completing the inheritance transaction?


Please be kind - I feel like I understand the basics of how the bitcoin protocol works, but I guess I'm just missing some understanding here. I've searched the web and this forum for answers, but just haven't been able to come up with anything. Any help (in the form of something reasonable to understand) or insights would be greatly appreciated!
infinitybo
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
December 29, 2013, 04:15:28 PM
 #2

Yes you have the possibility to use this option furthermore they allow you the ability to create low-trust contracts.
dperfect (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
December 30, 2013, 12:43:53 AM
 #3

Yes you have the possibility to use this option furthermore they allow you the ability to create low-trust contracts.

I'm sorry - did you read my question? I'm not asking whether or not these kinds of contracts are possible. I AM asking this: what prevents someone from spending the bitcoin included in a partially-fulfilled contract before it's broadcast and verified on the network?

If nothing is in place to prevent the sender from spending the bitcoin before the contract is broadcast, then that seems to REALLY limit the usefulness of these contracts.

To quote the wiki:

Quote
[The old man] creates a transaction with a lock time of the grandson's 18th birthday that pays the coins to another key owned by the grandson, signs it, and gives it to him - but does not broadcast it. This takes care of the 18th birthday condition. If the date passes, the grandson broadcasts the transaction and claims the coins.

If I'm the grandson, what assurance do I have that by the time my 18th birthday rolls around, those coins will not have already been spent?
some1
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


667 one more than the devil


View Profile
January 31, 2014, 04:27:51 PM
 #4

Other coins are more concerned about contrats.

Have a look at Ethereum: https://bitcointalk.org/index.php?topic=428589.0

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!