Golden bitcoins on grey background

Introduction to Bitcoin smart contracts

Bitcoin is complex cash with functionalities such as smart contracts. When discussing smart contracts, most people think of Ethereum, Solana or other blockchain systems rather than Bitcoin itself. However, Bitcoin offers it all in its original form—the BSV blockchain.

Bitcoin entrepreneur and developer Xiaohui Liu, the founder and CEO of sCrypt Inc., has spent his precious time explaining Bitcoin smart contracts in a two-part video lesson on his YouTube channel.

Xiaohui Liu recently presented the Ethereum to Bitcoin transpiler, allowing ETH developers to write smart contracts on the BSV blockchain without hassle. Blockchain expert Jerry Chan described the transpiler as a tool to easily port smart contract code written in Solidity over to the original Bitcoin script.

Part 1: Bitcoin smart contracts, UTXO model, and more

Liu starts his video presentation by saying that Bitcoin was intended to have smart contracts from the beginning. As proof of that claim, Liu quotes Satoshi Nakamoto, who stated:

The design supports a tremendous variety of possible transaction types that I designed years ago. Escrow transactions, bonded contracts, third party arbitration, multi-party signature, etc. If Bitcoin catches on in a big way, these are things we’ll want to explore in the future, but they all had to be designed at the beginning to make sure they would be possible later.

The presentation then focuses on the UTXO model of Bitcoin, also in comparison with the account-based system of Ethereum. Liu explains that the digital transaction system of Bitcoin works much like analog cash does. When a Bitcoin is authorized to be sent, it is sent one time only, exactly as one can spend cash only once. Concerning smart contracts, Liu says there is a misconception of Bitcoin being primitive code-wise and, therefore, unfit for multi-layered computational tasks. However, Bitcoin is fully programmable.

Not only is Bitcoin not primitive, it is the most powerful smart contract platform out there. What do I mean? It basically means that Bitcoin is Turing complete. By Turing complete – in layman’s terms – it means whatever smart contract that can be implemented on other blockchains, all run on any computers (…). Any program that you can run on any computer out there, you can run it on Bitcoin.

When Liu describes these programmable capabilities of Bitcoin, he is talking about Bitcoin SV (BSV) as in the BSV blockchain. In the presentation, Liu explains that BTC cannot run smart contracts due to changes in the code made by the protocol developers after Satoshi left the project. According to Liu, BTC developers have disabled almost all virtual machine instructions.

The lesson then addresses fascinating features of Bitcoin smart contracts, such as the outsourcing of computation. Liu gives plenty of examples concerning that idea, all having in common that the one delivering a computational task will get paid via Bitcoin without the need to trust the other party. Liu also explains how AI/Machine Learning functions on and with Bitcoin smart contracts. One benefit concerning that area is how Bitcoin can hide certain information in transactions, maintaining privacy for Bitcoin users at scale while letting automated processes gather data.

YouTube video

Part 2: Comparing Bitcoin smart contracts with other blockchains

In the second course, Liu explains that in the fake version of Bitcoin—known as BTC—the Taproot implementation is celebrated as a breakthrough technology. However, Liu demonstrates that Taproot is unnecessarily complex and could be coded onto the original Bitcoin in less than 20 minutes, done by a single developer. Furthermore, the “next big thing in BTC,” called Graftroot, is also discussed by Liu.

What I am showing here is that you do not have to wait for several years and hundreds of developers to develop this thing. You can already code this (…) you can do it today.

Concerning Taproot, Liu mentions the Schnorr Signature update and describes how this would not have needed a change of Bitcoin, but could have been coded onto Bitcoin in a way easier fashion. Bitcoin inventor Dr. Craig Wright commented on Schnorr Signatures in one of his articles:

Which brings us to the endless push for changes to Bitcoin such as the eponymous Schnorr signature. It is consistently if a little dishonestly pushed as the solution to privacy woes. The truth is, it is not a privacy nor is it a scaling solution.

This “endless push for changes to Bitcoin” is a serious topic because once you have a Bitcoin smart contract running, you want to make sure it still runs some years from now. Changing Bitcoin is a risk to everything built onto it—hence why the BSV blockchain strongly advocates a set-in-stone protocol.

In the presentation, Liu compares Bitcoin SV with other blockchain systems such as BCH, Zcash, and Monero. At his company sCrypt, Liu develops options to basically run everything other blockchains are capable of directly on the original Bitcoin. The key is understanding that Bitcoin is a “one coin to rule them all”-system, which seems diametrical to how many digital assets are being traded on the so-called ‘cryptocurrency’ markets today.

The vast number of blockchain projects out there result from code changes that have crippled BTC. If digital asset users and developers would have stuck with the original Bitcoin from the beginning, there would not have been a need for any other blockchain than Bitcoin. With the BSV blockchain, we have the original Bitcoin back and have no use case left for other blockchains at all.

Liu ends the presentation by saying that the “more hands-on” courses are about to come out soon. These two videos are only an introduction to the topic of Bitcoin smart contracts. We can expect to see more informational lectures like this on his YouTube channel.

Watch: Xiaohui Liu’s Lesson 1: Introduction to Bitcoin Smart Contracts (Part 2)

YouTube video

New to blockchain? Check out CoinGeek’s Blockchain for Beginners section, the ultimate resource guide to learn more about blockchain technology.