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/ContractsIn 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!