BitVM Could Enable 2-Way Pegs

BitVM two way pegs

Share this article

Bitcoin can scale through side chains by offloading transactions to separate blockchains that are linked to the main Bitcoin blockchain. Sidechains allow for faster and more efficient transaction processing, as they do not have to adhere to the same strict consensus rules as the main blockchain. This can help to lower transaction fees and congestion on the primary Bitcoin network, reduce frustration for users and support increased adoption.

A sidechain is a separate blockchain network that connects to another blockchain – called a parent blockchain or mainnet – via a peg; this can be a one-way peg or a two-way peg. These sidechains would have their own consensus protocols, allowing a blockchain network to improve on elements that Bitcoin lacks, such as throughput, privacy and smart contract scripting, while focusing on minimising the additional trust required to maintain a network.

A key component to the success of a side chain is its ability to facilitate a smoother asset exchange between the mainnet and the secondary blockchain. This means that Bitcoin can be securely transferred between blockchains without too much hassle. A Bitcoin side chain must access liquidity and make users feel comfortable with the trade-offs to attract enough activity for app development, or the ecosystem will remain dormant.

What is a one-way peg?

A one-way peg is a mechanism that allows users to move assets from one blockchain to another unidirectionally; this can be done by burning the asset the way Counterparty did with its token issuance or as proposed with SpaceChains

In the context of the Liquid Network, the one-way peg allows users to send Bitcoin (BTC) from the Bitcoin blockchain to the Liquid Network in a permissionless fashion through the peg-in system but not vice versa. 

This means that users can use their Bitcoin on Liquid and enjoy the faster and more confidential transactions offered by the Liquid Network, but they must only withdraw their BTC back to the Bitcoin blockchain with a request honoured by a Liquid Federation member.

The one-way peg is implemented using a multi-signature address on the Bitcoin blockchain. When a user sends Bitcoin to the Liquid Network, the BTC is locked up in this multi-signature address. The only way to unlock the BTC is to have a majority of the signers of the multi-signature address agree to release it. The signers of the multi-signature address are a group of trusted parties known as the Liquid Federation.

The one-way peg is a convenient and secure way to move BTC to the Liquid Network. However, it is important to note that the one-way peg is not without its risks. For example, if the Liquid Federation were to collude, they could steal the BTC that is locked up in the multi-signature address. 

Additionally, if the Liquid Network were to be hacked or management of those keys lost, the Bitcoin locked up in the multi-signature address could be lost or stolen.

While Liquid is a viable option for moving into a sidechain environment, this trade doesn’t sit well with many Bitcoiners, who would prefer a two-way peg. 

What is a two-way peg?

In the context of Bitcoin, a “two-way peg” is a mechanism that allows for the seamless transfer of value between the Bitcoin blockchain and another sidechain. This would be achieved by locking up a certain amount of Bitcoin on the Bitcoin blockchain and creating an equivalent amount of tokens on the other blockchain. 

These tokens can then be freely transferred within the secondary blockchain and can be redeemed back for Bitcoin at any time without additional complexity between communicating with the two environments or requiring a custodian to manage the process.

Two-way pegs are the holy grail for expanding the functionality of Bitcoin, as they allow developers to build applications on top of Bitcoin that take advantage of the security and decentralisation of the base chain while benefiting from the increased features and functionality of the secondary blockchain.

Rootstock peg

The current attempt at a two-way peg is the Rootstock (RSK) sidechain. RSK allows developers to build smart contracts on top of Bitcoin and uses a two-way peg to allow users to transfer Bitcoin between the Bitcoin blockchain and the RSK chain.

Stacks peg

Another attempt at a two-way peg is the sBTC token on the remora chain Stacks. sBTC is a token that is pegged to the value of Bitcoin and can be used to interact with applications on the Stacks blockchain.

Drivechain peg

A Drivechain approaches its two-way peg differently by giving custody of the locked Bitcoin to the miners and allowing Bitcoin miners to vote on when to unlock funds and where to send them. The miners vote using the Bitcoin blockchain, and votes are cast in some part of the block (e.g. the coinbase). The greater the participation of honest miners in the Drivechain, the more secure it is.

Drivechains would allow Bitcoin users to lock up BTC in these Drivechains using a decentralised two-way peg, which utilises a cryptographic proof ( Simplified Payment Verification – SPV) that acts as proof of deposit, and the user is allowed to mint tokens such as dBTC (DriveChain Bitcoin) with their own unique characteristics on this sidechain.

Converting the Drivechain Bitcoin back into an on-chain BTC, the SPV proof of possession on the sidechain is required. The sidechain will validate the withdrawal transaction and ensure that it is indeed a valid transaction on the base layer, which pays out the coins stored in the special address subject to miner discretion and a six-month holding period.

Not all two-way pegs are created equal.

A 2-way peg( 2WP) is a protocol that allows transfers of Bitcoin from the main blockchain to a second blockchain and vice versa, requiring low third-party trust. Managing a 2-way peg can be through a smart contract, a Federation, a Sidechain or a Drivechain.

Two-way pegs are still a relatively new technology, and some challenges need to be addressed before they can be widely adopted. One challenge is that two-way pegs can be vulnerable to attacks, such as double-spending attacks. Another challenge is that two-way pegs can be complex to implement and maintain.

BitVM two-way pegs

According to Bitcoin developer SuperTestnet, he has discovered a new method of creating two-way pegs using the recently announced BitVM. Using BitVMs SHA256 program, the prover must share a hash with the verifier, then make a promise: within a time limit, they will share the preimage corresponding to that hash. The verifier can take the prover’s money if the promise is broken.

Meaning users could deposit and withdraw Bitcoin from a BitVM sidechain (the money can flow two ways) without needing any additional trust assumptions beyond Bitcoin’s standard consensus.

This is still an early attempt at building a two-way peg structure and should be approached with scepticism, but if possible, it will open up a host of new opportunities for side-chain projects. Despite these challenges, two-way pegs can revolutionise the way we use Bitcoin today. The more attempts we have at creating one, the more optionality available to experiment with what provides the best trade-off and what market participants feel confident using.

By allowing developers to build applications on top of Bitcoin that take advantage of the security and decentralisation of the Bitcoin blockchain while also benefiting from the increased features and functionality of the secondary blockchain, two-way pegs can help to expand the use cases for Bitcoin and make it a more versatile and useful asset.


Do your own research.

If you want to learn more about pegging into side chains, use this article as a jumping-off point and don’t trust what we say as the final say. Take the time to research, check out their official resources below or review other articles and videos tackling the topic.

Disclaimer: This article should not be taken as, and is not intended to provide any investment advice. It is for educational and entertainment purposes only. As of the time posting, the writers may or may not have holdings in some of the coins or tokens they cover. Please conduct your own thorough research before investing in any cryptocurrency, as all investments contain risk. All opinions expressed in these articles are my own and are in no way a reflection of the opinions of The Bitcoin Manual

Leave a Reply

Related articles

You may also be interested in

Bitcoin fees low

Why Have Bitcoin Fees Been So Low?

In a surprising turn of events for Timechain observers, Bitcoin has managed to maintain relatively low transaction fees despite breaking new all-time highs in value,

Frostr Explained

What Is Frostr?

Ah, the private key, the single point of failure that will lead to heartbreak for many a Bitcoiner or nostr user who fails to guard

Cookie policy
We use our own and third party cookies to allow us to understand how the site is used and to support our marketing campaigns.