Links

Cross-chain Swaps with Symbiosis

Discover the concepts of seamless and secure cross-chain swapping and bridging capabilities offered by the Symbiosis protocol.
Curious to see how it works? Check it out with Symbiosis WebApp
The Symbiosis protocol was born for cross-chain operations. In the beginning it was cross-chain swaps and bridging, then more functionality was added to the protocol. This document explains the concepts of cross-chain swaps.
While doing a cross-chain swap with the Symbiosis protocol, three cases are possible:
  1. 1.
    The source and destination blockchains of a cross-chain swap are not S-Chain (Scheme 1),
  2. 2.
    The destination blockchain of a cross-chain swap is S-chain (Scheme 2),
  3. 3.
    The source blockchain of a cross-chain swap is S-chain (Scheme 3).
S-chain is Boba BNB: the Symbiosis host chain, all cross-chain operations pass through it. For more information about sTokens and bridging concepts in the Symbiosis protocol, please refer to sTokens in Symbiosis

Case 1: Blockchain -> Blockchain

The source and destination blockchains of a cross-chain operation are not Boba BNB (S-Chain).
Let's consider an example of a cross-chain swap: a user wants to swap UNI tokens from Ethereum for ETH on Arbitrum, and wants to get the maximum possible amount of tokens and pay less on-chain and cross-chain fees.
Symbiosis supports two types of bridging:
  • On stablecoins: for all supported blockchains,
  • And on WETH: for some supported blockchains.
If a pair of blockchains supports bridging on stablecoins and on WETH, then Symbiosis finds two routes (a sequence of intermediate swaps) for each swap between these blockchains. For example, for the cross-chain swap UNI on Ethereum for ETH on Arbitrum there are two routes:
  • The best route using bridging on stablecoins (Scheme 1) (UNI USDC on Ethereum) Bridging with Symbiosis (USDC → ETH on Arbitrum)
  • The best route using bridging on WETH (Scheme 2) (UNI WETH on Ethereum) Bridging with Symbiosis (WETH ETH on Arbitrum)
Then Symbiosis compares these two routes and offers the best one for the user. Please compare Scheme 1 & 2 below.
Scheme 1. Cross-chain swap routing with bridging stablecoins.
Scheme 2. Cross-chain swap routing with bridging WETH.
Important notices for Scheme 1 & 2
Steps 2 and 11. The Symbiosis protocol implements on-chain swap on behalf of the user with 1inch or OpenOcean.
Steps 6 and 10. The Symbiosis protocol mints/releases tokens with a ratio of 1:1 and then withholds an amount that equals the transaction processing fee on the current blockchain. For more details on the fee withholding process, please refer to Gas Fees for Cross-chain Operations via Symbiosis
Step 11. Once the last on-chain swap is accomplished, the user gets tokens to their address on the destination chain.

Case 2: Blockchain -> Boba BNB (S-Chain)

The destination blockchain of a cross-chain operation is S-chain. In this case, bridging on stablecoins is always used.
As an example, let's see how a cross-chain swap MATICs from Polygon for BOBA tokens on Boba BNB goes with Symbiosis (Scheme 3).
Scheme 3: A cross-chain swap with the Symbiosis protocol when the destination blockchain is S-chain (Boba BNB).
Important notices for Scheme 2
Step 2. The Symbiosis protocol implements on-chain swap on behalf of the user with 1inch or OpenOcean.
Step 6. The Symbiosis protocol mints tokens with a ratio of 1:1 and then withholds an amount that equals the transaction processing fee on the current blockchain. For more details on the fee withholding process, please refer to Gas Fees for Cross-chain Operations via Symbiosis
Step 8. Since there are no DEX aggregators on Boba BNB, Symbiosis uses existing DEXes for on-chain swaps on Boba BNB. Once the last on-chain swap is accomplished, the user gets tokens to their address on the destination chain.

Case 3: Boba BNB (S-Chain) -> Blockchain

The source blockchain of a cross-chain operation is Boba BNB (S-chain). In this case, bridging on stablecoins is always used.
As an example, let's see how a cross-chain swap BOBA tokens from Boba BNB for AVAXs on Avalanche goes with Symbiosis (Scheme 4).
Scheme 4: A cross-chain swap with the Symbiosis protocol when the source blockchain is S-chain (Boba BNB).
Important notices for Scheme 4
Step 2. Since there are no DEX aggregators on Boba BNB, so Symbiosis uses existing DEXes for on-chain swaps on BOBA BNB.
Step 10. The Symbiosis protocol releases tokens with a ratio of 1:1 and then withholds an amount that equals the transaction processing fee on the current blockchain. For more details on the fee withholding process, please see Gas Fees for Cross-chain Operations via Symbiosis.
Step 11. The Symbiosis protocol implements on-chain swap on behalf of the user with 1inch or OpenOcean. Once the last on-chain swap is accomplished, the user gets tokens to their address on the destination chain.

More Information