Author: Bitlayer Research Team
Original title: BitVM and Bitlayer: Pioneering Bitcoin’s Programmable Future
Original link: https://blog.bitlayer.org/BitVM_and_Bitlayer_Pioneering_Bitcoins_Programmable_Future/
Bitcoin, as the world’s most secure and decentralized blockchain, has long been considered limited in programmability compared to platforms such as Ethereum. However, BitVM is changing this by introducing an advanced computing and programmable framework for Bitcoin. At its core, BitVM unlocks the potential for trust-minimized Bitcoin bridging and other applications while maintaining Bitcoin’s principles of decentralization and security.
This article will explore the history of BitVM, its current state, the key engineering efforts behind it, and Bitlayer’s outstanding contributions as a key contributor to the BitVM ecosystem.
BitVM’s History
BitVM represents a transformative step in the expansion of Bitcoin’s capabilities beyond digital currency. BitVM’s journey is marked by the following key milestones:
Initial Proposal: Robin Linus first proposed BitVM as a general-purpose computing solution for Bitcoin.
Interactive Bisection: Robin improved on the concept by introducing interactive bisection (leveraging RISC-V instructions) to make computations more efficient.
BitVM2: The latest version, BitVM2, removes the binary division and introduces a permissionless challenge mechanism, making it a powerful Bitcoin bridge framework.
Currently, the BitVM community is almost entirely focused on BitVM2, which is the version discussed in this article.
About the BitVM Alliance
The BitVM Alliance was founded by Robin Linus and Lukas George to accelerate the development and promotion of BitVM. The alliance brings together multiple leading projects and teams to jointly push the boundaries of Bitcoin programmability. For more information, please visit the BitVM project page.
BitVM Project Status
BitVM Working Principle: Simplified Version
BitVM implements a bridge mechanism that connects Bitcoin to a programmable environment, facilitating workflows such as asset transfers. The entire process can be divided into three key steps:
Peg-in: The user locks BTC in the BitVM smart contract and casts wrapped BTC (YBTC) on the target system or other systems.
Peg-out: The user requests a withdrawal, the Broker provides liquidity, and transfers BTC to the user.
Claim: The Broker retrieves funds from the BitVM smart contract, provided that no one challenges the request.

Source: BitVM2 White Paper (https://bitvm.org/bitvm_bridge.pdf)
The role of BitVM smart contracts
BitVM smart contracts are essentially a pre-signed Bitcoin transaction graph that defines the rules and workflow that all participants must follow. Its main features include:
Pre-signed transactions: These transactions are signed in advance by all participants to enforce the protocol rules.
Multi-signature control: Funds are locked in a multi-signature wallet controlled by all workflow participants.
Once the transaction graph is published, users can lock BTC into the BitVM contract and mint wrapped BTC on the target system or other systems to start the entire workflow.
Ensuring integrity: Dispute resolution
To ensure the validity of the request, BitVM adopts a dispute resolution protocol:
Pre-commitment: Broker pre-commits to a Groth16 validator result calculated by an offline procedure to ensure that the request is valid (for example, the wrapped BTC has been destroyed and the Peg-out transfer has been completed).
Challenge: If someone issues a challenge, Broker must reveal all intermediate values calculated by the validator.
Verification: The challenger runs the validator offline, looking for any invalid fragments. If fraud is found, the challenger submits a transaction to replay the invalid block onto Bitcoin, thus invalidating the request.
Key Engineering Work
Groth16 Validator Development
The Groth16 validator is the cornerstone of BitVM, enabling efficient zero-knowledge proof verification directly on Bitcoin. Key achievements include:
Building the Validator:
Implemented a monolithic Groth16 validator using Bitcoin Script entirely, with functionality comparable to general-purpose programming languages.
Developed foundational primitives including BIGINT arithmetic, BLAKE3 hashing, BN254 elliptic curve pairing, and Winternitz signatures (for bit commitments).
Optimizations:
Block Validators:
Split the monolithic validator into smaller blocks, each small enough to fit in a single Bitcoin transaction (less than 4MB). These blocks act as fraud proofs, ensuring that disputes can be resolved on-chain.
Protocol Implementation
With Groth16 validators in place, the next step is to develop a complete transaction graph that connects all the components. This includes:
Monitoring on-chain events and storing necessary data.
Build and verify transactions like ASSERT and DISPROVE.
Manage Connector outputs and reliably put transactions on the chain.
Current State
Groth16 Validator:
The single validator has been reduced to 1GB.
Shard validators consist of less than 1000 blocks, which is enough for deployment.
Protocol Implementation:
Next steps:
The BitVM Alliance is conducting a comprehensive code audit.
Plans are underway to demonstrate the first end-to-end BitVM bridge.
Bitlayer’s Contributions
Bitlayer is a major contributor to the BitVM project, particularly in the following two areas:
Groth16 Validator Contributions:
Optimizations:
Developed a batched multi-scalar multiplication (MSM) technique that reduced script size from 7.4GB to 5.6GB.
Implemented a new MSM algorithm using affine coordinates that further reduced the validator size to 1GB.
Validator Chunker:
Proposed the first viable chunker implementation, splitting a monolithic validator into logical parts (e.g., MSM, G2 group checks, Miller loop accumulation).
Finely tuned the chunking process to balance input/output granularity and achieve optimal chunk sizes.
Contributions to the Bridge Protocol:
Bitlayer: Beyond the official BitVM project
Bitlayer realizes the transformative potential of BitVM and is exploring its applications beyond Bitcoin bridging:
BitVM Abstraction: Develop reusable components such as BitVM-style smart contracts, fraud proofs, and zero-knowledge proofs.
Finality Bridge: Launched its own BitVM bridge implementation, and the Finality Bridge testnet is now live.
Bitcoin Rollup: A Rollup protocol based on the BitVM abstraction, including recursive BitVM smart contracts and zkVM.
Bitlayer's Contribution Review
Implemented groundbreaking Groth16 validator optimizations, significantly reducing script size.
Developed the first viable validator blocker implementation.
Contributed core components to the BitVM bridge protocol, including ASSERT and DISPROVE transactions.
Explored innovative application cases such as Bitcoin native Rollup and zkVM.