☝️Cross-chain Swaps with Symbiosis
Discover the concepts of seamless and secure cross-chain swapping and bridging capabilities offered by the Symbiosis protocol.
Last updated
Discover the concepts of seamless and secure cross-chain swapping and bridging capabilities offered by the Symbiosis protocol.
Last updated
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. For more information about sTokens and bridging concepts in the Symbiosis protocol, please refer to sTokens in Symbiosis
Let’s consider an example: a user has MATIC tokens on the Polygon network and wants to exchange them for UNI on Ethereum, and wants to get the maximum possible amount of tokens and pay less on-chain and cross-chain fees.
Important notices for Scheme 1
Transit Token In this example, USDC is used as the transit token for moving between networks, with the Octopool utilizing sStables on the host network. However, for cross-chain operations, other transit tokens such as WETH or WBTC may also be used. In such cases, the Symbiosis protocol will use either the Octopool with sWETH tokens or the Octopool with sWBTC tokens. When a user initiates an exchange, the Symbiosis protocol calculates various potential routes, using USDC, WETH, or WBTC as the transit token. The most efficient route is then presented to the user (Step 1). Comprehensive information on Octopools can be found here: Symbiosis Octopools.
Third party DEXs (Step 2 & Step 9)
When the token a user wants to exchange is different from the transit token, the user’s tokens will first be swapped into the transit token. DEX aggregators are used to find the best rates on the network where the swap occurs. In our example on Polygon, MATIC is exchanged for USDC.
Similarly, when the token a user wishes to receive is different from the transit token, the transit tokens will be swapped into the desired tokens on the destination network. DEX aggregators are again used to find the best rates on the destination network. In our example on Ethereum, USDC is exchanged for UNI.
Host Chain The current Symbiosis host chain is BOBA BNB, where Octopools are hosted, and all cross-chain operations pass through it.
Step 9. Once the last on-chain swap is accomplished, the user gets tokens to their address on the destination chain.
Cross-chain fees For more details on the fee calculating and withholding process, please refer to Gas Fees for Cross-chain Operations via Symbiosis
Each cross-chain swap has a slippage tolerance limit that is set in Step 1. This value is distributed across all transactions of a cross-chain swap. This ensures that each individual transaction remains within its specified slippage tolerance fraction, guaranteeing that the cumulative price change doesn't exceed the overall slippage tolerance threshold.
If the transaction on the first (source) network surpasses the accepted price change, then assets stay in the wallet.
If the transaction on Symbiosis host chain surpasses the accepted price change, then the cross-chain swap gets halted. Please see Symbiosis & Emergencies for more details.
If the transaction on the destination blockchain surpasses the accepted price change, then the user will receive an appropriate amount of the transit token: Step 9 will be omitted and transit tokens will be sent to the user's address.
For a more detailed explanation, please see Symbiosis Routing Contracts.
If you are curious to see how it works, try our web-based application: Symbiosis WebApp.