What is BitVM: 'Computing Anything on Bitcoin'

Discover the groundbreaking BitVM that revolutionizes Bitcoin by enabling complex computations and smart contracts directly on its blockchain. Dive into how BitVM works, its impact on Bitcoin scalability, and explore key projects leveraging this innovative technology.

What is BitVM: 'Computing Anything on Bitcoin'

By now you probably know that Bitcoin does not directly support complex smart contracts on its network. Maybe it is true when they say 'constraints drive creativity.' The lack of smart contract functionality on Bitcoin's base layer has motivated developers to come up with innovations that have completely exhausted the notion of what Bitcoin is capable of. One of these innovations is the Bitcoin Virtual Machine (BitVM).

Join us in this article as we take you through the new BitVM and how it enables the execution of complex computations and smart contracts on Bitcoin. We'll look at various projects building on this very idea.

What is a Virtual Machine? 

First, let us understand what a virtual machine is. A virtual machine is essentially a software emulation of a physical computer. This means it functions within a host system but operates independently, with its own operating system and applications. With the most famous being the Ethereum Virtual Machine of course.

A Beginner’s Guide to Understanding the Ethereum Virtual Machine
In this beginner’s guide, we will explore the basics of the Ethereum Virtual Machine, including its functions, architecture, and impact on the blockchain industry.

In blockchain, a virtual machine is crucial for running smart contracts and decentralized applications, which is what Bitcoin hasn't been known for until very recently.

What is BitVM?

The Bitcoin Virtual Machine is a proposed computing paradigm that allows for the execution of complex computations and smart contracts on the Bitcoin network. The genius of BitVM lies in its use of a prover-verifier model where computations are verified on-chain, but executed off-chain.

It was developed and introduced by Robin Linus in October 2023, in a whitepaper titled "BitVM: Compute Anything on Bitcoin" as an open-source project. This means anyone can inspect, modify, and enhance it wherever, which perhaps is the reason many projects have started building from it right away.

"At the end, we want to scale Bitcoin. A good way to do that would be having some kind of trusted two-way pack, like some kind of bridge to bridge Bitcoin to other chains. Since my background is mostly in zero-knowledge proofs and validity proofs, I always wanted to have some kind of validity proof verifier on Bitcoin. And that was the motivation behind BitVM."- Robin Linus 
BitVM meme

How Does BitVM Work?

To understand how BitVM works, let's start from the basics. A computer uses devices called logic gates to perform basic logical functions. Your smartphone, tablet, or laptop likely contains hundreds of thousands, if not millions, of different types of logic gates to help it perform functions.

Among these large numbers of logic gates, there is one special type called a NAND (NOT-AND) logic gate, commonly referred to as a universal logic gate. It is a gate that can be used to create any other type of logic gate function, which is exactly where BitVM saw an opportunity.

BitVM discovered a way to represent NAND logic gates on Bitcoin using its existing Script language, referring to it as a “binary circuit” (bit). The result of this is a Turing-complete Bitcoin without changing the original Bitcoin rules or a soft or hard fork. In other words, no changes to Bitcoin's protocol were needed.

A Turing-complete Bitcoin means it can solve any computational problem.

The Prover-Verifier Model

To verify these computations, BitVM is based on fraud proofs and a challenge-response protocol. This is a two-party framework made up of a prover and a verifier.

The prover and verifier collaborate to compile programs into a binary circuit format. Each component of this circuit is linked to a leaf script within a Taproot address (a feature of the Taproot upgrade) controlled by the prover, which acts as a commitment to the program.

Why Bitcoin Keeps Changing Its Mind: Impact of Bitcoin’s SegWit and Taproot Upgrades?
Discover the transformative journey of Bitcoin through its major upgrades. From hard forks like Bitcoin Cash to soft forks like Taproot, learn how each has shaped the blockchain’s future.

To enforce honesty, both parties deposit funds into this address, hence activating the contract. When the prover executes the program off-chain and reports the results, the verifier can challenge these results if they seem incorrect. Also known as 'Fraud Proofs.'

