The Bitcoin white paper was released on October 31, 2008. 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 now appreciated over 90 million times.


It is well-known that Bitcoin has redefined the way people trust value transfer. In a decentralized network, trust is replaced by technology, and every 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 lead of ZeroSync, published a white paper titled (BitVM: Compute Anything On Bitcoin), sparking discussions on enhancing Bitcoin's programmability.


The emergence of BitVM brings the ability to perform off-chain complex computations and verify results on-chain for Bitcoin, greatly expanding its functionality. More straightforwardly, BitVM is a solution that allows complex computations and smart contracts to be executed 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 functions 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 functionalities 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 while retaining Bitcoin's security and decentralization features.


However, complexity often comes with risks, and ensuring the security of these complex computations has become an urgent issue to be addressed.


Currently, there are many teams dedicated to BitVM research and development, including ZeroSync founded by BitVM's founder Robin, Nubit founded by Prof. Yu Feng from the University of California, Santa Barbara, Alpen Labs focusing on ZK scaling for Bitcoin, Chainway Labs focusing on Bitcoin ZK Rollup, Citrea, Fiamma, and Layer 1 Foundation, which is 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 (Push-Button Verification for BitVM Implementations) on October 31, 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) and 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 reviews. In an ecosystem like Bitcoin, which has extremely high security requirements, manual reviews are both time-consuming and error-prone. Formal Verification, through pure mathematical operations, can automatically verify whether program logic meets expectations, providing security assurance for the overall BitVM system.


Imagine you are deploying a smart contract on Bitcoin that involves multiple party transactions. To ensure the contract executes correctly in various scenarios, traditional methods might require repeatedly testing every possibility. But with formal verification (Formal Verification) tools, mathematical proofs will automatically check the correctness of the contract, greatly enhancing the system's operational security attributes.


BitVM's unique challenges: The complexity of smart contracts and the limitations of Bitcoin scripts.


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


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



Source: (Push-Button Verification for BitVM Implementations)


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



Source: (Push-Button Verification for BitVM Implementations)


Verification Effect: The Efficiency of Automated Formal Verification.


From the paper, Nubit’s formal verification (Formal Verification) tools have undergone extensive testing on 98 BitVM SNARK verifier benchmarks, achieving a verification success rate of 94%, with most verification tasks completed in seconds. Compared to traditional manual reviews, this tool not only improves the 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 holds immense practical value in complex applications of Bitcoin, particularly in BTCFi applications where security requirements are extremely high, 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 extending Bitcoin in complex applications.


Bitcoin was never designed as a complex computation platform; instead, it 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. For the development of decentralized applications, completing the formal verification of BitVM is not only a technical advancement but also represents an important milestone for Bitcoin in decentralized finance and smart contracts.


BitVM opens the future ecosystem of Bitcoin.


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


Everything is difficult at the beginning. The Bitcoin ecosystem brought by BitVM is still in its infancy, but 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 coming.


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