Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Two-Way Peg

A two-way peg is a cryptographic mechanism that enables the transfer of digital assets from a primary blockchain to a secondary chain and back, maintaining a fixed 1:1 value ratio between the locked and minted tokens.
Chainscore © 2026
definition
BLOCKCHAIN INTEROPERABILITY

What is a Two-Way Peg?

A technical mechanism enabling the transfer of cryptocurrency assets between a main blockchain and a sidechain.

A two-way peg is a cryptographic protocol that locks a specific amount of a native asset (like Bitcoin) on a primary blockchain, such as the Bitcoin mainnet, and mints an equivalent amount of a representation of that asset (often called a wrapped or pegged token) on a secondary blockchain or sidechain. This process, known as pegging in, allows the locked value to be used in the secondary chain's ecosystem. Crucially, the protocol also enables the reverse operation, pegging out, where the pegged tokens on the sidechain are destroyed, unlocking the original assets on the main chain. The integrity of the system relies on a trusted federation, a set of multi-signature validators, or a more complex cryptographic proof system like SPV (Simplified Payment Verification) to verify and authorize transfers.

The primary purpose of a two-way peg is to enable blockchain interoperability and scalability. By moving assets to a sidechain, users can access features not available on the main chain, such as faster transactions, lower fees, smart contract functionality, or enhanced privacy, without permanently leaving the security of the original blockchain. For example, the Liquid Network uses a two-way peg to create Liquid Bitcoin (L-BTC) for faster, confidential settlements. This mechanism is distinct from a one-way peg (like wrapping Bitcoin on Ethereum via a custodian), as it theoretically allows for trust-minimized, bidirectional movement of value without relying on a single centralized entity to hold the locked collateral.

Implementing a secure two-way peg presents significant technical challenges. The security model must prevent double-spending attacks where an attacker could redeem pegged tokens on the sidechain while also spending the locked coins on the main chain. Early designs depended on a federated peg with a group of known functionaries, which introduces a degree of trust. More advanced proposals, like drivechains, aim for a more decentralized model where Bitcoin miners collectively enforce the peg through a soft fork. The complexity of these systems means that fully trustless two-way pegs for major assets like Bitcoin remain an active area of research and development within the blockchain community.

how-it-works
MECHANISM

How a Two-Way Peg Works

A two-way peg is a cryptographic mechanism that enables the secure, bidirectional transfer of assets between a primary blockchain and a sidechain, maintaining a fixed exchange rate (typically 1:1) between the native and pegged assets.

A two-way peg is a protocol that locks a specific amount of an asset, such as Bitcoin, on the main chain (the parent chain) and subsequently mints or releases an equivalent amount of a representation of that asset on a secondary chain (the sidechain). This process, often called pegging in, is secured by a federation of functionaries, a multi-signature smart contract, or a more complex cryptographic proof system like Simplified Payment Verification (SPV) proofs. The reverse operation, pegging out, involves destroying or locking the sidechain asset to unlock the original asset on the main chain, completing the two-way transfer cycle.

The security and trust model of a two-way peg is its most critical component. In a federated peg, a pre-selected group of entities controls the multi-signature wallets holding the locked assets, which introduces a degree of centralization. More decentralized designs, such as those proposed for Bitcoin sidechains, utilize SPV proofs where the sidechain validates a cryptographic proof that funds were locked on the main chain without needing to trust third parties. This allows the sidechain to verify the legitimacy of the peg-in transaction autonomously, significantly enhancing security and censorship resistance.

Implementing a two-way peg requires careful coordination of the consensus rules on both chains. The main chain must support a locking script or opcode (like OP_CHECKTEMPLATEVERIFY for covenants) that can be verified by the sidechain. Conversely, the sidechain must enforce rules that only mint new tokens upon valid proof of the main-chain lock and only process a peg-out request after provably burning the sidechain tokens. This inter-chain communication ensures the total supply of the pegged asset across both systems remains consistent, preventing inflation or double-spending.

A canonical example of a two-way peg is the Liquid Network, a Bitcoin sidechain. To peg in, a user sends BTC to a 2-of-3 multi-signature federation address, and after a confirmation period, an equivalent amount of L-BTC is minted on the Liquid sidechain. L-BTC can then be used for faster, more confidential transactions. To redeem the original BTC, the user sends L-BTC to a Liquid burn address, providing a cryptographic proof to the federation, which then releases the BTC from the multi-signature wallet. This demonstrates the practical application of a federated two-way peg for scaling and enhancing functionality.

