SuperSwap
SuperSwap is Hypermid’s dedicated cross-chain bridge and swap protocol. It enables token swaps between SuperSwap-supported chains using the same Hypermid API endpoints.
Supported Chains
| Chain | Chain ID | Status |
|---|
| PulseChain | 369 | Active |
| Ethereum | 1 | Active |
| Base | 8453 | Active |
| Arbitrum | 42161 | Active |
| Polygon | 137 | Active |
| Optimism | 10 | Active |
| Unichain | 130 | Active |
| Sonic | — | Coming Soon |
| Solana | — | Coming Soon |
| Bitcoin | — | Coming Soon |
Endpoints You’ll Use
| Step | Endpoint | Purpose |
|---|
| 1 | GET /v1/quote | Get the swap price and route |
| 2 | POST /v1/execute | Get transaction data to sign |
| 3 | GET /v1/status | Track swap progress |
| 3b | POST /v1/inbound-receiver/register | Register inbound deposit (only needed for inbound multi-step) |
Inbound Swaps (Any Chain → PulseChain)
Inbound swaps deliver tokens to PulseChain. There are two types depending on the source token.
Inbound — Single Step
When: The source token is USDC on a supported chain (Base, Ethereum, Arbitrum, etc.)
User signs: 1 transaction
How it works: USDC is bridged directly to PulseChain and swapped to the desired token. One signature, fully automatic.
// USDC on Base → PLS on PulseChain (single step)
const quote = await client.getQuote({
fromChain: 8453, // Base
toChain: 369, // PulseChain
fromToken: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base
toToken: "0xA1077a294dDE1B09bB078844df40758a5D0f9a27", // PLS
fromAmount: "5000000", // $5 USDC
fromAddress: "0xYourWallet",
slippage: 0.03,
});
// Sign and broadcast — that's it
const tx = await wallet.sendTransaction(quote.data.transactionRequest);
Inbound — Multi-Step
When: The source token is NOT USDC (e.g., ETH, WBTC, or any token on any chain)
User signs: 1 transaction + 1 gasless wallet signature (confirmation)
How it works: Hypermid first swaps the source token to USDC, then bridges to PulseChain. After the swap transaction confirms, the user signs a gasless confirmation message so Hypermid can route the funds.
// ETH on Base → PLS on PulseChain (multi-step)
const quote = await client.getQuote({
fromChain: 8453,
toChain: 369,
fromToken: "0x0000000000000000000000000000000000000000", // ETH
toToken: "0xA1077a294dDE1B09bB078844df40758a5D0f9a27", // PLS
fromAmount: "1000000000000000", // 0.001 ETH
fromAddress: "0xYourWallet",
slippage: 0.03,
});
// Step 1: Sign the swap transaction
const txHash = await wallet.sendTransaction(
quote.data.steps[0].transactionRequest
);
await publicClient.waitForTransactionReceipt({ hash: txHash });
// Step 2: Confirm the deposit (gasless — no transaction fee)
// The quote response includes afterStep1 with the signing instructions
if (quote.data.afterStep1) {
const signature = await wallet.signTypedData({
...quote.data.afterStep1.eip712,
message: { ...quote.data.afterStep1.eip712.message, txHash },
});
await fetch(quote.data.afterStep1.action, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
...quote.data.afterStep1.body,
txHash,
signature,
}),
});
}
// Done — Hypermid bridges and swaps automatically (~5-7 min)
How do I know if it’s single or multi-step? Check the quote response:
- If it has a
transactionRequest at the top level → single step
- If it has
steps array and afterStep1 → multi-step
Outbound Swaps (PulseChain → Any Chain)
Outbound swaps send tokens from PulseChain to another chain. The user always signs just one transaction on PulseChain.
Outbound — Single Step
When: The destination token is USDC
User signs: 1 transaction on PulseChain
How it works: PLS is swapped to a stablecoin, bridged, and USDC arrives on the destination chain.
// PLS on PulseChain → USDC on Base (single step)
const quote = await client.getQuote({
fromChain: 369, // PulseChain
toChain: 8453, // Base
fromToken: "0xA1077a294dDE1B09bB078844df40758a5D0f9a27", // PLS
toToken: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base
fromAmount: "200000000000000000000000", // 200,000 PLS
fromAddress: "0xYourWallet",
slippage: 0.03,
});
// Sign and broadcast — USDC arrives on Base in ~3-5 minutes
const tx = await wallet.sendTransaction(quote.data.transactionRequest);
Outbound — Multi-Step
When: The destination token is NOT USDC (e.g., ETH, WBTC, or any non-stablecoin)
User signs: 1 transaction on PulseChain
How it works: PLS is swapped to a stablecoin, bridged to the destination chain, then swapped to the desired token. The user still signs only one transaction — the backend handles the destination swap automatically.
// PLS on PulseChain → ETH on Base (multi-step, still 1 signature)
const quote = await client.getQuote({
fromChain: 369,
toChain: 8453,
fromToken: "0xA1077a294dDE1B09bB078844df40758a5D0f9a27", // PLS
toToken: "0x0000000000000000000000000000000000000000", // ETH on Base
fromAmount: "200000000000000000000000",
fromAddress: "0xYourWallet",
slippage: 0.03,
});
// Sign and broadcast — ETH arrives on Base in ~5-7 minutes
const tx = await wallet.sendTransaction(quote.data.transactionRequest);
Outbound is always 1 signature. Unlike inbound multi-step, outbound multi-step doesn’t require a confirmation step — the backend handles the destination swap automatically.
Universal Code (Handles All Cases)
This single function handles all four swap types:
async function superSwap(params: {
fromChain: number;
toChain: number;
fromToken: string;
toToken: string;
fromAmount: string;
fromAddress: string;
}) {
// 1. Get quote
const quote = await client.getQuote({ ...params, slippage: 0.03 });
if (!quote.data) throw new Error(quote.error?.message || "No route found");
// 2. Sign the transaction
const txRequest = quote.data.steps?.[0]?.transactionRequest
|| quote.data.transactionRequest;
const txHash = await wallet.sendTransaction(txRequest);
await publicClient.waitForTransactionReceipt({ hash: txHash });
// 3. Confirm deposit if needed (only inbound multi-step)
if (quote.data.afterStep1) {
const signature = await wallet.signTypedData({
...quote.data.afterStep1.eip712,
message: { ...quote.data.afterStep1.eip712.message, txHash },
});
await fetch(quote.data.afterStep1.action, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ ...quote.data.afterStep1.body, txHash, signature }),
});
}
// 4. Track status
while (true) {
const status = await client.getStatus({
txHash, fromChain: params.fromChain, toChain: params.toChain,
});
if (status.data.status === "DONE") return status.data;
if (status.data.status === "FAILED") throw new Error("Swap failed");
await new Promise(r => setTimeout(r, 10000));
}
}
// Usage — same function for all 4 swap types:
await superSwap({ fromChain: 8453, toChain: 369, fromToken: "0x833...", toToken: "0xA10...", fromAmount: "5000000", fromAddress: "0xYou" });
await superSwap({ fromChain: 369, toChain: 8453, fromToken: "0xA10...", toToken: "0x833...", fromAmount: "200000...", fromAddress: "0xYou" });
Timing
| Swap Type | Estimated Time |
|---|
| Inbound — Single Step | ~3-5 minutes |
| Inbound — Multi-Step | ~5-7 minutes |
| Outbound — Single Step | ~3-5 minutes |
| Outbound — Multi-Step | ~5-7 minutes |
If the destination swap isn’t available after 3 retries, the bridged stablecoin is returned to the user automatically.
Pricing
All fees are included in the quote. estimate.toAmount is what you receive — no hidden costs.
Status Values
| Status | SubStatus | Description |
|---|
PENDING | WAIT_SOURCE_CONFIRMATIONS | Transaction submitted |
PENDING | BRIDGE_IN_PROGRESS | Cross-chain transfer (~3-5 min) |
PENDING | SWAP_IN_PROGRESS | DEX swap on destination chain |
DONE | COMPLETED | Tokens delivered to user |
DONE | FALLBACK_SENT | Swap unavailable — stablecoin returned |
FAILED | BRIDGE_TIMEOUT | Bridge didn’t complete in 30 min |
Popular PulseChain Tokens
| Token | Symbol | Decimals |
|---|
| PulseChain | PLS | 18 |
| HEX | HEX | 8 |
| PulseX | PLSX | 18 |
| Incentive | INC | 18 |
| Hedron | HDRN | 9 |
| Tether USD | USDT | 6 |
| Dai | DAI | 18 |
For PLS, use the WPLS address 0xA1077a294dDE1B09bB078844df40758a5D0f9a27 or the zero address. The API handles both.