The Business & Technology Network
Helping Business Interpret and Use Technology
«  

May

  »
S M T W T F S
 
 
 
1
 
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
 
 
 
 
 
 
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31
 
 

THE Neon EVM ANALYSIS & IT’S IMPACT ON SOLANA.

DATE POSTED:March 19, 2024
A Developer’s Intro to WORMHOLE and Product Ideasdocs.wormholeIntroduction:

Imagine living in a house with many rooms, yet no doors connecting them. This is the challenge blockchain technology faces without interoperability. As diverse blockchain networks spawn, the necessity for robust communication links becomes crucial. Enter Wormhole, a pioneer in this area. It enables smooth cross-chain communications with its general message passing protocol. It’s not just about fast asset and data transfers. Wormhole also represents the key value of blockchain connectivity.

This article delves into the mechanics of Wormhole. It explains its functions. It also covers the impact of cross-chain interoperability on decentralized systems. We’ll dissect the Wormhole SDKs. We’ll provide developers with the key resources to use them. Also, we’ll think of product ideas that can use Wormhole’s framework. We’ll also give you a link to $10k in grants from Superteam and the Wormhole Foundation. The grants are for making your cross-chain Dapps. Dive in as we aim to build a connected blockchain ecosystem.

Background of Wormhole and it’s Function

In 2021, Jump Crypto unveiled Wormhole as a groundbreaking token bridge. It changed how tokens move between blockchains. And was especially useful for moving tokens between Solana and Ethereum. Yet, this was only the beginning of an
extraordinary journey. With Wormhole V2, the platform changed. It became a dynamic layer that connects different chains and DApps.

Wormhole V2 emerged as a general messaging protocol, leading cross-chain communication and unlocked many possibilities. It helped tokens move smoothly, enabled cross-chain governance for multi-chain protocols and allowed NFTs to cross virtual borders — which was invaluable for multi-chain gaming. The protocol expanded and embraced networks like Terra and Binance Smart Chain (BNB). This catered to an even wider blockchain audience.

Wormhole’s impact has been huge. It moved over $40 billion across blockchains and also sent over 1 billion messages. Supporting over 30 leading blockchains, Wormhole has cultivated a vibrant ecosystem where over 200 applications thrive on its technology.

Jump and Wormhole had a strategic split in November 2023. But, the protocol kept growing. It raised a staggering $225 million and its value reached $2.5 billion. This feat was easier with the help of famous investors. They include Brevan Howard, Coinbase Ventures, Multicoin Capital, and Jump Crypto. All of them have played a key role in Wormhole’s growth and change.

The Importance of Cross-chain Communication:

Cross-chain communication is crucial in the current blockchain landscape because it allows for:

  • Asset Interoperability: Users can move tokens and assets between blockchains easily. This promotes liquidity and access.
  • Scalability: Cross-chain communication can ease congestion on chains. It does this by offloading transactions to other networks, which improves scalability.
  • Diversification: Projects and users can use the special features of multiple blockchains. This will diversify their exposure and reduce their reliance on any single network.
  • Enhanced Functionality: Developers can use the strengths of many blockchains. This can make DApps more flexible and powerful. The DApps can offer better features.
  • Global Adoption: Interoperability fosters collaboration and integration between different blockchain ecosystems. It drives wider adoption of blockchain technology.
Wormhole Network:

The Wormhole Protocol is simple, yet it provides a powerful base layer. Supporting over 30 Blockchains, each supported blockchain has deployed a Wormhole smart contract. Users can emit messages in the Wormhole Network by sending data to the smart contracts. These messages are quite simple and only have the following six fields.

  1. emitterChain — The blockchain from which this message originates.
  2. emitterAddress — The public address which submitted the message.
  3. consistencyLevel — Is the number of blocks/slots that must pass. Before this can happen, you must confirm this message.
  4. timestamp — The timestamp when the Wormhole Network confirmed the message.
  5. sequence — Is an incrementing number. It shows how many messages this emitterAddress has emitted.
  6. payload — The arbitrary contents of this message.

When a wormhole contract processes a message, Guardians in the Wormhole Network will see the transaction. They will create a SignedVAA once the transaction has reached the confirmation time on the emitter chain.

The SignedVAA is an affirmation from the Wormhole Network. It says a transaction has been finalized on the emitter chain. It says that actions on other chains may now proceed.

Wormhole can verify any data and many ‘bridge’ applications can be built on it. Bridges that use it can transfer native currencies, tokens, and NFTs. They can also transfer oracle data, governance votes, and much more decentralized data.

Understanding the Wormhole SDK

Software Development Kit (SDK) is a set of tools to build software for a particular platform. These tools also allow an app developer to build an app which can integrate with another program. Wormhole provides tools for developers. They use them for parsing VAAs (Verifiable Action Approvals) and other Wormhole structures. They also use the tools for Interacting with the Token and NFT through its SDK.

Installation and configuration of the Wormhole SDK

To install and configure the Wormhole SDK, you can follow these steps:
1. Installation

  • Install the SDK: The Wormhole SDK is available on npm and can be installed using the following command.
npm i @certusone/wormhole-sdk
  • Install Connect SDK: For a more comprehensive set of tools, you can also install the Connect SDK.
npm install @wormhole-foundation/connect-sdk
npm install @wormhole-foundation/connect-sdk-evm
npm install @wormhole-foundation/connect-sdk-solana
npm install @wormhole-foundation/connect-sdk-algorand

And any protocols you intend to use:

