← docs

Cross-chain swap and bridge

Three tools cover the full swap lifecycle: swap.quote for a single optimal route, swap.multi for batching multiple quotes in parallel, and swap.status for tracking cross-chain bridges after submission. Routing aggregates 1inch, 0x, Paraswap, and bridge protocols via Li.Fi across 30+ chains. All tools return unsigned transactions; you or the agent signs.

swap.quote

Returns an optimal swap or bridge quote with unsigned transaction calldata.

Parameters:

Response includes transactionRequest (unsigned tx), expected output, route steps, gas and fee breakdown. For cross-chain, set fromChain and toChain differently; the quote includes bridge steps.

swap.multi

Batch multiple swap or bridge quotes in a single MCP call. Each request is quoted in parallel. Use it to compare routes across chains, split a position, or prepare several transactions before signing.

When to use: swap.quote for one route, swap.multi for two or more. Example: "Quote USDC to ETH on Ethereum, Base, and Arbitrum so I can pick the best chain."

Parameters: one argument requests, an array of 1-10 swap request objects. Each object has the same shape as swap.quote (fromToken, toToken, fromAmount, fromAddress, chains, slippage, order).

Each result in the response mirrors a single swap.quote result with its own transactionRequest. Quotes are valid for about 30 seconds; sign and submit sequentially to avoid nonce issues.

Demo: compare chains

"Get swap quotes for 1000 USDC to ETH on Base and on Arbitrum." The agent calls swap.multi with two requests, compares output amounts and gas, and recommends the better route.

Demo: split across chains

"Bridge 5000 USDC from Base to Ethereum and 5000 USDC from Base to Arbitrum." Two requests with same fromChain, different toChain. Execute one bridge at a time and track each with swap.status.

swap.status

Tracks execution of a cross-chain bridge after submission.

Parameters:

Returns status (PENDING, DONE, FAILED), receiving transaction hash, and amount received when the bridge completes.

Syenite never holds private keys. swap.quote and swap.multi return unsigned transactionRequest objects. Before signing, use tx.verify, tx.simulate, and tx.guard to verify the transaction independently. After signing, confirm with tx.receipt.

workflow

1. Call swap.quote (or swap.multi for batch) with tokens, amounts, addresses, and chains. 2. Optionally verify with the trust layer. 3. Sign and submit from your wallet. 4. For cross-chain bridges, call swap.status with the tx hash to poll until completion.

supported chains

Ethereum, Arbitrum, Optimism, Base, Polygon, BSC, Avalanche, zkSync, Linea, Scroll, Gnosis, Fantom, and others (30+). Same-chain and cross-chain both supported.

Related