• 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.

17 Jul 2023

3 min read

Automatic Relayers: Cloud Infrastructure for Cross-Chain Dapps

Share:

Wormhole’s Automatic Relayers enable developers to send cross-chain messages without needing to develop or manage any off-chain components.

Already sold?  Follow this quickstart on how to deploy a fully-working cross-chain dapp using a single solidity contract and clone the HelloWormhole repo to get up and running in minutes.

About Relayers

What are Relayers?

“Relayer” is a blanket term for the off chain processes that are used to deliver verified messages across blockchains. In order to build a cross-chain application, a developer must build both the on-chain components (protocol and smart contracts for all blockchain runtimes they intend to support), as well as an off chain relayer to transport verified messages from one chain to another.

Why are Relayers needed?

Relayers are a required component in bridging protocols (like Wormhole), responsible for delivering a verified message/VAA to a target chain.

Under the hood, this is how bridging protocols like Wormhole work:

  1. Someone performs an action on chain A (i.e. send a token to a smart contract).
  2. A bridging protocol’s security model (the Guardian Network for Wormhole) verifies that the action on chain A actually occurred. If so, the bridging protocol generates a verification message (called VAAs for Wormhole)
  3. This verification message/VAA is relayed to chain B
  4. A smart contract performs an action (i.e. mint a token) on chain B using the relayed verification/VAA.

Relayers are the verification message/VAA transport layer that enables bridges to function.

Introducing Automatic Relayers

Why build Automatic Relayers?

After many discussions with builders and integrators, one of the biggest roadblocks to building cross-chain applications is the need to build, maintain, and manage off-chain relayers. Building custom relayers means developers have to build a service that can interact with every supported chain and must maintain high availability and disaster recovery for the entire relayer system. Furthermore, specialized relayers are effectively centralized since they are run by the developer themselves in order to guarantee liveness, which could also put major operational overhead on them.

Given that this is a repeated pain point for building cross-chain, we wanted to build something that gave developers the option to abstract away the need to build, run, and maintain a dedicated relayer.

About Automatic Relayers

With the release of Automatic Relayers, builders can take advantage of a pre-configured and decentralized network of relayers that can deliver arbitrary VAAs to recipient contracts on any Wormhole-supported chain. This means that Wormhole dapps can now be built exclusively with on-chain code without ever needing to set up, run, or maintain relayers! Some of the key features include:

  • Lower Operational Costs: No need to develop, host, or maintain individual relayers.
  • Simplified Integration: Because there is no need to run a relayer, integration is as simple as calling a function and implementing an interface.

With Automatic Relayers, developers can focus on the business logic of their dapp, leaving message delivery to a service provider.

Build Cross-Chain Dapps on Easy Mode

Eliminating the need for developers to build off-chain relayers makes spinning up a cross-chain dapp easier than ever. Integrating Automatic Relayers into your dapp just takes 2 steps:

  1. In the source contract, end a delivery request from the Wormhole Relayer contract
  2. In the receiving contract, implement a “receiveWormholeMessages” function that’s invoked when your VAA has successfully relayed (use the Wormhole Receiver contract)

Start building your cross-chain dapp today by cloning the HelloWormhole quickstart repo. Simply write your contracts and use Automatic Relayers.

For the Foundry maxis out there, developing using Automatic Relayers also lets one take advantage of the fork testing feature, allowing for quick iterations on contract logic without worrying about the off-chain process of relaying.

New documentation and examples are actively being worked on for developers to play around with. Got a new cross-chain dapp idea you’d like to work on? Reach out to us on Discord, and let’s jam!


About Wormhole

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.

To learn more about Wormhole, visit wormhole.com, chat with us on Discord, or find Wormhole Connect integration details at wormhole.com/connect

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.