Scroll down
Close -

BitVM Explained: In-Depth Guide to Smart Contracts on Bitcoin

Published on: 15 February, 2024

Bitcoin broke the mold when it came to peer-to-peer payments, but the network has limitations when it comes to scalability.

This pain point often comes into sharp focus during bull markets. Increased activity can cause fees to surge — making transactions prohibitively expensive for many.

But there are solutions that can boost this blockchain’s capacity, all while enhancing security and unlocking new functionality surrounding smart contracts.

One of them is called BitVM — and here, we’re going to explain how this concept works.

What is Bitcoin Virtual Machine (BitVM)?

If you’ve been in the blockchain space for a while, you will have heard of the Ethereum Virtual Machine. This infrastructure allows developers to execute smart contracts and process transactions on the network, as well as other compatible chains.

Right now, the Bitcoin blockchain has limited capability when it comes to smart contracts. But a new computing paradigm called BitVM proposes the creation of “a novel design space for more expressive Bitcoin contracts and also off-chain computation.” Robin Linus, a core contributor to ZeroSync, explained how this technology would work in a paper released in late 2023.

BitVM’s goal isn’t to emulate Ethereum, but to ensure that Bitcoin can scale as demand continues to grow. With BTC ETFs delivering a surge in interest from institutional and retail investors alike ahead of the Bitcoin halving, this could be essential. 

If implemented, BitVM will enable optimistic validation of arbitrary off-chain computations on Bitcoin — ensuring any computation can be executed on the network without changing the foundations that make Bitcoin so special. That means no soft forks would be required.

One crucial feature that BitVM could introduce is Optimistic validation of Zero-Knowledge (ZK) rollups, a feature that’s already common in Layer 2 protocols based on top of Ethereum. This means transactions are processed off-chain to alleviate congestion. They’re then batched together and submitted to the mainnet to be finalized. Mechanisms would also be in place to prevent fraud, meaning verifiers would be able to question transactions that may not be genuine. 

The proposed enhancements that BitVM would deliver are possible because of the Taproot soft fork that happened back in 2021 — as well as the components that already exist thanks to Bitcoin’s Script programming language.

What are the benefits of BitVM?

Enabling optimistic validation of ZK rollups on top of Bitcoin

A big advantage of BitVM concerns the fact that it will enable the validation of layer 2 computations on Bitcoin itself without changing consensus rules — and without slowing the blockchain down. Complex computations would be handled off-chain before being validated on the mainnet. Two parties would be able to interact using these smart contracts.

For example, transactions executed on Rootstock, a Bitcoin layer 2, can be posted on Bitcoin mainnet using BitVM.

Bridging sidechains and rollups to Bitcoin

Currently, when a user bridges BTC to a Layer 2, they have to deposit that BTC into a bridge contract secured by either multi-party authentication (multi-sig), or by the users’ collaterals of non-BTC assets. For example, users who bridge BTC to Rootstock have to deposit that BTC to the PowPeg.

BitVM can potentially enable trustless or at least trust-minimized bridges that require fewer intermediaries and less centralization, minimizing the risk of fraud, manipulation, or censorship. 

Reduced gas fees

Average Bitcoin transaction fees can fluctuate wildly — and at one point in December 2023, they surged to highs of $38.43. BitVM has the potential to reduce this dramatically by ensuring that data and corresponding computations are kept off-chain. On-chain verification would only be required in the event of a dispute. This could enhance Bitcoin’s utility, all while accelerating adoption.

Enhanced security

Security is another plus, as transactions by malicious actors can be proven to be fraudulent. BitVM’s focus on contracts between two parties — rather than the Ethereum Virtual Machine, which can process contracts between multiple parties — also enhances safety.

What are the challenges?

As with most innovations, BitVM could face some limitations. 

Complexity of two-party architecture

By rolling out architecture that only supports two parties in a transaction, that rules out the more complex contracts that Ethereum is now used for on a regular basis. This could limit the effectiveness of DeFi protocols with intricate systems and many moving parts.

Computational demands

And while such a computing paradigm would free up capacity on the Bitcoin mainnet, the computations that BitVM enables would need to be executed elsewhere, placing an additional onus on the two parties involved in a smart contract to begin with. This, when coupled with the complexities within BitVM’s code, means uptake among current users might be slow.

Limited use cases for smart contracts

Smart contracts based on blockchains like Ethereum also rely on data oracles, ensuring that the network can interact and take action based on real-world information such as stock market data and weather forecasts. At least in the initial proposal for BitVM, there wouldn’t be any support for oracles — potentially limiting what smart contracts could be used for.

Building Smart Contracts on Bitcoin

Overall, BitVM remains a concept right now — with various potentials for use cases. 

Developers looking to build DeFi on top of Bitcoin and roll out dApps can already do so on the Rootstock blockchain, the first, and longest-lasting EVM-compatible Bitcoin sidechain.

It is the only layer 2 solution that combines the security of Bitcoin’s proof-of-work, with Ethereum’s smart contract capabilities.

Rootstock is open-source, EVM-compatible, and secured by over 60% of Bitcoin’s hashing power, which makes it a gateway to a vibrant ecosystem of dApps that continues to evolve to become fully trustless. 

Starting building DeFi on Bitcoin with Rootstock.