Skip to main content
This guide covers the full lifecycle of a cross-chain swap through Hypermid: discovering chains and tokens, getting a quote, executing the swap, and tracking its status.

Endpoints You’ll Use

Steps 1-2 are optional if you already know the chain IDs and token addresses. Most integrations start at Step 3.

Overview

A cross-chain swap moves tokens from one blockchain to another in a single user action. Hypermid’s smart routing engine evaluates multiple bridge strategies in parallel across 90+ supported blockchains — including EVM chains, Solana, Bitcoin, XRP, PulseChain, TON, and more — and returns the optimal path automatically.
Swapping to/from PulseChain? See the PulseChain Swaps guide for specific examples and token addresses.

Swap lifecycle

Every swap follows four phases: discover available chains and tokens, get a quote, execute the transaction, and track its status until settlement.

1. Discovery

The app fetches all supported chains and tokens from the routing engine. The engine maintains a unified registry across all bridge types, so the user sees one clean token list regardless of which underlying strategy will fulfill the swap.

2. Quote

Hypermid queries its bridge providers simultaneously for the selected token pair. The routing engine compares all returned routes — factoring in output amount, gas cost, and estimated execution time — and surfaces a single best quote. The user never chooses a provider.

3. Execute

The user approves the transaction in their wallet. For EVM chains, this may involve a token approval step followed by the swap transaction itself. The app records a pending swap event via the Hypermid API, which gets updated on completion — no duplicate records.

4. Track

The app polls the status endpoint using the source transaction hash. Status transitions through PENDINGCOMPLETED (or FAILED), and the UI reflects progress in real time. Cross-chain settlement ranges from seconds to minutes depending on the bridge strategy used.

Architecture

Hypermid abstracts away bridge complexity behind a single smart routing engine. The user interacts with Hypermid — never with individual bridge providers.
Hypermid architecture: user and dApp connect to the smart routing engine, which orchestrates EVM/SOL bridge, intent bridge, and warp routes to 90+ blockchains

Bridge strategies

The routing engine selects the best strategy per swap automatically. In many cases, a single swap may be split across strategies to optimise for price and speed.

Step 1: Discover Supported Chains

Fetch the list of supported blockchains to populate your chain selector.

Step 2: Discover Tokens

Fetch tokens available on your source and destination chains.

Step 3: Get a Quote

Request the best swap route for your token pair and amount.
Set slippage to control how much price movement is acceptable. The default is typically 3% (0.03). For stablecoin swaps, consider using 0.5% (0.005).

Step 4: Execute the Swap

Submit the swap for execution. The response depends on the route type.

Handling the Response

The execution response contains either a transactionRequest (wallet mode) or a depositAddress (manual deposit mode).

Wallet Mode (EVM/Solana)

Manual Deposit Mode

Step 5: Track Status

Transaction Status

Poll GET /v1/status with the transaction hash:

Manual Deposit Status

For manual deposit routes, poll GET /v1/execute/deposit/status with the deposit ID:

Complete Example

Here’s a full working example that handles both route types:

Error Handling

Always handle these common errors: See the Error Handling Guide for comprehensive strategies.