The evolution of two-way pegs is moving towards greater decentralization through mechanisms like drivechains, which propose using the mining power of the main chain to collectively vote on sidechain withdrawal requests, and bridgeless or trust-minimized pegs leveraging advanced zero-knowledge proofs. These advancements aim to reduce reliance on federations, moving closer to the ideal of a permissionless peg where asset movement between chains is as secure and trustless as the underlying blockchains themselves, a key infrastructure for a multi-chain ecosystem.

key-features
CROSS-CHAIN BRIDGE MECHANISM

Key Features of a Two-Way Peg

A two-way peg is a cryptographic mechanism that enables the transfer of assets between a main blockchain and a sidechain, ensuring a fixed, verifiable exchange rate.

01

Asset Locking & Minting

The core mechanism involves locking (or burning) an asset on the parent chain and minting an equivalent representation on the sidechain. This creates a 1:1 pegged derivative asset. The process is reversed to move value back to the parent chain, where the sidechain asset is burned and the original is unlocked.

02

Federated or Decentralized Custody

The locked assets are held in custody, which can be managed by:

  • Federated Model: A multi-signature group of trusted entities (federation) controls the lock-up address.
  • Decentralized Model: A smart contract or a set of validators secured by cryptographic proofs (like SPV proofs) manages the custody, reducing trust assumptions.
03

Symmetric Operation

The peg operates symmetrically in both directions, maintaining a fixed exchange rate (typically 1:1). This distinguishes it from one-way pegs or wrapped assets that may only flow in one direction. The symmetry is enforced by the protocol's consensus rules on both chains.

04

Verification & Fraud Proofs

To ensure the sidechain state is valid, the parent chain must be able to verify transactions or state transitions on the sidechain. This is often achieved through Simplified Payment Verification (SPV) proofs or other cryptographic commitment schemes that allow the parent chain to confirm the legitimacy of a withdrawal request without processing all sidechain data.

05

Withdrawal Delay Period

A security feature where a withdrawal request from the sidechain back to the parent chain enters a mandatory waiting period (e.g., 1-7 days). This challenge period allows network participants to detect and submit fraud proofs if the withdrawal is based on invalid sidechain blocks, preventing theft of locked funds.

06

Primary Use Case: Bitcoin Sidechains

The two-way peg was famously proposed as the foundational mechanism for Bitcoin sidechains (e.g., the Liquid Network). It allows Bitcoin to be moved to a separate blockchain with different features (like faster transactions, confidentiality) while remaining redeemable for the original Bitcoin, leveraging Bitcoin's security for settlement.

common-implementations
TWO-WAY PEG

Common Implementation Models

A two-way peg is a mechanism for moving assets between a parent blockchain (like Bitcoin) and a sidechain or Layer 2. These are the primary technical models used to implement it.

examples
TWO-WAY PEG

Protocol Examples & Use Cases

A two-way peg is a mechanism that enables the secure transfer of assets between a main blockchain and a sidechain, ensuring a fixed exchange rate (typically 1:1). These implementations vary in their trust assumptions and security models.

04

Wrapped Assets (wBTC, renBTC)

Wrapped tokens like wBTC and renBTC are ERC-20 representations of Bitcoin on Ethereum, functioning as a form of two-way peg via centralized or decentralized custodians. wBTC uses a centralized custodian and merchant network, while renBTC uses a decentralized network of darknodes (the RenVM) to hold the underlying Bitcoin. Both create liquidity for Bitcoin in DeFi but have distinct custodial risks.

$B+
Total Value Locked
security-considerations
TWO-WAY PEG

Security Considerations & Risks

A two-way peg is a mechanism that allows assets to be transferred between a main blockchain and a sidechain, but its security model introduces critical risks distinct from the underlying chains.

01

Federated Custody Model

The most common implementation relies on a federated multisig of trusted entities (the 'federation') to hold the locked assets on the main chain. This creates a centralization risk and a single point of failure. If a majority of the federation members collude or are compromised, they can steal the entire reserve of locked assets. This model trades decentralization for initial simplicity and speed.

02

Custodial & Replay Attacks

The security of the pegged assets is only as strong as the custodian's setup.

  • Custodial Risk: The federation's private keys are high-value targets for theft.
  • Replay Attacks: A malicious actor could potentially broadcast a valid withdrawal proof from the sidechain multiple times if the main chain's validation logic has a flaw, draining funds. These attacks target the bridging logic itself, not the consensus of the connected chains.
03

Data Availability & Fraud Proofs

For non-custodial pegs using cryptoeconomic security (like rollups), security depends on data availability and fraud proof mechanisms.

  • If transaction data is withheld (data availability problem), users cannot construct fraud proofs to challenge invalid state transitions on the sidechain.
  • The challenge period introduces a withdrawal delay, during which assets are at risk if a fraudulent block is not detected and challenged in time.