Working of a Fraud Proof

What Role Do Rollups Play on BitVM?

As mentioned in the BitVM whitepaper, the contracts of these new innovations resemble optimistic rollups in Ethereum.

BitVM uses the optimistic validation model and batch-style of transactions (roll) and has an optimistic validation model that assumes that the vast majority of two-way interactions between provers and verifiers aren’t going to result in disputes (hence the term “optimistic”).

On the other hand, once verified, transactions on BitVM are bundled into a batch, and then posted to the Bitcoin blockchain. As such, the overall impact of BitVM transactions on Bitcoin’s chain becomes minimal.

To learn more about rollups on Bitcoin, read our previous article here. 🦦⬇️

Bitcoin Rollups: The Ultimate Guide to Layer 2 Scalability Solutions
Discover how rollups offer yet another way to tackle Bitcoin’s scalability issues. Explore various rollup projects and learn about the challenges they face in this comprehensive guide. See how Bitfinity positions itself among these solutions and why it presents a better proposition.

The Limitations

As the BitVM directs its focus on two-party contracts - the prover and verifier - it means that only two parties are involved in creating a BitVM contract, and only those two can participate in the roles needed.

For instance, the verifier must be chosen at the beginning of the smart contract execution, and only he can challenge that computation. This is a scenario which may not suffice for the growing complexity of decentralized finance, that often involves more and more multiple parties. Think of the composability aspect of DeFi.

When Did DeFi Begin? A Timeline of Decentralized Finance
Dive into the evolution of Decentralized Finance (DeFi), from its pioneering days on the Ethereum platform to the advanced applications shaping today’s financial blockchain landscape.

Another limitation is the challenge-response protocol requires up to 70 on-chain transactions (over multiple weeks or even months in practice) to disprove a faulty operator.

To address these limitations, improvements to the original design have been made through a recent version termed the BitVM2.

BitVM2

BitVM2 was introduced not that long ago in August 2024 by the same Robin Linus and five other co-authors in BitVM2: Bridging Bitcoin to Second Layers.

This new version introduces a few changes to the original design to mitigate its two major shortcomings. Unlike the original version, BitVM2 requires only 3 on-chain transactions to challenge a computation that can be executed within 1-2 weeks.

In addition, it allows permissionless challenging, which means any user with a Bitcoin full node can challenge faulty outputs.

This is achieved by moving away from directly using script NAND gates and using a general SNARK zero-knowledge proof verifier.

What Is the BitSNARK Verification Protocol? Unveiling Bitcoin’s Newest Innovation
Discover how BitcoinOS’s open-sourcing of the BitSNARK verification protocol unlocks zero-knowledge proofs for Bitcoin’s mainnet. Learn how this advancement paves the way for rollups, cross-chain interactions and a future of interoperable smart contracts on the most secure blockchain.

A BitVM bridge is also introduced, which is a protocol that enables trust-minimized bridges between Bitcoin and other blockchain networks, sidechains in particular.

Bitcoin’s Layer 2 Landscape: What are Bitcoin Sidechains
In this article, you will understand what sidechains and their role in scaling the Bitcoin blockchain. We will examine different examples of Bitcoin L2 solutions that use sidechains, their unique advantages, and their drawbacks compared to other Layer Two scaling methods.
It might be possible to bridge BTC to foreign chains and facilitate more complex smart contracts.

Projects Build on BitVM

Bitlayer

Bitlayer is a Layer 2 smart contract-capable solution for Bitcoin based on the BitVM paradigm. Through the concepts of BitVM, Bitlayer builds a layered virtual machine technology to support arbitrary types of computational operations verified through zero-knowledge proofs and an optimistic approach.

Introducing Bitlayer Mainnet-V1: Unlocking the Potential of Bitcoin
Bitcoin is seeing a massive, frenzied adoption that’s unparalleled in any other time in its history.

Additionally, Bitlayer aims to use BitVM’s fraud-proof protocol for state transition verification and combines the DLC (Discreet Log Contracts) - a contract execution framework based on an oracle with BitVM (to act as the oracle) - to facilitate a secure asset bridge.

