The Bitcoin white paper was released on October 31, 2008, when Satoshi Nakamoto published the Bitcoin white paper (Bitcoin: A Peer-to-Peer Electronic Cash System) on the P2P foundation website, marking its 16th anniversary today.

The initial trading price of Bitcoin was $0.0008, and it has appreciated over 90 million times since then.

It is well known that Bitcoin has redefined the way people trust value transfer. In a decentralized network, trust is replaced by technology, and each transaction is verified by the network itself. However, with the rise of decentralized finance (DeFi) and smart contracts, how to safely introduce more complex computations into the Bitcoin network and build richer content has become a new challenge.

What is BitVM?

In December 2023, Robin Linus, the project leader of ZeroSync, published a white paper titled (BitVM: Compute Anything On Bitcoin), sparking discussions about enhancing Bitcoin's programmability.

The emergence of BitVM brings to Bitcoin the capability of off-chain execution of complex computations and on-chain verification of results, significantly expanding its functionality. More straightforwardly, BitVM is a solution that allows for the execution of complex computations and smart contracts on the Bitcoin network. It is a Turing-complete solution that can be achieved without changing the consensus of the Bitcoin network. By becoming Turing-complete, the Bitcoin blockchain can theoretically be used to extend Bitcoin's functionality far beyond the vision of a 'peer-to-peer electronic cash system' first proposed in the Bitcoin white paper. It allows users to create applications on top of Bitcoin—similar to the functions already realized on other platforms like Ethereum—while maintaining Bitcoin's well-known high security and decentralization.

In summary, BitVM enables the Bitcoin ecosystem not only to meet transaction needs but also to create more complex DApps on the BTC layer. At the same time, it retains the security and decentralization features of Bitcoin.

However, complexity often comes with risks, and ensuring the security of these complex computations has become a pressing issue.

Currently, there are many teams dedicated to BitVM research and development, including ZeroSync founded by BitVM founder Robin, the Bitcoin native project Nubit established by Prof. Yu Feng from the University of California, Santa Barbara, Alpen Labs focused on ZK scalability of Bitcoin, Chainway Labs specializing in Bitcoin ZK Rollup, Citrea, and Fiamma, as well as Layer 1 Foundation led by Domo, the founder of BRC20.

Currently, Nubit, in collaboration with ZeroSync, Alpen Labs, Chainway Labs, and Layer 1 Foundation led by Domo, published a paper on October 31 (Push-Button Verification for BitVM Implementations), completing and launching the BitVM formal verification tool. In the paper, Nubit provides further assurance of the security of BitVM applications through formal verification (Formal Verification) automated mathematical proofs, allowing developers and users to confidently build and use applications.

What is formal verification? How does it help ensure the security of BitVM?

In Robin's paper, BitVM introduces a system that allows any computation to be verified on the Bitcoin blockchain without affecting its security or changing the network. However, system development and application construction based on this often require expert manual code review. In an ecosystem like Bitcoin, which has high security requirements, manual reviews are both time-consuming and prone to errors. Formal verification (Formal Verification) can automatically verify whether program logic meets expectations through pure mathematical operations, providing security assurance for the overall BitVM system.

Imagine you are deploying a smart contract on Bitcoin involving multi-party transactions. To ensure the contract executes correctly in various scenarios, traditional methods may require repeated testing of each possibility. However, with formal verification (Formal Verification) tools, mathematical proofs will automatically check the correctness of the contract, greatly enhancing the security attributes of system operations.

The Unique Challenge of BitVM: The Complexity of Smart Contracts and the Limitations of Bitcoin Scripts

Unlike Turing-complete blockchains such as Ethereum, Bitcoin's script language is limited by security considerations and cannot directly execute complex computations. BitVM achieves the basic functionality of Bitcoin smart contracts through a model of off-chain execution and on-chain verification. In other words, all complex computations are completed off-chain, with only the results verified on-chain, significantly alleviating the load on the Bitcoin chain. However, this innovation brings significant implementation challenges.

First, BitVM's design includes a large number of stack operations and register computations that need to be implemented and verified efficiently in Bitcoin's non-Turing complete script. For example, to ensure that the sign of a value can be correctly determined during contract execution, a commonly used function is is_positive, which checks the highest bit of the number to determine its sign. However, in an early version, the is_positive function incorrectly classified 0 as a positive number due to computational bias, and this subtle error could lead to significant deviations in contract execution, potentially resulting in economic losses.

Image Source: (Push-Button Verification for BitVM Implementations)

Through formal verification (Formal Verification), Nubit’s tool can automatically check similar computational logic before code deployment, ensuring that all execution paths meet expectations. Here, the Nubit team has designed a register-based DSL (domain-specific language) that transforms the complex stack operations of Bitcoin scripts into more easily verifiable register operations, thus simplifying the development and verification process. In addition, for repeatedly looping calculations, this DSL introduces 'loop invariants' to effectively reduce redundant calculations in the code and lower verification difficulty.

Image Source: (Push-Button Verification for BitVM Implementations)

Verification Effect: Efficiency of Automated Formal Verification

From the paper, Nubit’s formal verification (Formal Verification) tool has been extensively tested on 98 BitVM SNARK verifier benchmarks, achieving a verification success rate of 94%, with most verification tasks completed within seconds. Compared to traditional manual reviews, this tool not only improves verification speed but also avoids the possibility of human error, providing assurance for the reliable execution of BitVM smart contracts on Bitcoin.

This result proves that formal verification (Formal Verification) indeed possesses high practical value in Bitcoin's complex applications, particularly in BTCFi applications with high security requirements, effectively reducing risks.

BitVM and the Bitcoin Ecosystem: Expanding the Potential of Bitcoin Smart Contracts

Through formal verification (Formal Verification), the security of BitVM has been significantly enhanced, helping developers build more complex contracts and applications on Bitcoin while allowing users to enjoy the high security of the Bitcoin ecosystem in decentralized finance and cross-chain applications. As an innovative tool in the Bitcoin ecosystem, BitVM lays the foundation for Bitcoin's expansion in complex applications.

Bitcoin was never designed as a complex computation platform, but rather focused on the reliability of value storage and transfer. However, with the launch of BitVM, the Bitcoin ecosystem is moving towards smart contracts and DeFi applications. Completing formal verification for BitVM not only represents a technical advancement but also marks an important milestone for Bitcoin in decentralized finance and smart contracts.

BitVM Opens the Future Ecosystem of Bitcoin

In the development of BitVM, Nubit has closely collaborated with teams such as ZeroSync, Alpen Labs, Chainway Labs, and Layer 1 Foundation. The formal verification of BitVM it launched brings new security and technical standards to the Bitcoin ecosystem. Meanwhile, Nubit will continue to promote the development of secure, verifiable Bitcoin-native computation with the support of Starkware and Fractal Bitcoin.

All beginnings are difficult, and the Bitcoin ecosystem brought by BitVM is still in its infancy. However, the deep collaboration and innovation among early projects will not only provide strong guarantees for the security of complex computations but also open up infinite possibilities for the future of Bitcoin. A new era of Bitcoin, where everyone can trust and participate, is on the horizon.

This article comes from a submission and does not represent BlockBeats' views.