npm install @wormhole-foundation/connect-sdk-evm-tokenbridge
npm install @wormhole-foundation/connect-sdk-solana-tokenbridge
npm install @wormhole-foundation/connect-sdk-algorand-tokenbridge

2. Configuration

  • Set Up Guardian RPC: Configure the Guardian RPC nodes in your application to fetch VAAs and query the Wormhole network. Here’s an example for the mainnet configuration.
const MAINNET_GUARDIAN_RPC = [
"https://api.wormholescan.io",
// Explorer offers a guardian equivalent endpoint for fetching VAAs
"https://wormhole-v2-mainnet-api.mcf.rocks",
"https://wormhole-v2-mainnet-api.chainlayer.network",
"https://wormhole-v2-mainnet-api.staking.fund",
  • Initialize SDK: After installation, you can initialize the SDK in your project. For the Connect SDK, it might look like this.
import { Wormhole, Signer } from "@wormhole-foundation/connect-sdk";
import { EvmPlatform } from "@wormhole-foundation/connect-sdk-evm";
import { SolanaPlatform } from "@wormhole-foundation/connect-sdk-solana";
import { AlgorandPlatform } from "@wormhole-foundation/connect-sdk-algorand";
// Include the protocols you wish to use
import "@wormhole-foundation/connect-sdk-evm-tokenbridge";
import "@wormhole-foundation/connect-sdk-solana-tokenbridge";
import "@wormhole-foundation/connect-sdk-algorand-tokenbridge";
const network = "Mainnet"; // Or "Testnet"
const wh = new Wormhole(network,
[EvmPlatform, SolanaPlatform, AlgorandPlatform]);Tools for parsing VAAs (Verifiable Action Approvals) and other Wormhole structures.

The VAA is a core messaging primitive in Wormhole. It acts as packets of cross-chain data. When a cross-chain application contract interacts with the Core Contract, it emits them.

The SDK includes methods for:

  • Parsing VAAs: Parsing VAAs is key. Developers can parse and verify them. This ensures they came from a trusted contract and have the right message.
  • Interacting with Bridges: You can interact with the Token and NFT bridges. This is essential for moving assets across chains.
  • Submitting Messages: You can use the SDK to submit messages to the Wormhole network. You can also use it to parse the output from Wormhole contracts.
Methods for interacting with the Token and NFT bridges.

Interacting with the Token and NFT bridges is a key part of using the Wormhole SDK. Here are the methods you can use:

Token Bridge Interaction
  • Transfer Tokens: To move tokens across chains, use the transferTokens method. You need the token address, amount, and the target chain details.
  • Attest Token: The attestToken method creates a wrapped version of a token on a different chain.
  • Complete Transfer: After a transfer is started, the destination chain uses the completeTransfer method to claim the tokens.
NFT Bridge Interaction
  • Transfer NFTs: You can transfer NFTs like tokens. You do this using the transferNFT method. You specify the NFT’s contract address and the target chain.
  • Attest NFT: is used to make an NFT available on another chain. You use the attestNFT method. It creates a wrapped NFT on the destination chain.
  • Complete NFT Transfer: The completeNFTTransfer method completes an NFT transfer. It does so on the destination chain. This allows the NFT to be claimed.

Check the npm documebtation for a more comprehensive explanation.

Developer Resources:
  • Developers can find more detailed instructions in the Wormhole SDK documentation. It includes code examples and best practices. It helps to build interoperable blockchain apps.
  • Explore Tutorials for quick starts and concept explanations.
  • GitHub repository for the Wormhole reference implementation.
  • Watch the video on how to start building cross chain.
Current Gaps in Wormhole Protocol:

The Wormhole team designed a universal translator for blockchains, making it a key player in interoperability. But, like any technology, it has gaps to resolve. Some of which are

  • Integration Levels: Some blockchains lack full integration. They can only access networks that allow verification. These limits may restrict use of some Wormhole features.
  • Relayer Processes: The ecosystem uses off-chain relayers. They use them to pass Verifiable Action Approvals (VAAs) to the intended chain. This could be a point of centralization and potential vulnerability.
  • Governance and Upgrades: Guardian set controls decisions and upgrades to the Core Contract. It requires a supermajority to pass upgrades. This could lead to slower adaptation to new technologies or changes in the ecosystem.
Ideation Challenge: Product Ideas Using Wormhole

To fix the gaps in the Wormhole ecosystem, here are three new tool ideas. They could be for tools or multichain products that developers could make:

  • Decentralized Relayer Network (DRN): A Decentralized Relayer Network (DRN) could reduce the centralization risk of off-chain relayers. The network would have a decentralized group of nodes. They would receive incentives to relay VAAs. This would ensure no single point of failure and improve the protocol’s resilience.
  • Wormhole Integration Expansion Module (WIEM): WIEM is a tool that makes Wormhole’s integrations levels grow. It lets “verify only” networks join the Wormhole ecosystem. WIEM could offer a standard set of smart contracts and APIs. They would make it easier for these networks to upgrade their integration.
  • Wormhole Governance Accelerator (WGA): The design streamlines governance. It makes governance more agile and responsive to new tech. WGA could use both on-chain and off-chain methods to gather community input. These methods could also help to rank proposals. They could speed up voting by Guardians.

These ideas aim to improve Wormhole. They aim to boost its functionality, security, and governance responsiveness. If you have product ideas for multichain using Wormhole, you can apply for a Wormhole xGrant.

References:

A DEVELOPER’S INTRO TO WORMHOLE AND PRODUCT IDEAS was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.