Symbiosis: Cross-Chain Swaps
Discover the concepts of seamless and secure cross-chain swapping and bridging capabilities offered by the Symbiosis protocol.
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 Symbiosis sTokens and Supported Chains
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.1. & Step 6.2.)
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 Symbiosis Host Chain hosts Octopools, and all cross-chain operations pass through it.
Step 6.2. 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 Symbiosis & Fees
Guaranteed Transit Tokens
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.
Depository and Solver Introduction
To reduce the likelihood of sending transit tokens to users on the destination chain, Symbiosis introduces a Depository Contract and a Solver Service. The mechanism can be illustrated using the same example as above: swapping MATIC on Polygon for UNI on Ethereum.

Step 6.1. & 6.2. USDC is released and locked in the Depository contract. For each token lock, the Depository stores the following parameters:
Conditions under which the lock can be released
The destination token and minimum acceptable amount after the exchange
Destination addresses the tokens can be sent to (the user’s address)
All this data is derived from the payload constructed in Step 1 and forwarded by Relayers from chain to chain.
Step 7.
Step 7.1. The Solver continuously monitors lock events emitted by the Depository.
Step 7.2. When a lock event is detected, the Solver:
Finds an exchange route that satisfies the unlock conditions.
Sends a transaction calling the Depository to complete the swap.
Step 8. If the release conditions are met, the following actions happen:
The locked USDC is released and exchanged through third-party liquidity sources (DEX aggregators are used).
One the on-chain swap is accomplished, the tokens are sent to the user's address on the destination chain.
If the transaction fails, the USDC remains locked in the Depository, allowing the Solver to retry the operation.
Depository: Lock Release Conditions
Immediate Swap Completion: The Depository releases the token lock without delay if the tokens are exchanged for an amount higher than the minimum required amount.
Delayed Completion: The Depository releases the lock with delay if the exchange results in an amount equal to the minimum acceptable amount.
Transit Token: If it becomes impossible to perform the exchange even at the minimum amount, then the transit token is sent to the user's address.
Example:
A USDC lock is created with a minimum acceptable output of 0.5 ETH on Ethereum.
If the Solver finds an exchange route that yields 0.501 ETH, the lock is released immediately.
If the Solver finds an exchange route that yields 0.5 ETH, the lock will be released with a delay.
If the Solver cannot find a route that produces even 0.5 ETH, even after a significant amount of time, the locked USDC tokens will be released and sent to the user's address on Ethereum.
Additional information: Slippage Tolerance Distribution in Cross-Chain Swaps
What Is Solver
The Solver service is an off-chain component that monitors new lock events and executes the steps required to complete a cross-chain swap. It computes the best available on-chain route that satisfies the defined conditions and performs the necessary transactions. The Solver can make multiple attempts to complete the swap, increasing the likelihood of successful execution.
Currently, Symbiosis operates a single Solver service. In the future, we may introduce multiple independent Solver operators, each capable of processing swaps and receiving fees for successful executions.
More Information
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.
Last updated