Intro to Wormhole

In this section, we will delve into Wormhole and its inner workings, laying the foundation for a good understanding before we dive into Wormhole Gateway. We will uncover what Wormhole is, get an overview of how Wormhole handles message transfers, and gain insights into the role of Guardians.

Wormhole:

Wormhole is not a blockchain itself, it provides a means of communication between blockchains or rollups. To be specific, Wormhole is a generic message passing protocol that enables communication between blockchains.

Consider the following examples of potential applications that are now possible with Wormhole:

  • Cross-Chain Exchange

  • Cross-Chain Identity

  • Cross-Chain Governance

  • Cross-Chain Borrow Lending

Further, there are three core pillars that Wormhole enables for the blockchain world:

  • xAssets: Taking assets cross-chain which means a next-generation, chain and path agnostic wrapped token i.e., can move freely between chains.

  • xApps: Taking dApp cross-chain with least development effort.

  • xData: Shared and global reservoir of arbitrary data, enabling cross-chain data interaction.

With this basic introduction to Wormhole behind us, let's now turn our attention to some key components of Wormhole. These components will provide insights into how Wormhole handles the message transfers. To grasp how the message transfer works, let’s consider an entity trying to transfer assets from chain-A to chain-B as an illustrative example. Wormhole is comprised of several noteworthy components. Let's talk about the names of the major pieces and how they fit together.

wormhole chain

The components are classified in two parts:

  • On-Chain Components:

    • Wormhole Core Contract: Primary Contract, which fundamentally allow for cross-chain communication.

    • Emitter: A contract that calls the publish message method on the core contract and emits message that chain-A wants to transfer some assets to chain-B.

    • Transaction Log: The core contract will write an event to the Transaction Log with details about the emitter and sequence number to identify the message.

  • Off-Chain Components:

    • Guardians: A P2P network of 19 Validators, that observe the core contract and the transaction log, to validate and sign the messages emitted by the core contract on each connected chain to produce VAAs.

    • VAAs: The message is wrapped up in a structure called a VAA which combines the message with the guardian signatures to form a proof. Ultimately a smart contract on a chain-B must process the VAAs to receive a wormhole message.

    • Relayers: Relayers in the Wormhole context are off-chain processes that deliver VAAs to their destination (chain-B). They act as delivery mechanisms for VAAs without the capacity to tamper with the outcome.

For a more comprehensive understanding, delving into Guardians is highly recommended.

This basic overview of how Wormhole handles message transfers provides a good foundation to begin with the Gateway. However, delving deeper into Wormhole would offer a richer understanding that will ultimately, in turn, provide more valuable insights into the Gateway.