square-checkMitigating Transit Token Outcomes in Cross-Chain Swaps

Symbiosis introduces a Depository contract and a Solver service to improve execution and reduce cases where a cross-chain swap completes with a transit token* instead of the user’s chosen asset.

* A transit token is a token that keeps the same value across chains and is used as a medium for cross-chain execution (e.g., stablecoins, wrapped ETH, wrapped BTC).

The problem

During cross-chain swaps, users may receive a transit token if one of the on-chain sub-swaps cannot be executed. This primarily happens when:

  1. Market prices on DEXs change and the quoted swap constraints become invalid.

  2. The calldata generated by a DEX aggregator is not executable (which is only discovered at execution time).

Where transit tokens may be returned

  • Any β†’ any (except BTC β†’ any): on the destination chain

  • BTC β†’ any: on BNB or on the destination chain

Example 1: USDT (Tron) β†’ AVAX (Avalanche)

The swap spans three chains:

  1. USDT.Tron β†’

  2. (sUSDT issued for Arbitrum β†’ sUSDC issued for Avalanche) on Symbiosis β†’

  3. (USDC β†’ AVAX) on Avalanche

Transit token outcome can happen on the destination chain (Step 3).

Example 2: BTC (Bitcoin) β†’ ETH (Arbitrum)

The swap spans four chains:

  1. BTC.Bitcoin β†’

  2. (syBTC β†’ USDC) on BNB β†’

  3. (sUSDC issued for BNB β†’ sUSDC issued for Ethereum) on Symbiosis β†’

  4. (USDC β†’ ETH) on Arbitrum

Since Bitcoin transactions have long confirmation times, swaps originating from BTC are particularly prone to transit-token outcomes on:

  • BNB Chain (Step 2)

  • Destination chain (Step 4)

Impact

The probability of receiving a transit token is low (below 1%), but with 10,000+ swaps this results in ~100 cases – meaning ~100 users receiving a token they did not intend to receive.

The solution

Instead of executing one static plan end-to-end, the payload for a cross-chain swap is now split into parts:

  • The parts that always succeed run as before.

  • The parts that may fail on-chain (those that can result in transit token outcomes) are treated as execution constraints and handled separately by Solvers in combination with Depository contracts.

(1) Depository + Solver simplified workflow diagram: USDT.Tron -> AVAX.Avalanche

(2) Depository + Solver simplified workflow diagram: BTC.Bitcoin -> ETH.Arbitrum

Depository contracts

Before interacting with third-party DEX(s) that may fail, tokens are locked in a Depository contract on the relevant chain. For each lock, the Depository stores execution conditions under which the lock can be released. All parameters are derived from the initial payload of the cross-chain swap.

Lock Release Conditions

Depository locks are released under one of the following conditions:

  • Immediate Release: The Depository releases locked tokens without delay if the resulting token amount β‰₯ optimistic required amount.

  • Delayed Release: The lock is released later if the output amount falls within the dynamically expanding acceptable range, but not below the minimum acceptable amount. The minimum threshold remains constant; the acceptable upper boundary deteriorates over time until the minimum is reached.

  • Fallback Release: If it becomes impossible to perform the exchange at the minimum amount even after an extended period of time:

    • BTC-origin swaps (BNB stage): syBTC is unwrapped to BTC and returned to the Bitcoin network

    • Destination-chain final swaps: the transit token is released to the user on the destination chain (assets are not returned to the source chain to avoid double cross-chain fees and user loss)

Solvers

A Solver is an off-chain component that monitors lock events and attempts to complete the on-chain swap under the defined constraints. 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, significantly improving the probability of successful execution.

Effects

The solution was initially introduced to eliminate cases where wrapped BTC (syBTC) could be returned to the user on BNB Chain instead of the intended destination asset. Over several months in production, all BTC-origin swaps completed successfully without returning syBTC to the user.

Following the successful rollout, the Depository contracts were deployed on Arbitrum and Avalanche as well. On both networks, the mechanism operated as expected.

The current plan is to extend the Depository + Solver solution to all networks supported by the protocol.

Additional Information

Refer to the following sources for more detailed information:

Last updated

Was this helpful?