Bitcoin Forum
November 15, 2018, 11:46:22 AM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 [4]  All
  Print  
Author Topic: Smart Contract in Bitcoin  (Read 4457 times)
bob123
Hero Member
*****
Offline Offline

Activity: 742
Merit: 695



View Profile WWW
October 27, 2017, 03:03:54 PM
 #61

what classifies a smart contract - looks like there is just a lot of buzz words, but no clear explanation.

Actually this is pretty clear defined: "A smart contract is a computer protocol intended to facilitate, verify, or enforce the negotiation or performance of a contract." - https://en.wikipedia.org/wiki/Smart_contract
Smart contracts in combination with crypto currencies makes it a system where you dont have to trust a person. A contract will be enforced. Decentralized.


What is a typical smart contract use case?

Anything could be those use cases. For example some escrow service or a whole signature campaign which pays out per posts could be created.
Anything you can program can be coded into a smart contract.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
pebwindkraft
Full Member
***
Offline Offline

Activity: 256
Merit: 239


View Profile
October 28, 2017, 10:17:06 AM
 #62


...
Anything could be those use cases. For example some escrow service or a whole signature campaign which pays out per posts could be created.
Anything you can program can be coded into a smart contract.

yup, here we go! thx so much, fully agree  Grin
This is why I raised this question. The trolls here seem to think, that smart contracts = turing complete machine, is fancy coding language (which removes me from the burden of using my brain), is ETHEREUM transported into Bitcoin, cause flippening will happen (haha, what a laugh!!!), and much more stupid reasons. Those noobs seem to not even know what they are talking about...

I should stop ranting here, and show how to provide s.th. to the community (still hoping that some people come out of there noob zone and start to learn):
 
BITCOIN HAS ALREADY SMART CONTRACTS!
Examples and use cases:

e.g. the link you mentioned (https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki):
Code:
    IF
        2 <Alice's pubkey> <Bob's pubkey> <Escrow's pubkey> 3 CHECKMULTISIG
    ELSE
        "30d" CHECKSEQUENCEVERIFY DROP
        <Alice's pubkey> CHECKSIG
    ENDIF

or something like this:
Code:
if
  <merchant pubkey> checksigverify
 else
  <timestamp> checklocktimeverify drop
 endif
 <customer pubkey> checksig

or more precise:
n-of-m multisig is the easiest form of a contract.
escrow service is the next layer (as in examples above).
And then we can create very specific constructs like:
CHECKSEQUENCEVERIFY: lock some Satoshis until a specific number of block have passed, before I can use them, and if I really, really need the coins before, have a 2-3 multisig to release them immedeatly
CHECKLOCKTIMEVERIFY: lock some Satoshis until a specific number of block appears (aka my son is 18 years old...), but use a 2-3 multisig to release the funds in case funds are required earlier
It goes even up to the point where you can create tx spends, where the hash of a condition must be equal to a previously defined value.
I see some limitations when trying to use Oracles (aka data from "outsides"), maybe data from exchanges, or from real live (in case of death). 

Some more example in Andreas' book "Mastering Bitcoin" (second edition) in the chapter "Timelocks".
or here in the forum
https://bitcointalk.org/index.php?topic=1300723.0
https://bitcointalk.org/index.php?topic=1558207.0
https://bitcointalk.org/index.php?topic=1952248.0
or here:
https://www.reddit.com/r/Bitcoin/comments/4kit49/is_it_safe_to_use_cltv_for_recurring_payments/
https://www.reddit.com/r/Bitcoin/comments/4p4klg/bitcoin_core_project_the_csv_soft_fork_has/d4i01he/
and here:
https://en.bitcoin.it/wiki/Timelock
https://en.bitcoin.it/wiki/Contracts

And look at the way how exchanges store much of the funds into cold wallets automatically. These are also smart contracts.
Also the scripting language allows up to 10 kilobytes of code (!), to create smart contracts.
SO YES; BITCOIN HAS SMART CONTRACTS!

I haven't seen a single example by noobs, what a smart contract is, but a lot about there limitations ("scripting is dumb, cause usage of brain to learn scripting language is too complicated for me"). All are complaining that things need to get improved, without saying, what does not work in bitcoin. This is reddit niveau. Reddit it is the right forum to complain, without providing any efforts to improve bitcoin. Even better, there you can improve your reputation by posting much of this shit. Go there... ooops, I wanted to stop ranting  Grin Cheesy

I think I want to say, look at the examples, tell us what you want to do, what you think is missing, and how we can help to implement smart contracts.

shata
Sr. Member
****
Offline Offline

