Cross-Chain Contract Calls

Swing API and SDK provide a cross-chain contract feature that allows developers to execute contract calls on different blockchains, enabling interoperability between blockchain ecosystems.

How it Works

The cross-chain contract feature works by passing contract call data through a bridge to execute the final contract call on the destination blockchain. This allows developers to perform cross-chain transactions in a single transaction on the source blockchain, without the need to switch RPC or sign another transaction on the destination blockchain.

For example, in a normal any-to-any cross-chain swap, converting MATIC on Polygon to ETH on Ethereum requires several steps. With Swing, you can perform all three steps in a single transaction on Polygon by passing the destination swap contract call data through a bridge to execute the final swap for the user and then send the swapped tokens to the user.

Supported Bridges:

  • Stargate
  • Celer (coming soon)

Supported chains:

  • Ethereum
  • BSC
  • Avalanche
  • Polygon
  • Arbitrum
  • Optimism
  • Fantom

Note: Same-chain contract calls are not available yet.

Use Cases

By enabling cross-chain interoperability, Swing’s cross-chain contract feature unlocks new possibilities for DeFi applications, making them more flexible, efficient, and user-friendly. Below you can find some of the most exciting use cases:

1. Cross-Chain Staking Protocol Deposits

Users can use any asset on any supported chain to stake a token on a different chain. This provides flexibility to the users by allowing them to stake with one transaction without having to figure out how to get an asset to stake.

Example: A user can send USDT on Polygon to stake ETH on Ethereum to Lido Protocol and receive stETH in their wallet.

Some of the supported protocols:

  • Lido
  • RocketPool
  • Stakewise
  • and more…

2. Lending Protocol Deposits

Example: Users can send USDT on Polygon to supply AVAX on Avalanche to Aave Protocol and receive aAVAX in their wallet to start earning rewards.

3. Liquidity Protocol Deposits

Example: User sends USDC on Ethereum to deposit into a single asset pool on GMX to receive rewards.

Possibilities are endless… talk to us about your use case and how we can help.