9

I have recently come across the features of ethereum and the idea of smart contracts.

I like the concept of smart contracts however as a currency, I much prefer the bitcoin to the ether.

Is there any way smart contracts could ever be utilised by bitcoin?

1

3 Answers 3

13

Bitcoin has a scripting language built into it, which allows the creation of many kinds of smart contracts. Examples are atomic swaps, Lightning payment channels and zero-knowledge contingent payments (ZKCPs). This later paper by Banasik, Dziembowski and Malinowski (BDM16) improves the efficiency of these greatly. Threshold multisignatures are also easy to do, interestingly much more easily than in Ethereum.

ZKCPs are extremely general and can execute any contract in which the counterparties and terms of the contract are known at setup time, though it does require they use some new and slow crypto (done off-chain, Bitcoin is never exposed to it).

A more whimsical example is Peter Todd's bounty for anyone who can collide SHA1, SHA256 or RIPEMD160. The SHA1 collision bounty has been taken.

My guess is that the only thing Ethereum can do that Bitcoin actually can't do, is extrospect on the outputs being spent. This would be sufficient to implement covenants, which would be something of a mixed blessing. Andrew Miller has argued that Ethereum's account model lets it do contracts in a more transaction-efficient way than Bitcoin's UTXO model, which may be true, but the examples I've seen of this (a) lose privacy by storing lots of unrelated state in one account and (b) exploit Ethereum's global key-value store, which is significantly more expensive to maintain than a UTXO set. Extrospection may be efficiently (efficient for verifiers, not for the transacting parties :)) attainable by creative use of ZKCP's, much how the BDM16 paper does atomic swaps with them, but I haven't worked out the details.

As a final note, it is easier, by design, to implement and deploy Ethereum contracts. However, I think the hard part of smart contracting is analyzing the contracts and proving correct behaviour under all inputs. (Both Ethereum's and Bitcoin's script languages fall short on this count, being difficult in general to efficiently reason about.)

1
  • 1
    Regarding the final note, the reader may be interested in Miniscript (bitcoin.sipa.be/miniscript) which aims to give a framework to be able to analyze and reason about Bitcoin smart contracts. Jun 9, 2021 at 15:32
0

Some options:

Bitcoin Computer (https://www.bitcoincomputer.io/):

Bitcoin Computer is an easy to use smart contract system for Bitcoin.

Elements:

Elements is a general purpose blockchain platform that can also be “pegged” to an existing blockchain (such as Bitcoin) in order to enable the two way transfer of assets from one chain to the other

Etlenuem (from etleneum.com):

On Etleneum you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.

n.b.

...the Etleneum team may delete contracts if they consider them wrong...

Interlay:

interBTC is a 1:1 Bitcoin backed asset that can be used to invest, earn and pay with BTC across the DeFi ecosystem on Polkadot, Ethereum, Cosmos and many more.

Internet Computer Bitcoin Integration:

The integration between the Internet Computer and Bitcoin will enable developers to build canisters that:

  1. Securely own Bitcoin
  2. Interact with the Bitcoin Network

Liquid (https://liquid.net/):

Liquid is a sidechain-based, Bitcoin layer-2 settlement network linking together cryptocurrency exchanges and institutions around the world, enabling faster, more confidential Bitcoin transactions and the issuance of digital assets

RGB (from https://rgbfaq.com/):

RGB is a scalable & confidential smart contracts system for Bitcoin & lightning network. They embrace concepts of private & mutual ownership, abstraction and separation of concerns and represent "post-blockchain", Turing-complete form of trustless distributed computing which does not require introduction of "tokens"

RSK:

RSK is the first general purpose smart contract platform secured by the Bitcoin Network.

Stacks:

Stacks is an open-source blockchain network that leverages the security and capital of Bitcoin for decentralized apps and smart contracts.

Wrapped BTC

An Ethereum ERC20 token that maps 1:1 (minting controlled by custodian) to BTC. Can be utilised in Ethereum smart contracts.

2
  • 1
    Hi atomh33ls, please don't post multiple copies of the same answer across multiple topics. While some topics are closely related, they often ask about different aspects or facets of an issue. A copied answer usually fails to address the topic's unique parts, so perhaps you could edit each of these to make sure your posts address the questions of the topics you posted on.
    – Murch
    Jun 10, 2022 at 13:04
  • @Murch thanks, have deleted others and will use this one for updates
    – Lee
    Aug 16, 2022 at 7:59
0

If you re-enable all opcodes, as Bitcoin SV have done, Bitcoin smart contracts become Turing-Complete, meaning you can build arbitrarily complex smart contracts. For example, you can build oracles, vaults, derivative contracts, even Zero Knowledge Proof, the most sophisticated contracts in the entire blockchain space. All these can be done using a TypeScript DSL called sCrypt, which compiles down to opcodes/script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.