Activity: 467
Merit: 250



View Profile
October 28, 2017, 07:34:12 PM
 #63

what classifies a smart contract - looks like there is just a lot of buzz words, but no clear explanation.

Actually this is pretty clear defined: "A smart contract is a computer protocol intended to facilitate, verify, or enforce the negotiation or performance of a contract." - https://en.wikipedia.org/wiki/Smart_contract
Smart contracts in combination with crypto currencies makes it a system where you dont have to trust a person. A contract will be enforced. Decentralized.


What is a typical smart contract use case?

Anything could be those use cases. For example some escrow service or a whole signature campaign which pays out per posts could be created.
Anything you can program can be coded into a smart contract.

This smart contract is a piece of code that runs on ethereum's blockchain and as such is by definition decentralized. It is a self executing contracts with the terms of the agreement between buyer and seller being directly into line of code. It does not care about who wrong whom or what your name is.Once it live on ethereum's blockchain, no one can alter it.

.
FXPAY.IO.
██████
██████
███
███
███
███
███
███
███
███
███
██████
██████

▄██████████████████▄
███       ▀███████
███       █████████
███       █████████
███       █████████
███              ██
███   ▄▄▄▄▄▄▄▄   ███
███   ▄▄▄▄▄▄▄▄   ███
███              ███
███▄▄▄▄▄▄▄▄▄▄▄▄▄▄███
██████████████████▀

▄██████████████████▄
███████████▀ ███████
█████████▀   ███████
███████▀     ██▀ ███
███ ▀▀       █▄▄████
███          █▀▀▀▀██
███ ▄▄       ███████
██████▄     █▄ ▀███
█████████▄   ███▄███
███████████▄ ███████
▀██████████████████▀

▄██████████████████▄
████████████████████
███████████████▀▀ ██
█████████▀▀     ███
████▀▀     ▄█▀   ███
███▄    ▄██      ███
█████████▀      ▄██
█████████▄     ████
█████████████▄ ▄████
████████████████████
▀██████████████████▀
██████
██████
   ███
   ███
   ███
   ███
   ███
   ███
   ███
   ███
   ███
██████
██████
.
. A Decentralized Gateway to The World's Digital Ecosystem.
| Twitter | LinkedIn | Medium | Facebook | Bitcointalk | Reddit

bob123
Hero Member
*****
Offline Offline

Activity: 742
Merit: 695



View Profile WWW
October 29, 2017, 11:47:05 AM
 #64

This smart contract is a piece of code that runs on ethereum's blockchain and as such is by definition decentralized. It is a self executing contracts with the terms of the agreement between buyer and seller being directly into line of code. It does not care about who wrong whom or what your name is.Once it live on ethereum's blockchain, no one can alter it.

A smart contract does not explicitly have to be based on ethereums blockchain. Neither does it have to be decentralized.
Ethereum is not the only platform which introduced smart contracts on the blockchain. But it is the most accepted and adopted.
Smart contracts (in future) could also be handled by a blockchain which is not completely decentralized. Licences, for example, could be easily
handled via smart contracts on a (non-public) "centralized blockchain".

PatelKartel
Member
**
Offline Offline

Activity: 273
Merit: 10


View Profile
November 20, 2017, 11:16:02 PM
 #65

This smart contract is a piece of code that runs on ethereum's blockchain and as such is by definition decentralized. It is a self executing contracts with the terms of the agreement between buyer and seller being directly into line of code. It does not care about who wrong whom or what your name is.Once it live on ethereum's blockchain, no one can alter it.

A smart contract does not explicitly have to be based on ethereums blockchain. Neither does it have to be decentralized.
Ethereum is not the only platform which introduced smart contracts on the blockchain. But it is the most accepted and adopted.
Smart contracts (in future) could also be handled by a blockchain which is not completely decentralized. Licences, for example, could be easily
handled via smart contracts on a (non-public) "centralized blockchain".

Thanks man Smiley
pageman
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
November 21, 2017, 12:25:46 PM
 #66

Dryja had a talk on updating this concept at Scaling Bitcoin in Stanford -  https://www.youtube.com/watch?time_continue=7045&v=LDF8bOEqXt4 (other presentations are here: https://scalingbitcoin.org/presentations)

The PDF is here: https://adiabat.github.io/dlc.pdf

Other Links:

https://coinjournal.net/bitcoins-lightning-network-can-used-decentralized-betting-platform/

Notable Quote:

“These things work great with friends, but bitcoin is the currency of enemies” - Thaddeus "Tadge" Dryja
Pages: « 1 2 3 [4]  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!