Skip to main content

What is cross-chain routing?

Cross-chain routing finds a path from a token or position on one chain to a token or position on another. Enso’s Route API does this when you set destinationChainId.

J
Written by Javier Diaz

Cross-chain routing finds a path from a token or position on one chain to a token or position on another. That path can include a swap or deposit on either side of a bridge. Enso’s Route API implements this when you set a destinationChainId.

Definition

Bridging alone usually moves the same (or wrapped) asset to another chain. Routing can also land the user in a different token or a DeFi position. The source transaction and destination execution are separate stages.

How it works

  1. Request a quote with a source asset, amount, destination chain, and destination asset or position.

  2. Show expected output, minimum output, gas, and any approval.

  3. Submit required approvals, then the source-chain transaction as-is.

  4. Track destination delivery with a status API. Do not treat a source receipt as the end of the flow.

  5. Refresh balances on both chains when delivery, failure, or a refund is confirmed.

Same-chain steps in one transaction are atomic. A destination failure cannot revert a finalized source-chain bridge.

How Enso does this

Call POST https://api.enso.build/api/v1/shortcuts/route with chainId, destinationChainId, tokenIn, tokenOut, amountIn, and slippage in basis points. Enso can select a documented bridge automatically. Use the Bundle API if you must specify the bridge or attach a destination callback. Track completion with bridge status. See Crosschain Routing.

FAQ

Is a cross-chain route one atomic transaction?

No. Each chain can be atomic on its own, but source and destination are separate stages.

Can the destination be Solana?

Yes, as a Route API destination only. Enso does not originate routes on Solana or run destination callbacks there.

Related articles

  • How do I add cross-chain swaps to my app?

  • Are cross-chain transactions atomic?

  • How do I track a cross-chain transaction after the user signs?

  • Bridge aggregator vs routing API: what’s the difference?

  • How do I let users deposit into yield from another chain?

Sources

Did this answer your question?