BitVM Club
WhitepaperBTC Layer2BitVMBTC 2024 EventMedia
  • Introduction
  • BitVM
    • BitVM Whitepaper PDF
    • BitVM Whitepaper Word
    • BitVM Introduction
    • BitVM-FAQ
  • Resources
    • BitVM And Its Optimization Considerations
    • PPT
      • BitVM Slides by Cartesi,Bringing ZK verifiers to Bitcoin using BitVM - ?
      • How BitVM works?
      • BitVM : Off-chain Bitcoin Contracts
    • Primer
      • What is BitVM? And why does it matter to rollups?
      • BitVM: Ushering in a New Era of Bitcoin Computations
      • BitVM: A Computational Revolution in Bitcoin
      • Is BitVM the Next Evolution for Smart Contracts on Bitcoin?
      • What is BitVM? A Beginner’s Guide to Turing-Complete Bitcoin Smart Contracts
      • Simple explanation of BitVM
      • BitVM Primer
      • Things BitVM needs
      • BitVM explained in 4 slides
      • THE BIG DEAL WITH BITVM: ARBITRARY COMPUTATION NOW POSSIBLE ON BITCOIN WITHOUT A FORK
      • Deep dive into BitVM -Computing paradigm to express Turing-complete Bitcoin contracts-
    • Youtube
      • Robin Linus on BitVM
      • What is BitVM? with Robin Linus and Super Testnet (SLP520)
      • Ark Whiteboard Masterclass with Burak & Robin
      • BitVM Intro: Create Logic Gates and Circuits in Python
      • Demo of Robin Linus's implementation of BitVM
      • BitVM 8 bit CPU: Write Bitcoin programs in Assembly
      • BitVM 8 bit CPU: Assembly Quirks
      • BitVM 8 bit CPU: Write Bitcoin programs in Assembly
      • How bitvm works: from logic gates to an 8bit cpu for bitcoin
      • S15 E13: Robin Linus on BitVM & Permissionless Bitcoin Development
      • BitVM: Uma Ferramenta Para Contratos Ainda Mais Inteligentes - Super Testnet - Satsconf 2023
      • BTC生态浏览超70万次的BitVM到底是什么? | 11月8日更新了什么?
      • BitVM 在比特币上实现智能合约
      • Bitcoin Smart Contracts and BitVM
    • Twitter
      • BitVM and MATT
      • Script, Taproot and BitVM
  • Devlopment
    • Libraries
    • Tutorial
      • STARK proof for BitVM circuit execution
      • BitVM and sCrypt
      • BitVM Rust Implementation
  • BTC Layer2
    • Exploring the Landing Paths for Bitcoin Layer 2 Ecosystem
  • BitVM Project
    • Overview
    • Bitlayer
      • Introduction
      • Technical Introduction
    • Citrea
      • Technical Introduction
      • Introducing Citrea: Bitcoin’s First ZK Rollup
    • ZKBase
      • ZKByte: A Trustless Bitcoin Layer2 Scaling Solution based on Zero Knowledge and BitVM
    • Bitstake
      • Introducing Bitstake: A proof of stake bridge based on BitVM
  • BitVM Weekly Report
    • 2025.3.10 - 2025.3.16
    • 2025.3.3 - 2025.3.9
    • 2025.2.24 - 2025.3.2
    • 2025.2.17 - 2025.2.23
    • 2025.2.10 - 2025.16
    • 2025.1.20 - 2025.2.2
    • 2025.1.13 - 2025.1.19
    • 2025.1.6 - 2025.1.12
    • 2024.12.30 - 2025.1.5
    • 2024.12.23 - 2024.12.29
    • 2024.12.16 - 2024.12.22
    • 2024.12.9- 2024.12.15
    • 2024.12.2- 2024.12.8
    • 2024.11.25 - 2024.12.1
    • 2024.11.18 - 2024.11.24
    • 2024.11.11 - 2024.11.17
    • 2024.11.4 - 2024.11.10
    • 2024.10.28 - 2024.11.3
    • 2024.10.21 - 2024.10.27
    • 2024.10.14 - 2024.10.20
    • 2024.10.7 - 2024.10.13
    • 2024.9.23 - 2024.10.6
    • 2024.9.16 - 2024.9.22
    • 2024.9.9 - 2024.9.15
    • 2024.9.2 - 2024.9.8
    • 2024.8.26 - 2024.9.1
    • 2024.8.19 - 2024.8.25
    • 2024.8.13 - 2024.8.19
    • 2024.8.5 - 2024.8.11
    • 2024.7.22 - 2024.7.28
    • 2024.7.15 - 2024.7.21
    • 2024.7.8 - 2024.7.14
    • 2024.7.1 - 2024.7.7
    • 2024.6.24 - 2024.6.30
    • 2024.6.10 - 2024.6.16
    • 2024.6.3 - 2024.6.9
    • 2024.5.27 - 2024.6.2
    • 2024.5.20 - 2024.5.26
    • 2024.5.13 - 2024.5.19
    • 2024.5.6 - 2024.5.12
    • 2024.3.18 - 2024.3.24
    • 2024.3.11 - 2024.3.17
    • 2024.3.4 - 2024.3.10
    • 2024.2.26 - 2024.3.3
  • BTC Layer2 Weekly Report
    • BTC Layer2 Projects Overview
    • 2024.3.11 - 2024.3.17
    • 2024.3.4 - 2024.3.10
    • 2024.2.26–2024.3.3
  • BTC 2024 Conferences
    • Bitcoin Renaissance 2024 Segmented By Keynotes & Panel
