<p>One can consider multisig tx as contracts, especially when there is an escrow (2-of-3) service defined. It is very well described in Andreas' book "Mastering Bitcoin", chapter 7 "Advanced Transactions and Scripting". There are numerous other sources, referencing multisig. The idea of contract is based on the condition, that is executed by the operations of the scripting language on the stack. A "bullet proof" payment system must ensure correct execution of these programming activities, and as such it becomes a contract with several condition (e.g. "need 3 out of 7 signatures"). </p>

<p>Multisig transactions are created fairly often, for example when moving bitcoins between hot and cold storage. Many exchanges do this, to increase security of funds. And within a company you generally have 4-eyes-priciples. That's what multisig is, and it even can do more. </p>

<p>I am not sure what you mean by limited. Bitcoin smart contracts allow for a lot of functions to be executed, allowing for many fascinating use cases. From regular, unidirectional payment channels (e.g. music streaming) up to fully fledged network with bi-directional payment channels, as we see it currently with Lightning. 
IMHO, limited smart contracts exist in many other crypto currencies in a way, that they are in a beginners all purpose language like java script, allowing noobs to a certain extend to have user friendliness creating  "smart contracts in Turing complete machines". They then proof to be unsecure and have lost million of dollars. In this sense, and only in this sense bitcoin's smart contract system is highly limited, as it doesn't allow for such shit. </p>

<p>I have some more references here: </p>

<p><a href="https://bitcoin.org/en/developer-examples#p2sh-multisig" rel="nofollow noreferrer">https://bitcoin.org/en/developer-examples#p2sh-multisig</a></p>

<p><a href="https://en.bitcoin.it/wiki/Contract" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Contract</a></p>

<p><a href="https://en.bitcoin.it/wiki/Script" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Script</a></p>

CC BY-SA 3.0
2018-03-16T12:43:18.233Z
Thank you for the detailed answer. Are there any coded examples of bitcoin smart contracts?
Kyle Graham
CC BY-SA 3.0
2018-03-16T12:51:08.863Z
here a longer discussion in the thread about smart contracts: https://bitcointalk.org/index.php?topic=2204938.msg23664225#msg23664225. In bitcointalk you may want to do a search, there is lots of coding. And here in the forum there is a tag "smartcontracts": https://bitcoin.stackexchange.com/questions/tagged/smartcontracts
pebwindkraft
CC BY-SA 3.0
2018-03-16T13:00:58.833Z
Thank you very much, bitcointalk link was exactly what I needed
Kyle Graham
CC BY-SA 3.0
2018-03-16T12:03:03.207Z
2018-03-16T12:03:03.207Z
pebwindkraft
<p>Bitcoin's script language that enables smart contracts is used for everything in the technology, even single signature payments. One could say even those are smart contracts.</p>

CC BY-SA 3.0
2018-03-16T11:35:09.817Z
You've said quite a lot in a few sentences. Could you please elaborate? How is it used in single signature payments?
Kyle Graham
CC BY-SA 3.0
2018-03-16T11:42:45.237Z
There's some examples here: https://en.bitcoin.it/wiki/Transaction
Osias Jota
CC BY-SA 3.0
2018-03-16T11:29:10.027Z
2018-03-16T11:29:10.027Z
Osias Jota
<p>I have heard that bitcoin does have a limited smart contract and I was wondering whether this is how they created multisig wallets?</p>

<bitcoin-core><multi-signature>
Does Bitcoin use smart contracts to enable multisig?
Kyle Graham
# Does Bitcoin use smart contracts to enable multisig?

(Asked by: username_0 on 2018-03-16)

I have heard that bitcoin does have a limited smart contract and I was wondering whether this is how they created multisig wallets?

**Tags:** bitcoin-core, multi-signature


---

## 2 answers

### Answer by username_1 on 2018-03-16. Score: 0 | Accepted answer

One can consider multisig tx as contracts, especially when there is an escrow (2-of-3) service defined. It is very well described in Andreas' book "Mastering Bitcoin", chapter 7 "Advanced Transactions and Scripting". There are numerous other sources, referencing multisig. The idea of contract is based on the condition, that is executed by the operations of the scripting language on the stack. A "bullet proof" payment system must ensure correct execution of these programming activities, and as such it becomes a contract with several condition (e.g. "need 3 out of 7 signatures").

Multisig transactions are created fairly often, for example when moving bitcoins between hot and cold storage. Many exchanges do this, to increase security of funds. And within a company you generally have 4-eyes-priciples. That's what multisig is, and it even can do more.

I am not sure what you mean by limited. Bitcoin smart contracts allow for a lot of functions to be executed, allowing for many fascinating use cases. From regular, unidirectional payment channels (e.g. music streaming) up to fully fledged network with bi-directional payment channels, as we see it currently with Lightning.
IMHO, limited smart contracts exist in many other crypto currencies in a way, that they are in a beginners all purpose language like java script, allowing noobs to a certain extend to have user friendliness creating "smart contracts in Turing complete machines". They then proof to be unsecure and have lost million of dollars. In this sense, and only in this sense bitcoin's smart contract system is highly limited, as it doesn't allow for such shit.

I have some more references here:

<https://bitcoin.org/en/developer-examples#p2sh-multisig>

<https://en.bitcoin.it/wiki/Contract>

<https://en.bitcoin.it/wiki/Script>

> **Comments:**
> **username_0**: Thank you for the detailed answer. Are there any coded examples of bitcoin smart contracts?  
> **username_1**: here a longer discussion in the thread about smart contracts: https://bitcointalk.org/index.php?topic=2204938.msg23664225#msg23664225. In bitcointalk you may want to do a search, there is lots of coding. And here in the forum there is a tag "smartcontracts": https://bitcoin.stackexchange.com/questions/tagged/smartcontracts  
> **username_0**: Thank you very much, bitcointalk link was exactly what I needed  

---

### Answer by username_2 on 2018-03-16. Score: 0

Bitcoin's script language that enables smart contracts is used for everything in the technology, even single signature payments. One could say even those are smart contracts.

> **Comments:**
> **username_0**: You've said quite a lot in a few sentences. Could you please elaborate? How is it used in single signature payments?  
> **username_2**: There's some examples here: https://en.bitcoin.it/wiki/Transaction  

---