04

Liveness & Censorship Risks

The peg's operators can threaten the system's liveness.

  • Withdrawal Censorship: A federated group or a sequencer could censor withdrawal requests, freezing user funds on the sidechain.
  • Liveness Failure: If the sidechain halts or the bridge's watchtower services go offline, the ability to prove fraud or finalize withdrawals may be lost, stranding assets. These are governance and operational risks separate from cryptographic security.
05

Economic & Market Risks

Pegs are vulnerable to macroeconomic attacks that exploit the mint/burn mechanism.

  • Supply Shock Attacks: An attacker could borrow a large amount of the base asset (e.g., BTC), mint the pegged version on a sidechain, sell it to crash its price, and then buy it back cheaply to redeem—profiting from the arbitrage and destabilizing the peg.
  • Peg Breakage: If confidence in the bridge is lost, the pegged asset can trade at a significant discount to its underlying asset, as seen in events like the renBTC depeg following the Ren protocol's issues.
06

Smart Contract Risk

The peg is ultimately enforced by smart contracts on both chains. These contracts are complex and have a large attack surface.

  • Bridge Contract Bugs: Vulnerabilities in the locking, minting, or verification logic can lead to catastrophic fund loss. Major bridge hacks (e.g., Poly Network, Wormhole) often exploit contract flaws.
  • Upgradeability Risk: If the bridge contracts are upgradeable by a multisig, that governance mechanism itself becomes a central point of failure and potential exploit.
ARCHITECTURE COMPARISON

Two-Way Peg vs. General Cross-Chain Bridges

This table compares the defining characteristics of a canonical two-way peg system with those of a general-purpose cross-chain bridge.

FeatureTwo-Way Peg (e.g., Bitcoin sidechains)General Cross-Chain Bridge

Primary Design Goal

Securely extend a base chain's assets to a new blockchain

Enable arbitrary asset and data transfer between independent chains

Trust & Security Model

Relies on the consensus of the base chain (e.g., SPV proofs, federation)

Varies widely (e.g., multi-sig federation, optimistic, zero-knowledge proofs)

Asset Representation

Lock-and-Mint: Native assets are locked, new tokens are minted 1:1 on the destination

Lock-and-Mint or Burn-and-Mint; often uses wrapped token standards (e.g., WETH, WBTC)

Architectural Coupling

Tightly coupled; the sidechain is purpose-built for the base chain

Loosely coupled; operates as an external protocol connecting sovereign chains

Canonicality & Reversibility

Canonical: The locked assets are the only legitimate source for minted sidechain tokens

Non-canonical: Multiple bridges can create competing wrapped versions of the same asset

Settlement Finality

Depends on the base chain's finality for the lock/unlock process

Depends on the finality rules of both source and destination chains

Typical Use Case

Scaling and extending functionality of a specific L1 (e.g., Liquid Network for Bitcoin)

Interoperability between diverse ecosystems (e.g., bridging ETH to Avalanche)

Complexity & Attack Surface

Defined and limited by the base chain's security assumptions

Often higher, introducing new trust assumptions and bridge-specific vulnerabilities

TWO-WAY PEG

Common Misconceptions

Two-way pegs are a critical mechanism for blockchain interoperability, but their implementation and security guarantees are often misunderstood. This section clarifies frequent points of confusion.

No, a two-way peg is a specific security model for moving assets between blockchains, while a bridge is the implementation. A two-way peg is a trust-minimized mechanism where assets are locked on the source chain and equivalent representations are minted on the destination chain, with the lock/unlock logic secured by the underlying blockchains themselves (e.g., via SPV proofs). A bridge is a broader term encompassing any system that facilitates cross-chain transfers, which may use a two-way peg, a trusted federation, a liquidity pool, or other models. Not all bridges employ a two-way peg's cryptographic security.

TWO-WAY PEG

Frequently Asked Questions

A two-way peg is a critical mechanism for connecting blockchains, enabling the secure transfer of assets between them. These questions address its core concepts, security models, and real-world implementations.

A two-way peg is a cryptographic mechanism that allows digital assets to be securely transferred between a parent blockchain (like Bitcoin) and a secondary chain (like a sidechain or Layer 2) while maintaining a fixed exchange rate, typically 1:1. It works by locking the original assets in a smart contract or multi-signature address on the parent chain, which then triggers the minting of a corresponding representation (often called a wrapped or pegged asset) on the secondary chain. To redeem the original assets, the pegged tokens on the secondary chain are destroyed (burned), and a cryptographic proof is submitted to unlock the funds on the parent chain. This creates a secure, verifiable bridge for asset movement without requiring a trusted third-party custodian.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team