Symbiosis Documentation
Symbiosis NestDeveloper ToolsGo to Bridge & Swap
  • Getting Started with Symbiosis
  • Symbiosis: Frequently Asked Questions
  • Main concepts
    • Glossary
    • Symbiosis SIS Token
    • Symbiosis sTokens
    • Symbiosis: Cross-Chain Swaps
      • Symbiosis: To/From BTC
      • Symbiosis: To/From TON
    • Cross-Chain Zaps
    • Symbiosis as Interchain Communication Protocol
    • Symbiosis & Fees
    • Security Audits
    • Bug Bounty Program
  • Governance
    • 🚩Governing Symbiosis
  • User Guide (WebApp)
    • Symbiosis WebApp
    • Bridge with Symbiosis: sUSDC, sWETH, sWBTC
    • Swap & Bridge with Symbiosis
    • Swap & Bridge To and From Bitcoin
    • Swap & Bridge To and From Tron
    • Stuck Transactions
    • Bridging SIS Token
    • Symbiosis Liquidity Pools
    • Withdrawing from Symbiosis Octopool
    • Cross-Chain Zaps
    • Common Issues and Solutions
    • Where are My Tokens?
    • Symbiosis Explorer
    • More about Slippage Tolerance
  • Reward Programs
    • Symbiosis Reward Programs
    • Farming on Octopools
    • SIS LP Farming
    • veSIS
  • Cross-chain liquidity engine
    • Symbiosis Core Smart Contracts
    • Symbiosis Mint-Burn Process
    • Symbiosis BridgeV2 Contract
    • Symbiosis Routing Contracts
    • Symbiosis & Emergencies
    • Symbiosis Octopools
  • Relayers network
    • Symbiosis Relayers Network
    • Symbiosis PoS Staking & Symbiotic Staking
      • Symbiosis X Symbiotic: SIS Restaking Vault User Guide
    • Relayers Network: Architecture and Operations
    • Symbiosis Relayer Node
    • Symbiosis Relayers Network: Emergencies
  • Developer Tools
    • Symbiosis Developer Tools
    • Symbiosis API
    • Symbiosis JS SDK
      • JS SDK Types
      • JS SDK Configuration
  • Miscellaneous
    • Symbiosis on Testnet
    • Symbiosis Multisig Address on Scroll
    • Symbiosis v1 vs. v2
    • Gasless Crypto Exchanges
  • Follow Us
  • Symbiosis | X
  • Symbiosis | Telegram
  • Symbiosis | Blog
  • Symbiosis | Publish0x
  • Symbiosis | Discord
  • Symbiosis | Linkedin
  • Symbiosis | Github
Powered by GitBook
On this page
  • Introduction
  • Key Components in the BTC Bridge/Exchange Process within the Symbiosis Protocol
  • Bridging BTC Two Ways
  • syBTC Purpose
  • Exchanging BTC Two Ways
  • Exchanging BTC for Another Token
  • Exchanging a Token for BTC

Was this helpful?

  1. Main concepts
  2. Symbiosis: Cross-Chain Swaps

Symbiosis: To/From BTC

The Symbiosis protocol: the implementation of the cross-chain BTC exchange process using the Symbiosis BTC bridge

PreviousSymbiosis: Cross-Chain SwapsNextSymbiosis: To/From TON

Last updated 2 months ago

Was this helpful?

Introduction

This document describes the implementation of the cross-chain BTC exchange process within the Symbiosis protocol using the Symbiosis BTC bridge. It highlights the solutions and approaches used to facilitate cross-chain operations involving BTC. Understanding these mechanisms is important for developers and stakeholders engaged in the deployment and operation of cross-chain exchanges.

Implemented cases:

  1. Bridging BTC two ways:

    • Wrapping BTC from the Bitcoin network to BNB Chain

    • Unwrapping BTC from BNB Chain to the Bitcoin network

  2. Exchanging BTC two ways:

    • Exchanging BTC for another token within a single cross-chain operation across certain supported blockchain networks.

    • Exchanging a token for BTC within a single cross-chain operation across certain supported blockchain networks.

The implementation of the cross-chain BTC exchange process for a token to BTC within the Symbiosis protocol using the ThorChain BTC bridge or the Chainflip BTC bridge is described here: Symbiosis as Interchain Communication Protocol

