Links
☝

Cross-chain Swaps | Symbiosis

Cross-chain swapping with the Symbiosis protocol in a nutshell.

Cross-chain operations

Looking for SDKs and API? Please check out our documentation for software developers Symbiosis Developer Tools
The Symbiosis protocol was born for cross-chain operations. In the beginning, it was cross-chain swaps and bridging; then, we added more functions to our protocol: interchain communicating and cross-chain zaps. This document explains how the Symbiosis protocol handles the cross-chain swap operation that includes bridging (mining/burning sTokens).
There are two cases while doing cross-chain swaps:
  • Case 1: a cross-chain swap from a blockchain with a high gas fee to a blockchain with a lower gas fee,
  • Case 2: a cross-chain swap from a blockchain with a lower gas fee to a blockchain with a high gas fee.
High/low gas fees. A gas fee is always paid for in the native cryptocurrency of that blockchain, where the transaction gets executed. Thus, when we compare gas prices on different blockchains, we compare them, for example, in the USD equivalent.
As an example, let us consider a pair Ethereum — Binance Smart Chain (BNB).
The Symbiosis protocol works with USDC on Ethereum and BUSD on Binance Smart Chain. Since the gas fee on Ethereum is higher than the gas fee on Binance Smart Chain (in the USD equivalent), the liquidity pool to perform cross-chain swaps for this blockchains' pair is located on Binance Smart Chain. This liquidity pool contains the sUSDC <> BUSD tokens, where sUSDC represents USDC of Ethereum on Binance Smart Chain with a ratio of 1:1.
We explain the concept of sToken in the document Wrapped Tokens and sTokens | Symbiosis .

Case 1: UNI (Ethereum) -> CAKE (BNB)

Consider an example of a cross-chain swap from a blockchain with a high gas fee to a blockchain with a lower gas fee.
A user wants to swap: UNI ERC20 tokens on Ethereum for CAKE BEP20 tokens on Binance Smart Chain (BNB).
The route of UNI to CAKE looks like this: UNI → USDC → sUSDC → BUSD → CAKE
The algorithm of this cross-chain swap is shown in Scheme 1. An explanation follows Scheme 1.
Scheme 1. the UNI → CAKE cross-chain swap with the Symbiosis protocol.
  1. 1.
    The user signs and sends transaction containing instructions for the Symbiosis protocol. Please refer to Developer Tools for more information.
  2. 2.
    The Symbiosis protocol swaps UNIs for USDCs on behalf of the user with the 1inch protocol that guarantees the best price.
  3. 3.
    The Symbiosis protocol locks the USDCs in one of its smart-contracts: Portal.
  4. 4.
    As soon as the tokens are locked on the Portal, another Symbiosis smart-contract BridgeV2 issues an event informing listeners that there is a request for a cross-chain swap.
  5. 5.
    The relayers reach a consensus for this particular event, sign and send a transaction to the destination blockchain (Binance Smart Chain in this case). More information on the relayers is here Relayers Network | Symbiosis​
  6. 6.
    The Synthesis protocol on BNB receives information about the swap and mints sUSDC tokens with a ratio of 1:1 to the USDCc deposited on Ethereum (Step 3).
  7. 7.
    The Symbiosis protocol swaps the sUSDC for BUSDs on behalf of the user on a liquidity pool owned by Symbiosis.
  8. 8.
    The Symbiosis protocol swaps the BUSDs for CAKEs on behalf of the user with the 1inch protocol that guarantees the best price.
  9. 9.
    As soon as the swap BUSD → CAKE is accomplished, the CAKEs get deposited to the user's address on BNB.
NB Through all these steps, the user is the sole owner of the swapping assets. The user allows doing these swaps on their behalf to the Symbiosis protocol by signing the transaction in Step 1.
If you are looking for a more detailed explanation of how it works, please refer to Metarouter V3 | Symbiosis​

Case 2: CAKE (BNB) -> UNI (Ethereum)

Consider an example of a cross-chain swap from a blockchain with a lower gas fee to a blockchain with a high gas fee.
A user wants to swap CAKE BEP20 tokens on Binance Smart Chain for UNI ERC20 tokens on Ethereum.
The route of CAKE to UNI looks like this: CAKE → BUSD → sUSDC → USDC → UNI
The algorithm of this cross-chain swap is shown in Scheme 2. An explanation follows Scheme 2.
Scheme 2. the CAKE -> UNI cross-chain swap with the Symbiosis protocol.
  1. 1.
    The user signs and sends transaction containing instructions for the Symbiosis protocol. Please refer to Developer Tools for more information.
  2. 2.
    The Symbiosis protocol swaps the CAKEs for BUSDs on behalf of the user with the 1inch protocol that guarantees the best price.
  3. 3.
    The Symbiosis protocol swaps the BUSDs for sUSDC tokens on behalf of the user on a liquidity pool owned by Symbiosis.
  4. 4.
    The Symbiosis contract burns the sUSDCs
  5. 5.
    As soon as the tokens are burnt, smart-contract BridgeV2 on BNB issues an event informing listeners that there is a request for a cross-chain swap.
  6. 6.
    The relayers reach a consensus for this particular event, sign and send a transaction to the destination blockchain (Ethereum in this case). More information on the relayers is here Relayers Network | Symbiosis​
  7. 7.
    The Synthesis protocol on Ethereum receives information about the swap and releases USDCs the ratio of 1:1 to the sUSDC burnt in Step 4.
  8. 8.
    The Symbiosis protocol swaps the USDCs for UNIs on behalf of the user with the 1inch protocol that guarantees the best price.
  9. 9.
    As soon as the swap USDC → UNI is accomplished, the UNIs get deposited to the user's address on Ethereum.
NB Through all these steps, the user is the sole owner of the swapping assets. The user allows doing these swaps on their behalf to the Symbiosis protocol by signing the transaction in Step 1.
If you are looking for a more detailed explanation of how it works, please refer to Metarouter V3 | Symbiosis​

Cross-chain Swap for BTC

Symbiosis uses the Ren Protocol on BINANCE and POLYGON to perform cross-chain exchanges for BTC. When the Ren Protocol receives renBTCs, it burns them and sends BTCs to the user's address on BITCOIN BLOCKCHAIN.
Thus, Symbiosis acts as the interchain communicating protocol while exchanging for BTC, so please refer to Symbiosis as Interchain Communication Protocol section Exchanging for BTC for an explanation on this topic.

More Information

If you are looking for a more detailed explanation of how it works, please refer to Metarouter V3 | Symbiosis​
If you are curious to see how it works, please try out our Symbiosis WebApp: