• Solutions
  • Developers
  • Blockchains
  • Blog
Wormholescan
Subscribe

Subscribe for updates

Subscribe to the Wormhole newsletter for exclusive updates.

Use Multichain Apps

Products

MessagingQueriesConnectNTTGateway

2024 Ⓒ Wormhole. All Rights Reserved.

01 May 2023

4 min read

Wormhole Connect: Integrate In-App Bridging in as Few as 3 Lines of Code

Share:

We are excited to announce the launch of Wormhole Connect, an easy-to-integrate widget that allows developers to add cross-chain asset bridging directly into their dapp in as few as 3 lines of code.

Why Did We Build Wormhole Connect?

In today’s status quo, transferring assets cross-chain is incredibly difficult for both users and developers.

For end-users who want to bridge tokens from other networks, they often need to leave a website/dapp to bridge, manage different gas tokens and multiple wallets, and then return to the original dapp to complete their transaction.

For developers, it’s not much better. Operating on multiple chains means having to manage the intricacies of integrating multiple blockchains/runtimes and, in the worst-case scenario, sending users away from your app/website to complete their bridging elsewhere.

What Is Wormhole Connect?

Wormhole Connect is an open-source frontend SDK that lets Web3 developers embed asset bridging directly into their apps or websites. With Connect, developers can simplify their users’ end-to-end bridging experience and customize the UI so that the widget can feel native to their environment.

0:00
/

Why Integrate Wormhole Connect?

  • Incorporate bridging easily: In just a few lines of code, asset bridging becomes a native part of your UX; no more redirects to external bridges
  • Simplify gas payments: On EVM-based chains, Connect lets users bridge assets while only having to pay gas on the source chain. The automatic relaying feature pays gas on behalf of users on the destination chain. Connect will support automatic relaying for other chains in the future.
  • Gas dropoff: Gas dropoff is a Connect feature that enables users to pay an additional fee on the source chain to request a small amount of native gas on the destination chain. For example, a user bridging USDC from Ethereum to Sui can pay a fee denominated in USDC from their sending wallet to receive some native SUI in their receiving wallet in addition to the USDC they are bridging over. Gas dropoff is currently supported on EVM-based chains and Sui and will be supported on other chains in the future.
  • Scope to your dapps context: Create allow lists of chains and assets that you want to support
  • Fully customizable: Connect supports both light and dark modes and can optionally be fully customized. See the NPM package readme for more details on how to fully customize the UI. Customize branding, navigation, colors, and copy to make the widget feel like it’s a native part of your UI
  • Custom routes (coming soon): Build prescribed, composed experiences (e.g. bridge to L1, then swap to custom game token via Uni) and pipe together multiple arbitrary contract interactions.

Drift Protocol - The First Project to Integrate Wormhole Connect

Drift Protocol is a DEX (decentralized exchange) built on the Solana blockchain, enabling transparent and non-custodial cryptocurrency trading. Drift Protocol is designed to provide a seamless trading experience with low slippage, low fees, and minimal price impact amongst four primary products:

  1. Spot Trading: swap spot tokens
  2. Perpetuals Trading: trade perpetual swaps with up to 10x leverage
  3. Borrow & Lend: borrow or lend at variable rate yields
  4. Passive Liquidity Providing: stake / provide liquidity

By integrating Wormhole Connect, Drift Protocol allows users from various blockchains to access their DeFi products. See how easy integrating Connect into their dapp has been:

Integrating Wormhole Connect will provide Drift users with seamless cross-chain functionality, enhancing their overall experience and supporting Drift and Wormhole’s mutual goal of driving the growth and widespread adoption of DeFi.

Learn more about Drift on their website or follow them on Twitter.

Looking Ahead: The Future of Wormhole Connect

While today Wormhole Connect focuses on transferring assets using the Wormhole-powered token bridge contracts, eventually, it will enable developers to create custom Wormhole Connect-compatible routes that any integrator can use. These custom routes can add additional liquidity sources, such as native swaps or native USDC transfers through CCTP, or even chain arbitrary functions along with bridging functionality.

Integrators will be able to choose which routes to expose to their users, ensuring the best fit for their use cases. The widget will also expand its default routes, supporting bridging to native or wrapped assets by automatically routing between e.g., Portal Bridge, Circle, or Hashflow, depending on the desired destination asset.

Get Started Today

Integrating cross-chain functionality has never been easier. Here’s the snippet for a simple integration:

<!-- include in <head> -->
<script src="https://www.unpkg.com/@wormhole-foundation/[email protected]/dist/main.js" defer></script>
<link rel="https://www.unpkg.com/@wormhole-foundation/[email protected]/dist/main.css" />

<!-- include in <body> -->
<div id="wormhole-connect"></div>

Yes, just a few lines of code - that's all you need. Do you want to learn more?

Please refer to our Integration Guide for detailed instructions on how to integrate Wormhole Connect.

Of course, we are here to help and happy to guide you along the way: please reach out on Discord, get the “builder” role, and join our exclusive developer channels.

Alternatively, you can check out the Connect page and begin developing on the cutting edge of cross-chain.

New to Wormhole?

If you’re new to Wormhole, here’s what you need to know:

Wormhole is the industry standard cross-chain messaging protocol powering applications across Web3. Wormhole provides developers access to liquidity and users on over 20 of the leading blockchain networks, enabling use cases that span DeFi, NFTs, governance, and more. Wormhole enables a growing suite of products to build on its messaging layer - Wormhole Connect is a key asset layer product, providing developers an in-app bridging widget that can be integrated in as few as 3 lines of code. The wider Wormhole network is trusted and used by teams like Circle and Uniswap, and to date, the platform has facilitated the transfer of over 35 billion dollars through hundreds of millions of cross-chain messages.

Learn more on wormhole.com.

The Latest Wormhole Stats

  • The protocol’s total volume stands at over $35B.
  • Millions of messages are submitted each day.
  • Hundreds of millions of messages have successfully been transmitted.
  • More than 60 protocols are currently building on top of Wormhole’s generic message-passing layer. See who they are.

Join the Wormhole Community

If you have questions, need support, or simply want to connect, join the Wormhole community and keep up-to-date with our upcoming announcements. We’re always happy to hear your feedback.

Twitter | Discord | Blog | Telegram | YouTube | GitHub | Website

Stay up to date with the latest news

Here’s your chance to get in on this one.

Discover More

Take a deep dive into our ever-evolving discussion on xChain technologies, new feature announcements, research, and more.

W is Now Natively Multichain on Ethereum and Layer-2s with Wormhole Native Token Transfers (NTT)

W is Now Natively Multichain on Ethereum and Layer-2s with Wormhole Native Token Transfers (NTT)

25 Apr 2024

3 min read

Native W tokens are now available on Solana, Ethereum, Arbitrum, Optimism, and Base through Wormhole Native Token Transfers (NTT). With NTT, users can seamlessly transfer W across ...

25 Apr 2024

3 min read

Subscribe for updates

Subscribe to the Wormhole newsletter for exclusive updates.

Products

MessagingConnectGateway

About

Terms of ServicePrivacy Policy

2024 Ⓒ Wormhole. All Rights Reserved.