Skip to main content

Execute Multi-Chain Transactions with One Signature

Multi-chain execution allows you to perform operations across multiple blockchains in a single, coordinated flow. Instead of manually switching networks, bridging assets, and executing separate transactions, everything happens with one signature.
Traditional Multi-Chain:
1. Sign tx on Ethereum      → Wait for confirmation
2. Bridge to Arbitrum       → Wait 10+ minutes
3. Switch to Arbitrum       → Sign tx
4. Execute on Arbitrum      → Wait for confirmation
Total: 4 signatures, multiple waits, manual coordination

With Biconomy Multi-Chain:
1. Sign once → Automatic execution across all chains
Total: 1 signature, automated coordination
Biconomy’s Multi-chain Execution Environment (MEE) orchestrates cross-chain operations:
┌──────────────────────────────────────────────────────────────┐
│                    Supertransaction                           │
│  ┌─────────────┐   ┌─────────────┐   ┌─────────────┐        │
│  │ Instruction │   │ Instruction │   │ Instruction │        │
│  │  Chain A    │──▶│   Bridge    │──▶│  Chain B    │        │
│  └─────────────┘   └─────────────┘   └─────────────┘        │
└──────────────────────────────────────────────────────────────┘

                    Single Signature

           ┌───────────────┼───────────────┐
           ▼               ▼               ▼
    ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
    │  Execute    │ │  Monitor    │ │  Execute    │
    │  Chain A    │ │   Bridge    │ │  Chain B    │
    └─────────────┘ └─────────────┘ └─────────────┘
The process:
  1. Build: Define operations across chains
  2. Quote: Get execution cost and timing estimates
  3. Sign: User signs once for entire flow
  4. Execute: Biconomy handles coordination
  5. Track: Monitor progress across all chains
Biconomy supports 70+ EVM chains including:
CategoryChains
L1sEthereum, BNB Chain, Avalanche, Polygon
Optimistic RollupsArbitrum, Optimism, Base, Mantle
ZK RollupszkSync Era, Polygon zkEVM, Scroll, Linea
Alt L1sFantom, Gnosis, Celo
See supported chains for the complete list.Cross-chain routes are supported between any combination of these chains via integrated bridge providers.
Using AbstractJS SDK:
import { createMeeClient, runtime } from "@biconomy/abstractjs";

const client = await createMeeClient({ account: smartAccount });

// Define multi-chain operation
const quote = await client.getQuote({
  instructions: [
    // Step 1: Swap on Ethereum
    {
      chainId: 1,
      type: "intent",
      intent: "swap",
      params: {
        from: { token: "ETH", amount: "1.0" },
        to: { token: "USDC" }
      }
    },
    // Step 2: Bridge to Base
    {
      type: "intent",
      intent: "bridge",
      params: {
        token: "USDC",
        amount: runtime.outputOf(0), // Use swap output
        fromChain: 1,
        toChain: 8453
      }
    },
    // Step 3: Deposit on Base
    {
      chainId: 8453,
      to: aavePoolBase,
      data: encodeDeposit(runtime.outputOf(1)) // Use bridge output
    }
  ],
  feeToken: { address: "USDC", chainId: 1 }
});

// Execute with single signature
const result = await client.executeQuote(quote);
console.log("Multi-chain tx:", result.hash);
Using Supertransaction API:
curl -X POST "https://api.biconomy.io/v1/quote" \
  -H "x-api-key: $API_KEY" \
  -d '{
    "sender": "0x...",
    "instructions": [
      {"chainId": 1, "type": "intent", "intent": "swap", ...},
      {"type": "intent", "intent": "bridge", ...},
      {"chainId": 8453, "to": "0x...", "data": "0x..."}
    ]
  }'
Biconomy aggregates multiple bridge providers to find optimal routes:
ProviderStrengths
AcrossFast finality, competitive rates
StargateDeep liquidity, many chains
ConnextTrustless, EVM-focused
HopL2-optimized, fast
SynapseWide chain support
Route selection criteria:
  • Speed: How quickly funds arrive
  • Cost: Bridge fees + gas on destination
  • Reliability: Historical success rate
  • Liquidity: Available for transaction size
// Get quote with route details
const quote = await client.getQuote({
  instructions: [
    { type: "intent", intent: "bridge", params: {...} }
  ]
});

