Bringing Computation to Bitcoin Through Off-Chain Execution

Although the original design of BitVM makes it technically feasible to perform complex computation on Bitcoin, the limitations of Bitcoin’s design—particularly its throughput, cost, and stateless architecture—make such an approach practically infeasible. To address these challenges, Linus et al. propose BitVM2, an enhancement of the original BitVM. BitVM2 inherits the computational power of the original concept while offloading most computations off-chain, deferring only the verification to the Bitcoin blockchain. This dramatically reduces the burden on the Bitcoin mainnet, maintaining scalability and efficiency without sacrificing security.

Imagine you and a friend want to bet on the outcome of a game. On platforms like Ethereum, a smart contract could manage the entire bet on-chain, tracking the game’s progress and maintaining a "state" as conditions change. This ongoing, stateful computation allows the contract to react as the game unfolds. However, Bitcoin fundamentally lacks this ability—it can't maintain stateful computations or track changes in real-time. BitVM offers a clever workaround: you and your friend agree on the terms of the bet off-chain, creating a contract using tools like hashlocks and timelocks. Once the game concludes, you generate cryptographic proofs to verify the outcome, allowing Bitcoin to securely settle the bet in one final transaction. This approach respects Bitcoin’s stateless nature while enabling more complex interactions, all without modifying Bitcoin's basic design.

To maintain security, BitVM relies on cryptographic proofs, which enable verification of computations without revealing sensitive information. One common type of cryptographic proof used in this context is a Zero-Knowledge Proof (ZKP). Intuitively, a ZKP allows someone to prove that they know a secret (or that a computation was done correctly) without revealing the secret itself.

In the context of BitVM, let’s apply this to the betting scenario. Suppose you and a friend bet on the outcome of a game, and the results are calculated off-chain. To settle the bet, one of you needs to prove to Bitcoin’s network that the computation determining the winner was done correctly. Instead of submitting the entire game result or the computation details to the blockchain, you generate a cryptographic proof. This proof is a compact, mathematical representation that convinces the network the computation was correct—without requiring Bitcoin to reprocess the game data or calculation.

The Bitcoin network only needs to verify the proof, which is quick and efficient, and then executes the transaction (e.g., releasing the winnings to the winner’s UTXO). This way, BitVM ensures the integrity of complex computations while keeping Bitcoin secure, efficient, and scalable.

One of BitVM's most significant advantages is that it doesn't necessitate any alterations to Bitcoin's code. By working within Bitcoin's existing rules and constraints, BitVM ensures full compatibility with the current network, avoiding the risks associated with changing the core software—such as the need for consensus, potential network splits, or the introduction of vulnerabilities.

Last updated