Key Components in the BTC Bridge/Exchange Process within the Symbiosis Protocol

  • Forwarder: This component handles user requests to exchange BTC from the Bitcoin network for tokens across other blockchain networks. It generates a unique BTC address for each request, stores the payload for the request, and forwards the received BTC to the intended destination (hence the name “forwarder”). The forwarder implements functionality that isn't available in Bitcoin network smart contracts. The forwarder acts as a custodial wallet; it can be operated by anyone willing to cover the fees for forwarding transactions on the Bitcoin network. Important: the forwarder must be fully trusted. Each integrator can deploy their own forwarder and trust it to process transactions initiated through their integration. Symbiosis, for example, trusts its own forwarder for transactions handled through its WebApp. The forwarder provides compatibility with regular and legacy Bitcoin wallets.

  • BTC portal: This is a smart contract located on the Bitcoin blockchain, playing a role similar to Portal smart contracts of the Symbiosis protocol on other supported blockchains. Unlike Ethereum Virtual Machine (EVM) smart contracts, its state is validated only by the relayers MPC group. The Bitcoin consensus layer only validates funds moving to or from its address.

  • Web/mobile apps powered by the Symbiosis web SDK: A UI provided by Symbiosis or an integrator that enables users to access the functionality of the Symbiosis protocol. It uses the Symbiosis SDK/API to compose call data for cross-chain operations and retrieve states stored on Symbiosis smart contracts. This documentation explains how users interact with the protocol using the Symbiosis WebApp. However, any integrator using the Symbiosis API/SDK can provide similar UI and functionality to interact with the Symbiosis protocol.

  • Relayers network: A blockchain-agnostic, P2P network consisting of registered relayer nodes securitised by the MPC/HTSS scheme. It facilitates the secure and efficient transmission of data between supported blockchain networks, ensuring data integrity and resilience against potential attacks through various technical approaches and crypto-economic incentive mechanisms. For more information about the relayers network, please refer to Relayers network.

  • Сore smart contracts implement the on-chain logic of cross-chain operations (cross-chain swaps, cross-chain zaps, interchain communication, bridging). The smart contracts are deployed and tuned by Symbiosis administrators while adding a blockchain to the Symbiosis protocol. For more information about the Symbiosis smart contracts, please refer to Symbiosis Routing Contracts.

Bridging BTC Two Ways

Wrapping BTC: BTC → syBTC

Unwrapping BTC: syBTC → BTC

The unwrapping process reverses the wrapping by burning the syBTC on BNB Chain and releasing the equivalent amount of BTC on the Bitcoin network. This ensures that the supply of wrapped tokens always matches the amount of BTC locked, maintaining a 1:1 backing ratio.

syBTC Purpose

On BNB Chain, syBTC can be exchanged for another wrapped BTC token: BTCB and then routed through the Symbiosis protocol using stable tokens or WBTC.

Exchanging BTC Two Ways

Important: All cross-chain operations involving BTC within the Symbiosis BTC bridge are routed through BNB Chain.

The Symbiosis protocol enables users to exchange BTC with for other digital assets across supported blockchain networks.

Let’s break down how this process works with real examples.

Exchanging BTC for Another Token

Exchanging BTC for another token through the Symbiosis protocol involves the following steps:

  1. Requesting a Quotation: A user initiates an exchange by specifying the BTC amount, slippage tolerance, destination token, destination chain, and an address on the destination chain.

  2. Receiving a Quotation: The protocol provides a quote detailing the amount of the destination token to be received, estimated fees, and a newly generated BTC address for the user to send their specified amount of BTC.

  3. Triggering the Exchange: The user sends the specified amount of BTC to the provided address, which triggers the cross-chain exchange process with the specified parameters.

  4. Completing the Operation: Once the cross-chain operation is completed, the user receives the destination tokens at the specified address on the destination chain.

Two examples of exchanging BTC for other tokens are shown below:

  • Example 1: Exchanging BTC for a token on the Ethereum blockchain: Scheme 2 This type of exchange is routed through the Octopool, which holds stablecoins on the Symbiosis Host Chain. This method is more common because tokens from almost any supported blockchain network can be exchanged through this pool.

  • Example 2: Exchanging BTC for a token on Rootstock: Scheme 3 This type of exchange is routed through the Octopool, which holds wrapped BTC tokens on the Symbiosis Host Chain.