console.log(quote.bridgeRoute);
// {
//   provider: "Across",
//   estimatedTime: "2-5 minutes",
//   fee: "0.05%",
//   outputAmount: "999.50 USDC"
// }
Multi-chain execution requires gas on each destination chain. Biconomy handles this automatically:Option 1: Pay from source chain (Recommended)
const quote = await client.getQuote({
  instructions: [...],
  // Pay all gas from USDC on Ethereum
  feeToken: {
    address: USDC_ADDRESS,
    chainId: 1 // Ethereum
  }
});
// Biconomy converts and allocates gas for all chains
Option 2: Sponsored gas
const quote = await client.getQuote({
  instructions: [...],
  feeToken: { address: "sponsored" }
});
// Your Paymaster covers gas on all chains
Option 3: Pre-funded on each chain
// Ensure smart account has gas tokens on each chain
// Biconomy uses local balance for each chain's gas
Multi-chain transactions have multiple stages. Track progress with:
const result = await client.executeQuote(quote);

// Poll for status
const status = await client.getExecutionStatus(result.hash);

console.log(status);
// {
//   overall: "in_progress",
//   steps: [
//     { chain: 1, action: "swap", status: "completed", txHash: "0x..." },
//     { chain: "bridge", action: "bridge", status: "in_progress", 
//       estimatedCompletion: "2024-01-15T10:30:00Z" },
//     { chain: 8453, action: "deposit", status: "pending" }
//   ]
// }

// Wait for completion
const finalResult = await client.waitForExecution(result.hash);
console.log("All chains completed:", finalResult);
Webhook notifications:
// Configure webhook for status updates
await client.setWebhook({
  url: "https://your-app.com/api/tx-status",
  events: ["step_completed", "execution_completed", "execution_failed"]
});
Biconomy implements safeguards for cross-chain failures:Before bridging:
  • Transaction reverts atomically
  • No funds leave source chain
  • User can retry immediately
After bridging (during destination execution):
  • Funds arrive on destination chain safely
  • Destination execution is retried automatically
  • If retries fail, funds remain in user’s destination account
const result = await client.executeQuote(quote);
const status = await client.getExecutionStatus(result.hash);

if (status.overall === "partial_failure") {
  console.log("Failed step:", status.failedStep);
  console.log("Funds location:", status.fundsLocation);
  
  // Option 1: Retry failed step
  await client.retryStep(result.hash, status.failedStep.index);
  
  // Option 2: Manual recovery
  // Funds are in your account on destination chain
}
Execution time depends on the chains and bridge used:
RouteTypical Time
Same L2 (e.g., Base → Base)2-5 seconds
L2 → L2 (e.g., Arbitrum → Base)1-5 minutes
L1 → L2 (e.g., Ethereum → Base)2-10 minutes
L2 → L1 (e.g., Arbitrum → Ethereum)7 days (native) / 5-30 min (fast bridge)
Speed vs. cost tradeoffs:
// Prioritize speed
const fastQuote = await client.getQuote({
  instructions: [...],
  preferences: { priority: "speed" }
});

// Prioritize cost
const cheapQuote = await client.getQuote({
  instructions: [...],
  preferences: { priority: "cost" }
});
Example 1: Cross-Chain Yield Farming
// Move funds from Ethereum to higher-yield farm on Base
const instructions = [
  // Withdraw from Aave on Ethereum
  {
    chainId: 1,
    to: aaveEth,
    data: encodeWithdraw(usdc, maxAmount)
  },
  // Bridge to Base
  {
    type: "intent",
    intent: "bridge",
    params: { token: "USDC", fromChain: 1, toChain: 8453 }
  },
  // Deposit to higher-yield protocol on Base
  {
    chainId: 8453,
    to: yieldProtocol,
    data: encodeDeposit(runtime.outputOf(1))
  }
];
Example 2: Cross-Chain NFT Purchase
// Use ETH on Arbitrum to buy NFT listed on Base
const instructions = [
  // Swap ETH to USDC on Arbitrum
  {
    chainId: 42161,
    type: "intent",
    intent: "swap",
    params: { from: "ETH", to: "USDC", amount: "0.5" }
  },
  // Bridge USDC to Base
  {
    type: "intent",
    intent: "bridge",
    params: { token: "USDC", fromChain: 42161, toChain: 8453 }
  },
  // Buy NFT on Base
  {
    chainId: 8453,
    to: nftMarketplace,
    data: encodeBuy(nftAddress, tokenId),
    value: runtime.outputOf(1)
  }
];
Example 3: Multi-Chain Portfolio Rebalancing
// Consolidate assets from multiple chains
const instructions = [
  // Withdraw from Polygon
  { chainId: 137, to: protocolA, data: encodeWithdraw() },
  { type: "intent", intent: "bridge", params: { fromChain: 137, toChain: 1 } },
  
  // Withdraw from Arbitrum
  { chainId: 42161, to: protocolB, data: encodeWithdraw() },
  { type: "intent", intent: "bridge", params: { fromChain: 42161, toChain: 1 } },
  
  // Consolidated deposit on Ethereum
  { chainId: 1, to: mainVault, data: encodeDeposit(totalAmount) }
];

Continue learning