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
  • How to convince people
  • Simple addition
  • BitVM
  • Caveats
  • Lightning comparison
  • More

Was this helpful?

  1. Resources
  2. Primer

Simple explanation of BitVM

PreviousWhat is BitVM? A Beginner’s Guide to Turing-Complete Bitcoin Smart ContractsNextBitVM Primer

Last updated 1 year ago

Was this helpful?

original:

(Bitcoin magazine - and LightningNetwork+ - did similar intro posts)

How to convince people

Suppose there is some complicated open-source program that takes 30 mins to run and in the end outputs 42. Peggy (the prover) could come up and say hey, I've taken the time to run this for all of you and 42 is the answer.

Why should anyone trust her? Therefore she says I am willing to bet 1 BTC.

But still In order to verify the answer you need to run the code on your machine. And thus the fact Peggy did it before does not help.

If you see 42 you can then start convincing people "wow she was right, trust our computation". But for an outsider that is indistinguishable from a shill Peggy paid to confirm her false result. You might also start proclaiming I've got 43 on my terminal Peggy now owes me 1 BTC. How can such a bet ever get resolved? Obviously another trusted third party can still be lying. Also the majority of votes is not enough. To keep that 1 BTC Peggy might have created some fake forum posts as if 10 people confirmed her result (Sybil attack). You could couple that with a PoS like scheme (based on money or reputation) but this would still be shitty.

Simple addition

Now let's say instead of a long running computation the program is just 32+10 (but the majority of people still don't want to calculate this on their own). In this case bitcoin script could help. Peggy could create a "smart contract" in a sense after a 2 day timelock I can get my 1 BTC back but in the meantime anybody (first one) who comes up with a number X that is not 42 (42 OP_EQUAL OP_NOT) and the result of 32+10 (32 10 OP_SUM) can take my money. Now if she was lying and do the thing with 43 (trying to convince the world about the wrong result) two things could happen. Either nobody would notice or because there is 1 BTC for grabs Victor (the verifier) could come along, run the computation on his computer and be like oh cool I can just spend that 1 BTC of hers by providing 42 (the fraud proof). By claiming the money he makes everyone a favor since people are able to see Peggy was lying.

* Actually in such a scheme a miner could take all the money, but oh well, let's ignore that here

BitVM

The problem is just that bitcoin script is quite basic. It does not allow for constructs we are used from regular programming languages like loops. But this is by design.

BitVM is a way to "chop up" that open-source code everyone has access to into smaller parts and put those on the bitcoin blockchain. Since tapscript is used you don't need to actually put this gigantic mess on-chain (only the root of that "tree"). Similar as a real computer that is built out of a huge number of logic gates, each part is a collection of boolean gates.

Now Victor can play a game with Peggy on the validity of a specific simple part of the computation. (All parts need to be ok in order for everything to work out, but we are basically doing just random audits.) If Victor finds out Peggy was lying similar as previously explained he can publish the fraud proof on-chain (this small part is simple enough so bitcoin can be the "enforcer", afterall bitcoin knows about OP_AND, OP_OR and OP_NOT). Also if Peggy is not cooperative Victor can get her 1 BTC.

Basically during that X days Victor can do multiple checks (limited by the initial construction). In the end he can be convinced Peggy actually ran the code and got 42 or get 1 BTC richer. In order for Peggy to play along there could be some direct monetary benefit attached for her too.

The remarkable thing here is that bitcoin is able to be the trusted third party for an arbitrary turing complete computation despite the fact bitcoin script is not able to actually execute it.

Caveats

The BitVM protocol requires a lot of (off-chain) interactivity ("chatter") between Peggy and Victor. People think it is highly likely Peggy executed the code because there is always the possibility some honest Victor comes along and "exposes" Peggy in a verifiable way on-chain to collect the reward. However this is not a proof. Also the fact some Victor is doing a verification does not help, because Peggy could collude with him. In the end Victor is convinced beyond doubt but he still isn't able to prove Peggy was honest to everyone else.

Lightning comparison

I just realized the stuff is a quite similar to lightning. When a new Victor comes along he basically opens a dual funded channel with Peggy (both contribute 1 BTC). They do a lot of computation up-front and then agree that after X days Peggy will part with 1.1 BTC and Victor with 0.9 BTC. Then if during that time Victor is able to prove Peggy was cheating he "force-closes" the channel and ends up with 2 BTC. But in a similar way Peggy can also flag an "impossible question" from Victor and get 2 BTC. Obviously this requires the monetary incentives to align perfectly or nobody will be willing to open "new channels".

More

People say this will enable the construction of Ethereum like smart-contracts on Bitcoin. But I believe this is quite cumbersome and likely not even the primary design goal. BitVM it is more like protocol for arbitrary computation. Because also on Ethereum despite the fact the language is Turing complete not all computation is possible (beside not being affordable due to high gas price). That is because every node on the network has to redo all the computation in order to check so you can't have something that takes 30 min for instance (unless miners are cheating and just trusting the stuff blindly).

Adam Back also compared the scheme to .

Read more in the or the .

https://github.com/fiksn/bitvm-explained
The Big Deal With BitVM: Arbitrary Computation Now Possible on Bitcoin Without a Fork
BitVM: Ushering in a New Era of Bitcoin Computations
TrueBit
ZKCP
BitVM whitepaper
tapleaf circuits implementation