Cross-Chain Swaps on Rootstock with Symbiosis Finance
Symbiosis Finance is a cross-chain AMM DEX that aggregates liquidity from L1s, L2s, EVM, and non-EVM networks. Rootstock is natively integrated, which means any token tradable on a DEX in any supported network can be swapped into rBTC, rUSDT, or any Rootstock token, and vice versa, in a single user action. Symbiosis also supports BTC ↔ Rootstock routes through its BTC Fee Collector deployed on Rootstock.
This guide covers two integration paths:
- Symbiosis REST API - language-agnostic, recommended for production
- Symbiosis JS SDK (
symbiosis-js-sdk) - direct access to protocol primitives from a TypeScript/Node app
Prerequisites
- Use Node.js 18+ version.
- A wallet provider (ethers v5/v6, viem, or Wagmi)
- Familiarity with EVM token approvals of ERC20 tokens
- (Optional) A
clientId/partnerIdstring to attribute swaps to your integration. No registration required to start; contact Symbiosis to enable partner-fee collection.
| Parameter | Value |
|---|---|
| Chain ID (Mainnet) | 30 |
| Native gas token | rBTC |
| Rootstock public RPC | https://public-node.rsk.co |
| Symbiosis BTC Fee Collector (Rootstock) | 0xbba322c98601b707cffb98092010e0b95d538bb7 |
Before going live, verify all of the following. Skipping any of these steps puts user funds at risk.
- Approvals: Always approve users' ERC-20 tokens to the
metaRouterGatewaycontract for the source chain — never themetaRouterdirectly. Read addresses from the SDK Mainnet config. - Calldata: Do not modify, cache, or reuse calldata returned by the SDK or API. Regenerate it (every ~30 seconds) before each transaction.
- Contract addresses: Verify Symbiosis contract addresses against the SDK config at deploy time.
- Post-deploy sanity: Perform at least one real cross-chain operation after deployment and after each upgrade.
Concepts in 60 Seconds
A Symbiosis cross-chain swap is made of up to three legs:
- (A) Source-chain on-chain swap, optional, when the source token is not the transit token used to leave the chain (typically USDC, USDT, WETH, or WBTC).
- (B) Host-chain swap, always performed on the Symbiosis host chain between synthetic sTokens (e.g.
sUSDC→sUSDC). - (C) Destination-chain on-chain swap, optional, when the destination token is not the transit token.
The user signs one transaction on the source chain. Symbiosis Relayers and (where deployed) the Solver service finalize legs (B) and (C) automatically. The slippage tolerance the user picks is distributed across these legs, the host leg always reserves at most 0.2%. Refer to Slippage Tolerance Distribution for the exact formula.
Integration 1: The Symbiosis REST API
The REST API wraps the SDK and is backward-compatible across SDK upgrades. This is the recommended path for production. The base URL for Mainnet is:
https://api.symbiosis.finance/crosschain
Interactive endpoint reference: Swagger docs.
Step 1: List Supported Chains
Use /v1/chains to confirm Rootstock (Chain ID 30) is in the supported set and to discover any new networks Symbiosis adds.
curl https://api.symbiosis.finance/crosschain/v1/chains