<p>2-of-3 multisignatures are indeed possible with Bitcoin's base layer scripting language. In fact, there is an opcode decidated to it - <code>OP_CHECKMULTISIG</code>.</p>
<p>Note that all the Bitcoin base layer sees is three keys, and two signatures from those keys. It doesn't understand price, APIs, or any other oracle logic. The oracle would have to be independently developed and operated to check if whatever conditions you want are satisfied, and if so, to sign a message of your choice (a transaction). That would be the real challenge, and would have to be trusted and secure.</p>

CC BY-SA 4.0
2021-12-19T10:17:41.770Z
2021-12-19T10:17:41.770Z
meshcollider
<p><a href="https://github.com/discreetlogcontracts/dlcspecs" rel="nofollow noreferrer">DLCs</a>, or 'Discreet Log Contracts' could be interesting for you to explore given the use-case that you appear to have in mind.</p>
<p>DLCs allow for the creation of onchain Bitcoin contracts using an external oracle to determine the contract outcome. The DLC spec has built in refund logic to prevent locked funds for if for some reason the oracle is unable to attest, following a timelock. Given your stated goals, I would suggest that you explore the DLC specs and specific implementations linked above as DLCs already achieve your stated goal using 2/2 multisig and adaptor signatures.</p>

CC BY-SA 4.0
2021-12-21T15:14:45.537Z
2021-12-21T15:14:45.537Z
satirn
<p>I am trying to develop an use case in which a user has its funds on a multisig 3-2 (one key staying with him, another with my app and another one with a type of oracle that can attest if some conditions are met). These conditions would be retrieved with some type of script that can consult API's with BTC price, etc. Would that be possible to do in the base layer of bitcoin? Can anybody point to me some articles that explore this question?</p>

<multi-signature><oracle><discreet-log-contract>
Multisig with oracle
rafaelero
# Multisig with oracle

(Asked by: username_0 on 2021-12-18)

I am trying to develop an use case in which a user has its funds on a multisig 3-2 (one key staying with him, another with my app and another one with a type of oracle that can attest if some conditions are met). These conditions would be retrieved with some type of script that can consult API's with BTC price, etc. Would that be possible to do in the base layer of bitcoin? Can anybody point to me some articles that explore this question?

**Tags:** multi-signature, oracle, discreet-log-contract


---

## 2 answers

### Answer by username_1 on 2021-12-19. Score: 1

2-of-3 multisignatures are indeed possible with Bitcoin's base layer scripting language. In fact, there is an opcode decidated to it - `OP_CHECKMULTISIG`.

Note that all the Bitcoin base layer sees is three keys, and two signatures from those keys. It doesn't understand price, APIs, or any other oracle logic. The oracle would have to be independently developed and operated to check if whatever conditions you want are satisfied, and if so, to sign a message of your choice (a transaction). That would be the real challenge, and would have to be trusted and secure.


---

### Answer by username_2 on 2021-12-21. Score: 1

[DLCs](https://github.com/discreetlogcontracts/dlcspecs), or 'Discreet Log Contracts' could be interesting for you to explore given the use-case that you appear to have in mind.

DLCs allow for the creation of onchain Bitcoin contracts using an external oracle to determine the contract outcome. The DLC spec has built in refund logic to prevent locked funds for if for some reason the oracle is unable to attest, following a timelock. Given your stated goals, I would suggest that you explore the DLC specs and specific implementations linked above as DLCs already achieve your stated goal using 2/2 multisig and adaptor signatures.


---