Powered by GitBook
On this page
  • Introduction
  • Chess, Programs, & Smart Contract Languages
  • Bitcoin Script
  • Bitcoin Nodes & Avoiding Arbitrarily Long Compute
  • What does BitVM enable?
  • Notes

Was this helpful?

  1. Resources
  2. Primer

BitVM Primer

PreviousSimple explanation of BitVMNextThings BitVM needs

Last updated 1 year ago

Was this helpful?

orginal:

By Tyler Whittle ()

Introduction

Welcome to the BitVM primer! If you read the abstract below and get it on the first go, kudos to you. Please reach out to me so I can offer you a job at the . If you’re like the 99% of us who are left simultaneously excited and confused, read on!

Abstract - BitVM: Compute Anything on Bitcoin

BitVM is a computing paradigm to express Turing-complete Bitcoin contracts. This requires no changes to the network’s consensus rules. Rather than executing computations on Bitcoin, they are merely verified, similar to optimistic rollups. A prover makes a claim that a given function evaluates for some particular inputs to some specific output. If that claim is false, then the verifier can perform a succinct fraud proof and punish the prover. Using this mechanism, any computable function can be verified on Bitcoin.

Committing to a large program in a Taproot address requires significant amounts of off-chain computation and communication, however the resulting on-chain footprint is minimal. As long as both parties collaborate, they can perform arbitrarily complex, stateful off-chain computation, without leaving any trace in the chain. On-chain execution is required only in case of a dispute.

Though it might be hard to distill from the abstract, BitVM marks a paradigm shift in what we thought was possible on Bitcoin. Put simply, the BitVM allows arbitrary computation to be executed on Bitcoin.

Okay, “arbitrary computation” is a mouthful and doesn’t really help a non-technical reader. So let me give you an example: Chess.

Chess, Programs, & Smart Contract Languages

Chess is an example of a well-defined program with set constraints and a win condition. You have certain pieces that can move in certain ways around an 8x8 board. You know the game is over when a king is captured or neither player is able to win. You can consider chess a program with some arbitrary computation (e.g. there is not a chess.move_knight(F4) command built into Bitcoin).

Now let’s say Vicky and Paul want to play a game of chess against each other. What’s more, they want to make a big bet on it: 1 BTC to the winner! Given this game has such large stakes, they want a way to verify who won.

Before blockchains, Vicky & Paul’s best bet was to find a trusted third party (let’s call him Terrance) who would observe the game, declare a winner, and custody/pay out the 1 BTC. But what if Terrance wasn’t so trustworthy? Maybe Terrance decides to run away and keep the 1 BTC for himself. Maybe Paul bribed Terrance to declare him the winner no matter what. Neither of these situations (or the myriad of others that could potentially arise) are ideal.

Enter blockchains! A primary advantage of blockchains is that they shift the need to trust another human to the need to trust cryptography and code.

Bitcoin Script

As an analogy, think of Bitcoin/Script like your high-school calculator and Ethereum/Solidity like your iPhone (or Android if you’re like me). Your iPhone can run any program an app developer can cook up. Your calculator, on the other hand, is relegated to some numbers and a few mathematical functions. Maybe there are a few extra buttons for some calculus on there, but no one is mistaking your TI-83 for an iPhone.

Script, however, is not considered Turing complete. This means it wasn’t possible to run all those cool programs you see on other chains on Bitcoin (until now!).

There are ~100 opcodes on Bitcoin, and they are specifically designed to limit the complexity of the computation that can be done. For example, as of writing there is not an opcode to multiply two numbers, nor is there an opcode to add to strings together. Satoshi removed these and many other opcodes very early in Bitcoin’s life to ensure that Script was not Turing complete.

Bitcoin Nodes & Avoiding Arbitrarily Long Compute

