Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: jgmBitcoin on June 14, 2016, 11:36:53 PM



Title: Smart contracts in bitcoin
Post by: jgmBitcoin on June 14, 2016, 11:36:53 PM
Is it possible in bitcoin to start a smart contract preloaded with some amount of money. And if some other user is ready to pay to the smart contract a certain amount of money, the smart contract should release the preloaded amount of money in the smart contract to the user who paid to it ?


Title: Re: Smart contracts in bitcoin
Post by: dsattler on June 15, 2016, 06:22:40 AM
Is it possible in bitcoin to start a smart contract preloaded with some amount of money. And if some other user is ready to pay to the smart contract a certain amount of money, the smart contract should release the preloaded amount of money in the smart contract to the user who paid to it ?

Smart contracts in bitcoin are possible, look here:
https://www.cryptocoinsnews.com/counterparty-brings-ethereum-smart-contracts-to-the-bitcoin-blockchain/ (https://www.cryptocoinsnews.com/counterparty-brings-ethereum-smart-contracts-to-the-bitcoin-blockchain/)


Title: Re: Smart contracts in bitcoin
Post by: pebwindkraft on June 16, 2016, 08:16:56 PM
not sure what you mean by "pay to the smart contract". Example 4 in the wiki gives a good hint.

https://en.bitcoin.it/wiki/Smart_contract



Title: Re: Smart contracts in bitcoin
Post by: helloeverybody on June 18, 2016, 07:27:23 PM
Maybe after seeing how the dao and ethereum have ended up we shouldnt really tempt fate too much by tinkering with bitcoin to allow such things. If its not broke dont fix it. Imo smart contract should be left to altcoins, Bitcoin as it stands works at what its supposed to (well within reason, its a good store of value anyway)


Title: Re: Smart contracts in bitcoin
Post by: gmaxwell on June 18, 2016, 07:43:11 PM
Maybe after seeing how the dao and ethereum have ended up we shouldnt really tempt fate too much by tinkering with bitcoin to allow such things. If its not broke dont fix it. Imo smart contract should be left to altcoins, Bitcoin as it stands works at what its supposed to (well within reason, its a good store of value anyway)

Bitcoin has had smart contracts since day one. The architecture of the system is much more fundamentally sound and safe than the system in Ethereum. People have lost money via misuse of Bitcoin script, however, and no one has suggested forcefully adjusting Bitcoin's rules to claw those funds-- or others lost in other incidents-- back.



Title: Re: Smart contracts in bitcoin
Post by: Monnt on June 19, 2016, 10:08:50 AM
Anything smart contracts can do, Mutisig can do. Just bathe in that knowledge for a second, then start working with it! :)


Title: Re: Smart contracts in bitcoin
Post by: funkenstein on June 26, 2016, 10:40:06 PM
Can I use bitcoin to throw money away because I prefer soundbytes and fads to thinking clearly and doing business in a rational way?  Yes I absolutely can. 


Title: Re: Smart contracts in bitcoin
Post by: M28MmickT on June 28, 2016, 02:42:34 AM
Maybe after seeing how the dao and ethereum have ended up we shouldnt really tempt fate too much by tinkering with bitcoin to allow such things. If its not broke dont fix it. Imo smart contract should be left to altcoins, Bitcoin as it stands works at what its supposed to (well within reason, its a good store of value anyway)

Counter party has had "smart contracts" since years ago, the main part to take a look in a smart contract is the escrow of funds, their decentralized exchange is a type of smart contract that escrows money and executes orders independently. And as Gmaxwell said, you can even build your own protocol and language for smart contracts because Bitcoin has always allowed it.


Title: Re: Smart contracts in bitcoin
Post by: jza on July 14, 2016, 03:25:22 PM
I think the next question is how, since I heard some of the OPcodes can have some type of code, and also a sidechain like smartcontracts.com can write to the blockchain and use their sidechain as oracles.


Title: Re: Smart contracts in bitcoin
Post by: andytoshi on July 14, 2016, 03:38:14 PM
To answer the OP's question, s/he could use something like a assurance contract (https://en.bitcoin.it/wiki/Contract#Example_3:_Assurance_contracts), which do a payout after some threshold has been met.

The scheme described there is not really usable because at any point the recipient of the funds can pledge the remainder of the balance, push the transaction through, and immediately get her pledge back. But as best as I can read OP's request, this is the desired behaviour.