Important notes for Scheme 2

Step 1. A user specifies the BTC amount to exchange, slippage tolerance, destination token, destination chain, and an address on the destination chain.

Step 2.

  • Similar to any cross-chain swap, Symbiosis WebApp composes calldata, calculating all necessary intermediate swaps and estimates transaction fees on the intermediate chains and the destination chain to complete the cross-chain swap with the specified values from Step 1

  • Unlike other cross-chain swaps, Symbiosis WebApp sends this calldata to the Forwarder and requests it to generate an address on the Bitcoin network for this cross-chain swap.

Step 3: Forwarder generates an address on the Bitcoin network and saves this address and the associated payload (provided by Symbiosis WebApp) in its local database for the cross-chain swap. Users have a set timeframe to send BTC to this generated address. If this timeframe expires, a new request and address will be needed.

Step 4. The user receives a notification of the address to send BTC to and its expiration time.

Step 5. The user sends the specified amount of BTC (from Step 1) to the provided address (from Step 4) using their chosen BTC wallet.

Step 6.

  • Step 6.1. Forwarder monitors its addresses.

  • Step 6.2. Upon receiving a transfer at one of these addresses, it forwards the BTC to the BTC Portal. It also adds the associated payload for the cross-chain swap.

Step 7.

  • Step 7.1. Relayers monitor the BTC Portal (MPC address) on the Bitcoin blockchain.

  • Step 7.2. When relayers detect a BTC transfer to the BTC Portal (MPC address), they compose, sign, and send a transaction to BNB Chain. The instructions for actions on BNB Chain and other chains come from the payload.

Step 8. syBTC is mined and exchanged for BTCB (BTCB is a wrapped BTC token on BNB Chain).

Step 9. BTCB is exchanged for USDC.

Steps 10-15 are similar to any cross-chain swap performed across supported blockchain networks. For more information, please refer to Symbiosis: Cross-Chain Swaps

Important notes for Scheme 3

This workflow is similar to the workflow described above, except for one step: there is no exchange of BTCB for USDC on BNB Chain (see Steps 8 and 9).

Exchanging a Token for BTC

Exchanging a token for BTC through the Symbiosis protocol involves the following steps:

  1. Requesting a Quotation: A user initiates an exchange by specifying the token amount, slippage tolerance, BTC as the destination token, the Bitcoin network as the destination chain, and an address on the destination chain.

  2. Receiving a Quotation: The protocol provides a quote detailing the amount of the destination token to be received, and estimated fees.

  3. Triggering the Exchange: The user signs and sends the transaction containing the calldata received on Step 2, which triggers the cross-chain exchange process with the specified parameters.

  4. Completing the Operation: Once the cross-chain operation is completed, the user receives BTC at the specified address on the Bitcoin network.

Below is an example of exchanging a token on Ethereum for BTC: Scheme 4.

Important notes for Scheme 4

Step 1. A user specifies the amount to exchange, slippage tolerance, and the address on the Bitcoin network.

Steps 2-10 are similar to any cross-chain swap performed across supported blockchain networks. For more information, please refer to Symbiosis: Cross-Chain Swaps

Step 11. BTCB is exchanged for syBTC on BNB Chain.

Step 13.

  • Step 13.1. Relayers monitor Oracle requests generated by the Symbiosis smart contracts.

  • Step 13.2. When relayers detect an Unwrap event, they compose, sign, and send a transaction to the Bitcoin network transfering BTC from BTC Portal to the address specified by the user (Step 1).

Symbiosis bridges BTC from the Bitcoin network to BNB Chain by wrapping it into syBTC (). The wrapping process involves locking the original asset on its native blockchain, the Bitcoin network, and minting an equivalent amount of the token on the target blockchain, BNB Chain.

address
Scheme 1. The Symbiosis protocol: main components
Scheme 2. BTC -> token routing via the Octopool with stable tokens.
Scheme 3. BTC -> token routing via the Octopool with WBTC tokens.
Scheme 4. Token -> BTC routing via the Octopool with stable tokens.