So why did Satoshi make Bitcoin so restrictive? The answer lies in the economics of Bitcoin. Bitcoin’s security relies on decentralization. It relies on users like you and me to run nodes and VERIFY that the transactions submitted to the network are valid. A full node runs the computation of every transaction in every block on the network. And unlike Ethereum, the fee a user must pay to get their transaction included is only loosely related to the amount of computation required to execute the transaction.2

Now think what might happen if someone got a transaction included in a block that took 2 hours for a node to run. That would effectively be a DDoS on the Bitcoin network! Nodes are expected to verify a block in a timely manner because miners can’t add a new block until the previous one is verified. By restricting the language of Bitcoin, Satoshi ensured the amount of computation required for a node to verify a block would never spiral out of control.

Enter BitVM…

BitVM achieves this through some crazy wizardry.

What does BitVM enable?

With all that background knowledge out of the way, we’re brought back to BitVM. BitVM has created a way to verify arbitrary computation on Bitcoin.

Before BitVM, Paul and Vicky couldn’t have played their chess game and had the result verified by Bitcoin. Now they can!

BitVM will allow them to deposit 0.5 BTC each into a 2/2 multisig address that they both control. If they both agree that Vicky won, they both sign a transaction that sends the 1 BTC to Vicky. Easy peasy! If they disagree, however, there is a way to verify every chess move that happened on Bitcoin and force Paul to send Vicky the 1 BTC. This is what makes BitVM so special.

tl;dr zk-rollups are the holy grail of scaling Bitcoin. If BitVM turns Bitcoin from a calculator into an iPhone, then zk rollups will transform that iPhone into a supercomputer.

Up until now, zk rollups haven’t been built on Bitcoin because there was no way to trustlessly get BTC from the main chain to the rollup, nor to verify zk proofs. With BitVM, we just may be able to do both!

If BitVM can supercharge Bitcoin to enable zk rollups, a new era of fully on-chain Bitcoin applications is about to explode. Defi, DAOs, gaming, etc. will all be coming to Bitcoin. THIS, dear readers, is the promise of BitVM. It should have you stoked to see what comes next!

Example BitVM Walkthrough

  • Part I: What is BitVM and why should I care? (this article)

  • Part II: Computers, Programs, and Circuits

  • Part II: Committing to a Program on Bitcoin

  • Part IV: The Challenge Protocol

  • Part V: What challenges does BitVM face?

Notes

So why don’t we see an on-chain chess game on Bitcoin like we 1?

The answer lies in Bitcoin’s underlying language: .

Ethereum’s smart contract language, Solidity, is considered “”. While this isn’t strictly true, it’s used in this context to mean Solidity can run pretty much any program imaginable. Chess, a Defi protocol, a zero-knowledge proof verifier - these can all be implemented directly on Ethereum.

If you clicked on the earlier, you’ll have seen a list of these things called opcodes. These are essentially the buttons of the Bitcoin calculator. You’ll see opcodes for simple things like addition (OP_ADD) and cryptographic operations like hashing (OP_SHA256).

What and the clever team at have figured out is a way to allow those arbitrary programs to be executed on Bitcoin without making every full node run every line in the program.

First it simulates (the building block of computers) within Script. Then, it uses something called hashlocks and the structure of taproot addresses to verify the arbitrary computation. Finally, through an elegant challenge protocol, the Bitcoin network can adjudicate which party (Paul or Vicky in our example) is correct. We’ll be diving deep into how that all works in future installments. Alternatively, gives a high-level overview for the curious reader. For now, let’s pop back up a level and talk about what this means.

While , the design space on BitVM is limitless. It will allow users to verify that almost any program ran correctly all directly on Bitcoin! We’re just a few weeks in, and we’re already seeing strong groups to test out this new system.

As for me, I’m most excited about the potential for BitVM to: a). enable trust-minimized bridges, and b.) verify zero-knowledge proofs. These are two key components of a zero knowledge (zk) rollup. If you aren’t familiar with zk rollups, I recommend where I cover why Bitcoin will ultimately need zk rollups.

This concludes the BitVM Primer. I’m considering making this Part I in a series that walks the non-technical reader through the BitVM (full outline below). If that gets you excited, please let me know in the comments or on . I’m always looking for new ways to help the community better understand Bitcoin.

Huge shoutouts to , , , , , & for their thoughtful comments on this article.

https://github.com/twhit223/bitvm_primer
@Dr_DAO_
Taproot Wizards
do on Ethereum
Script
Turing complete
Script link
Robin
ZeroSync
Boolean logic gates
Shinobi’s article
chess is a cool example
hacking away on toy programs
this article
Twitter (@Dr_DAO_)
Dazza
English
Isabel
Jan
Super Testnet