Bitlayer future-proof architecture based on BitVM

Citrea

Citrea is a Zero-Knowledge Rollup building on Bitcoin. As a rollup, it bundles transactions and depends on BitVM to optimistically verify them on Bitcoin.

The project has also developed Clementine, a BitVM based trust-minimized two-way peg program that allows the static size of UTXOs to peg in and out to facilitate valid deposits and withdrawals. The project is still a developing one, and currently, it is at the testnet stage.

Unveiling Clementine 🍊-Citrea’s BitVM Based Trust-Minimized Two-Way Peg Program
Today we introduce Clementine 🍊, Citrea’s BitVM based trust-minimized two-way peg program. Through this blog post we explain the core components of Clementine and how it works. You can find the work-in-progress implementation here. The core components of Clementine are: * Light Client Proof (of Bitcoin and Citrea) * Zero-Knowledge Proof (ZKP) Verifier

Build on Bitcoin - BOB

BOB is a hybrid L2 on Bitcoin. Hybrid L2s inherit security from Bitcoin, as the most secure and decentralized network. As highlighted in its roadmap, BOB aims to harness BitVM2 capabilities to facilitate optimistic rollups and its BitVM-powered bridge design to enable users to deposit and withdraw BTC to and from BOB.

BOB - Build everything on Bitcoin
BOB is a hybrid L2 that combines the security of Bitcoin with the versatility of Ethereum. BOB’s mission is to onboard the next billion users to Bitcoin.

Apart from the above projects BitVM has also inspired others like Rootstock which rolled out BitVMX, a project built on this initial discovery with additional innovations to create an improved development framework for running programs on Bitcoin. 

Announcing BitVMX: An Advanced Computational Layer for Bitcoin - Rootstock Labs
RootstockLabs joins forces with Fairgate to research, develop & test BitVMX, expanding the frontiers of decentralized technology.

Also, Stacks Foundation is rolling out support for the continued development of BitVM and is expected to share its milestones in  Q1 2025. 

Stacks Foundation | Activating the Bitcoin Economy
We believe Bitcoin and adjacent open-source technology ecosystems will become the foundation for a safer, more equitable, more open internet.

How Does BitVM Differ from Ethereum's EVM?

As highlighted by Robin Linus, the BitVM tries to mimic the same functionality that the Ethereum virtual machine does for the Ethereum network. But despite this, there are two minimal differences:

Unlike Ethereum's EVM, which performs a range of computations directly on the blockchain, the BitVM handles most of its operations off-chain except in the case of a dispute.

Also, the EVM is an integral part of the Ethereum blockchain which means that Ethereum would not exist without it. On the other hand, the BitVM is an additional layer to the Bitcoin blockchain and does not enforce any rule changes to the main chain, so Bitcoin remains untouched whether it exists or not.

The Future of EVM Technology: A Journey Beyond Ethereum’s Boundaries
Since its launch in 2015, the EVM has evolved significantly, and it is expected to continue to advance as developers and businesses explore new use cases and applications for the technology.

Conclusion

The development of BitVM is another testimony to Bitcoin's innovation and we see that several projects are already building on what was just unthinkable a few months ago. Additionally, as it uses off-chain transactions and consolidates everything into a single state change, it will boost Bitcoin's scalability.

Mainnet and TGE on 19th November.

Connect with Bitfinity Network

Bitfinity Wallet | Bitfinity Network | Twitter | Telegram | Discord | Github

*Important Disclaimer: The information provided on this website is for general informational purposes only and should not be considered financial or investment advice. While we strive for accuracy, Bitfinity makes no representations or warranties regarding the completeness, accuracy, or reliability of the content and is not responsible for any errors or omissions, or for any outcomes resulting from the use of this information. The content may include opinions and forward-looking statements that involve risks and uncertainties, and any reliance on this information is at your own risk.

External links are provided for convenience, and we recommend verifying information before taking any action. Bitfinity is not liable for any direct or indirect losses or damages arising from the use of this information.