The Apex of Interoperability: Wormhole Messaging Protocol
Ever wondered what would happen to our modern world if there were no telephones, networks, or fiber optics? How would communication take place? In the medieval ages, when communication was necessary between kingdoms, pigeons or heralds were employed. This communication occurred between rulers of different realms, each with its own laws and rules (protocols). The messenger, be it a herald or a pigeon, had to adhere to the regulations of both kingdoms. Contrastingly, in today's advanced era, communication is faster and easier.
Nonetheless, challenges persist, such as applications being unable to communicate with each other. This limitation forces users to adhere to specific rules set by organizations, akin to rulers in the medieval ages. Imagine a similar situation in blockchain. Initially, there were very few platforms, and interoperability wasn't a crucial requirement. The notion behind interoperability is the fact that the size and number of chains is growing each cycle, we see app chains, we see different L1s popping up and then L2s, however there a core problem that presents itself, i.e. how does this chains communicate and interact with each other i.e. it ranges from transferring assets to unifying liquidity across multiple chains to build native cross-chain applications.
The more and more size and number of chains grow, the need for interoperability increases, this raises some major problems like liquidity fragmentation, market segmentation, poor user experience, limiting the project to just a particular blockchain ecosystem!!
This gave rise to Interoperability protocols, and we are going to focus on one such highly used protocol i.e. Wormhole and especially how the messaging protocol works.
Wormhole
As we enter 2024, Wormhole celebrates its 3rd anniversary since the October 2020 announcement. Initially conceived as a bidirectional and decentralized ERC ⇋ SPL token bridge connecting Ethereum and Solana, Wormhole has evolved beyond its original purpose.
In early 2022, Wormhole transformed into a generic cross-chain messaging protocol, introducing the Portal Bridge separately for asset bridging. This expansion enables Wormhole to transmit not only assets but also data and instructions, establishing itself as more than just a bridge, yet less than a Layer 1.
Wormhole operates as a robust platform facilitating communication among 30+ blockchains (supporting 6 runtimes). Over time, it has become integral for numerous projects and applications, empowering them to securely expand their user base, increase market share, and scale on-chain activity across the blockchain ecosystem.
Before delving into Wormhole, it's essential to clarify what Wormhole is not:
Wormhole is not a bridge: While some bridges, like Portal, Mayan, and Allbridge Core, are powered by Wormhole, the technology itself is not a bridge.
Wormhole is not a blockchain: Instead, it serves as a communication medium between blockchains and rollups. Additionally, Wormhole features an application-specific blockchain named Gateway, which will be explored in upcoming sections.
HOW Wormhole enables Cross-Chain Future:
Wormhole emphasizes not only user experience but also developer experience, aiming to simplify the creation of native cross-chain apps and eliminate potential roadblocks.
Security is a top priority for Wormhole, with a commitment to providing the highest level of protection for users, as discussed in detail later.
Beyond technical aspects, Wormhole embraces the web3 ethos by actively engaging with the community. This focus on community involvement aims to make the protocol more user-owned and contribute to further decentralization.
WHAT solutions Wormhole provides:
Wormhole Connect and Portal Bridge
Wormhole Messaging Protocol
Wormhole Gateway
Wormhole Queries
When it comes to interoperability, crypto natives often associate it with token transfers, a use-case that has gained considerable market fit today. Let's begin with Portal Bridge and Wormhole Connect.
Portal Bridge
Portal bridge is presently maintained and upgraded by xLabs, a Core Contributor at Wormhole. Through Portal a user can seamlessly transfer both fungible & non-fungible tokens across any chain supported by Wormhole.
When a user initiates a token transfer via Portal, the origin token is securely locked in a smart contract, and a new Portal (Wormhole) wrapped token is minted on the target chain. This wrapped token can then be easily exchanged for other or native tokens on the respective target chain. You can track the transactions at wormholescan.io.
Wormhole Connect
Developers can seamlessly enable cross-chain functionality with just three lines of code by integrating Wormhole Connect, a frontend-embeddable widget. This widget grants direct access to Wormhole-powered bridges within their applications, eliminating the need to navigate away to external services for asset transfers.
The widget offers gasless minting on the destination chain, coupled with an additional gas dropoff. This unique feature allows users to receive native tokens for covering gas fees, enabling them to initiate transactions promptly.
Additionally, the widget is customizable according to an application's brand guidelines through a user-friendly no-code customizer available at connect-in-style.
Circle’s CCTP x Wormhole
Furthermore, the integration of Circle’s CCTP with Wormhole Connect facilitates the transfer of Native USDC across the EVM network. Jupiter Exchange has also announced plans to leverage Circle’s CCTP and Wormhole to bring Native USDC to Solana.
Wormhole Messaging
Facilitating asset transfers between chains is crucial for ecosystem and project growth, allowing for capital accumulation and user scalability. However, simply moving assets isn't sufficient; a robust infrastructure is necessary to enable seamless communication across multiple chains, facilitating the transfer of data and even code instructions for full interoperability.
Interop is not a new concept; we're familiar with cloud servers and the SWIFT Network, where various service providers like AWS, Azure, and GCP need to communicate to provide an appropriate response to a user request. Similarly, SWIFT connects international banks for interoperability. Wormhole does this by providing a generic messaging protocol that enables communication among 30+ blockchains and 6 Runtimes. The primary goal is to delve into the workings of Wormhole messaging.
How Wormhole Messaging Works: Wormhole Messaging Protocol
With the basic understanding of Interoperability and what Wormhole provides to enable interoperability, let’s just focus on how the Wormhole enables interoperability by diving into the Wormhole messaging protocol. This protocol serves as the foundation upon which each Wormhole application and tool operates.
To gain a comprehensive understanding of Wormhole, it is crucial to examine two distinct sets of components and how they collaborate:
On-Chain Components: Components whose actions and data are recorded and verified directly on the blockchain.
Wormhole Core Contract
Emitter
Transaction Log
Off-Chain Components: These components involve activities or data occurring outside the blockchain while still interacting with it
Guardian
VAA
Relayer
Spy
API
Now, let's consider an instance where an entity or a DApp sends an asset or message from Chain A to Chain B.
What do Emitter, Core Contract and Transaction Log do:
The Wormhole Core Contract serves as the fundamental component enabling cross-chain communication. All interactions with cross-chain applications involve either direct engagement with the Core Contract or interaction with another contract that engages with the core contract.
When a user sends a message/transfers an asset from Chain-A to Chain-B, the Emitter (a contract) invokes the `publishMessage`
method on the Core Contract. Subsequently, the Core Contract writes an event in the Transaction Logs (blockchain specific logs). This event includes details such as the emitterAddress
, sequenceNumber
(a unique message identifier), and consistency_level
(Finality Assurance Level, ensuring txns won’t be undone).
In essence, the Core Contracts act as the mechanism for emitting all Wormhole messages.
What do Guardians, VAAs and Relayer do:
Who are the Guardians:
Guardians form their own peer-to-peer network and serve as validator oracles for Wormhole. They validate each message emitted by the Wormhole Core Contract and run full nodes (rather than light nodes), for every blockchain in the Wormhole network. This approach enables them to monitor the state on each connected blockchain and also provides a view of the entire state of DeFi.
The Guardian Network consists of the top 18 validator companies globally. These companies are among the largest and have been operating as staking (PoS) validators in the web3 space for a significant amount of time. This ensures that there is sufficient infrastructure capacity for full nodes on connected chains, making these validators trusted and incentive-aligned entities.
Returning to the step where a user sends a message from Chain-A to Chain-B, the Core Contract publishes the message in the transaction log. Now, a Guardian's role is to observe the Core Contract on each blockchain in the Wormhole Network and the transaction logs. This allows Guardians to observe messages, then validate, and sign these messages.
Each Guardian performs this step in isolation. When a supermajority of Guardians (⅔+ i.e. 12 out of 18) sign the same message, the message is considered valid. The resulting collection of independent observations by Guardians forms a multisig, which represents a proof that a state has been observed and agreed upon by a majority of the Guardian network. These multisigs are referred to as Verified Action Approvals (VAAs) in Wormhole.
VAAs
When the Guardians observe a message and majority of them separately sign a keccak256 hash of the message body, these signatures are taken along with the message and metadata to create something called a Verifiable Action Approval (VAA).
In simple terms, the message is wrapped up in a structure that combines it with the signatures from the guardians, forming a proof that the message is valid and verified, and we call this whole thing a VAA.
VAAs serve as signed attestations, verifying that the observed message from the wormhole core contract is valid. In essence, VAAs attest (provide proof) that 'this contract on this chain said this thing', with the signature of Guardians validating the authenticity of the statement.
In order to receive the Wormhole message, the smart contract on the receiving chain must process the VAAs, which makes them a key messaging component in Wormhole. On the target chain, a smart contract verifies the signatures and message format before approving any transaction.
Upon receiving a VAA on the target chain , the function (parseAndVerifyVAA(byte[] VAA)
) on the receiving end of the Wormhole Core Contract processes it. This function either provides the payload and associated metadata for the VAA or raises an exception. An exception is only triggered if the VAA fails signature verification, indicating that the VAA is invalid or inauthentic in some way.
Relayers
Relayers in Wormhole are the off-chain processes that deliver VAAs to their destination to initiate an action (for example, mint an xAsset at the destination, count a vote, update a price, or execute a cross-chain contract interaction). In essence, they simply act as delivery mechanisms for VAAs. They are fundamentally untrusted components within the network, as they don’t have capability to alter the VAAs without invalidating the signatures.
There are 3 primary types of relayers:
Client-side Relaying: A mechanism which depends on front ends like webpage or a wallet, to deliver the VAAs and execute the entire cross-chain process. Essentially, it involves manual steps to deliver the VAAs to a target chain, where there is no backend involved.
Relaying in such a manner is not recommended due to a poor user experience that involves manual steps. However, it proves useful for setting up MVPs, as it is cost-effective. Users only need to pay for the transaction fee, with no additional infrastructure costs involved.
Specialized Relayers - These are backend components that handle specific parts of the cross-chain process for particular applications, providing a smoother user experience. They can execute custom logic off-chain, reducing gas costs and enhancing cross-chain compatibility.
These Relayers could operate by directly listening to the Guardian Network (Spy Relaying) or by providing a REST endpoint to accept VAAs to be relayed (REST Relaying) using API (A REST server to retrieve details for a VAA or the guardian network.)
Spy is a daemon ( program ) that subscribes to messages published within the Guardian Network. These messages can be VAAs, Observations and Guardian Heartbeats ( a signal occurring at 15s intervals to indicate Guardian activity )
Essentially, specialized relaying enables gas optimization through off-chain computations. It allows for custom delivery strategies such as batching, conditional delivery, multi-chain deliveries, and more. Developers have the freedom to design custom logic for their applications, including incentive mechanisms. All of these features enhance the user experience, as users don't have to manually perform multiple steps to complete the cross-chain process.
Standard/Automatic Relayers - A component of the decentralized network in Wormhole facilitates the delivery of VAAs that are requested on-chain to destination contracts. This process incurs lower operational fees as there is no need to develop, host or maintain relayers. Additionally, integration is simplified (as simple as calling a function and implementing an interface). While these Relayers offer simplicity and convenience, they limit the customization and optimization compared to Specialized Relayers.
Gateway
Gateway is an application-specific blockchain powered by the Cosmos SDK, designed to primarily connect the Cosmos ecosystem with all the chains connected with Wormhole (~rest of the blockchain ecosystem). Additionally, Wormhole leverages new security and accounting features for Guardians, thanks to the Cosmos Stack.
Gateway facilitates both interchain messaging (Cosmos Chain ⇋ Cosmos Chain) and intrachain messaging (External Chain ⇋ Cosmos Chain). For interchain messaging, Gateway utilizes IBC light clients instead of running a full node on every Cosmos chain. The Guardian network operates a full node on Gateway and leverages IBC for seamless interchain transfers. This approach optimisms efficiency and enhances the overall security of the ecosystem.
In essence, Gateway extends the Wormhole network of chains to the Cosmos ecosystem and strengthens its security (security details will be discussed in upcoming sections).
To study further, it is recommended to visit: wormholegate.xyz
Wormhole Queries
Earlier, Wormhole only supported "Push" attestations. For example, to obtain information on Ethereum, a smart contract had to be written and deployed explicitly to Ethereum to read that information and then call an event (Wormhole Message) to request that information. This resulted in a lag time for completing a transaction, as well as the cost to execute that transaction on-chain.
For applications that may only require on-demand attestation of state changes from any chain, the additional complexity and cost of always publishing messages (events) is inefficient. Thus, a mechanism to "pull" for attestations was required.
Wormhole Queries, using the "pull" mechanism, add the ability for projects to submit a query request to the Guardian network and receive an attested response from the guardians. The guardians listen for these requests, submit them to the appropriate chain, receive the results from the chain, and publish them back to the gossip network. A separate REST server is being provided to accept off-chain query requests, submit them to the gossip network, correlate the responses, and return them to the request caller.
In essence, Wormhole Queries provide on-demand access to cross-chain real-time data with an 84% reduction in gas fees and less than 1s response time.
Some of the important use cases are cross-chain price feeds for on-chain activity and unified cross-chain digital identity.
Read more about cross-chain price feeds!!
Security and Governance
Wormhole strives to be as secure as possible, connecting everything while prioritizing ease of use. Security holds the top priority when it comes to interoperability. Here are some measures Wormhole has taken on the security front:
Wormhole is Open Sourced and thus it builds openly and transparently, allowing anyone to inspect the code.
Regular audits (15 public audits till date) and an active bug bounty program contribute to the robust security of Wormhole.
At its core, Wormhole is protected by a network of Guardians. They not only validate and sign messages but are also responsible for operating the Wormhole governance process. This involves decisions on which networks will be supported, which development features will be shipped into production, and other major strategic decisions that shape Wormhole's roadmap.
Each Guardian runs full nodes (instead of light nodes) of every blockchain in the Wormhole network. This ensures monitoring of the state on each connected blockchain. If a blockchain experiences a consensus attack or hard fork, it disconnects from the network, preventing the potential production of invalid signed VAAs.
A key element of Wormhole's defense strategy is that each Guardian is a highly competent validator company with its own in-house processes for running, monitoring, and securing blockchain operations. This heterogeneous approach to monitoring increases the likelihood of detecting fraudulent activity and reduces the number of single failure points in the system.
While Wormhole trusts Guardians to operate honestly, the question arises: how can we trust them? The short answer is that they have nothing to gain by being dishonest to the network. Each Guardian's business is deeply aligned with the chains they validate. If a Guardian misbehaves, the particular chain and Wormhole will suffer. Ultimately, the reputation and business of a Guardian will face a significant blow.
The future roadmap of Wormhole is to move towards zk bridging, i.e., sending zk-verified messages from one chain to another. Once deployed, the Guardian Network will become fully trustless.
Additionally, the Gateway blockchain of Wormhole helps Guardians strengthen the security of Wormhole:
Light clients have long been the desired security solution for bridging due to their ability to accurately verify blockchain data without the need to maintain a full copy of all data on each connected chain. By utilizing IBC for transporting Wormhole messages, Gateway harnesses the proven IBC protocol, reducing infrastructure overhead on the Guardian network. Instead of requiring a full node on every Cosmos SDK chain, the Guardian network can run a node on Gateway and utilize IBC for seamless interchain transfers. This approach optimizes efficiency and enhances the security of the entire ecosystem.
There are two more features that Wormhole has deployed with the help of the Gateway blockchain:
Global Accountant: Wormhole has its chain, Gateway, providing a ledger. Guardians share the state of each connected blockchain with Gateway. For instance, when someone sends a token from Ethereum to Solana, it is recorded on Gateway. The accounting mechanism ensures that what's on Gateway equals what's happening at the Solana bridge contract. If it's not 1:1, Guardians will immediately cut the connection with that particular chain to prevent malicious activities.
Governor: The Governor plays a pivotal role in monitoring the inflows and outflows of all connected blockchains. It helps identify and delay suspicious transfers that might indicate an exploit or malicious activity.
Additionally, the Uniswap Bridge Assessment Committee approved Wormhole for the DAO’s governance use-case for all cross-chain deployments. The committee also stated that, "the implementation of the protocol and its operational practices appear to have been well-considered. The internal design of the components appears to be well-thought-out and in accordance with best practices."
Use-Cases & Case Studies
There are numerous use cases for Wormhole Messaging that facilitate interoperability. However, let's dive into some specific instances of native cross-chain applications.
PikeFinance
PikeFinance envisions itself as a universal liquidity layer, facilitating seamless movement and accessibility of native assets across different blockchain ecosystems. This is achieved through the integration of Wormhole's Cross-Chain Data Messaging and Circle's Cross-Chain Transfer Protocol (CCTP), highlighting its commitment to interoperability and the ability to interact with assets on multiple blockchain networks.
The platform's core functionality appears to revolve around lending and borrowing activities, implying that users can engage in these financial activities across different blockchains, thanks to PikeFinance's cross-chain capabilities. This not only enhances liquidity but also provides users with more flexibility in managing their assets across various blockchain environments.
Currently, they are active on Testnet and one can try it from here:- PikeFinance
tBTC
Background: On May 11th, 2023, tBTC, a decentralized, permissionless, and scalable Bitcoin equivalent, announced a strategic collaboration with Wormhole, an interoperability protocol. The goal of this partnership was to unlock 20+ new ecosystems for tBTC, enabling the bridging of up to 26,000 BTC (equivalent to approximately USD$750 million) throughout the decentralized finance (DeFi) space.
Objective: Wormhole proposed the integration to the Threshold community in mid-April, with the aim of establishing tBTC as the dominant BTC proxy in on-chain DeFi. The primary objective was to facilitate the seamless transfer of tBTC across different blockchain ecosystems, including both Ethereum Virtual Machine (EVM) chains and non-EVM chains.
Key Components of the Collaboration:
Community Support and Approval:
Wormhole's integration proposal received strong support from the Threshold community, emphasizing the significance of the initiative.
The proposal was fully approved on April 29th, showcasing the collaborative nature of the decentralized ecosystem.
Technical Integration:
The collaboration allows tBTC to be transferred to both EVM chains (Arbitrum, Optimism, Polygon) and non-EVM chains (Solana, Aptos, Sui, Cosmos), expanding its reach across diverse blockchain networks.
A new method for bridging ERC-20 tokens was introduced, ensuring efficient deployment of capital to Ethereum sidechains without liquidity fragmentation.
Risk Mitigation and Liquidity Strategy:
Instead of creating wrapped tokens for each chain, tBTC is minted on Ethereum, maintaining the supply integrity.
A canonical token native to each ecosystem is deployed, minimizing centralization risk and containing risk within local ecosystems.
Cross-Chain Liquidity Bootstrapping:
The collaboration involves the Threshold DAO launching a cross-chain liquidity bootstrapping operation, with the potential to attract up to 26,000 BTC in deposits.
Experienced liquidity providers are incentivized to seed tBTC liquidity in crucial ecosystems, gaining the option to purchase Threshold's $T tokens.
Results and Future Outlook:
The collaboration positions tBTC as a versatile Bitcoin equivalent across various DeFi ecosystems.
Wormhole's messaging protocol enhances tBTC's reach, enabling developers and users on over 20 blockchain networks to engage with the tBTC ecosystem.
The initiative is expected to set industry standards for trustless Bitcoin adoption in on-chain DeFi, with the potential for tBTC to become a universal standard.
To learn more one can check the tweet :
Also, explore the Wormhole ecosystem and discover whether your favorite project is cross-chain enabled.
State of Wormhole
Now, having explored how Wormhole contributes to interoperability in the blockchain ecosystem, let's delve into some statistics to gauge Wormhole's current trajectory.
As of January 2024, Wormhole is going to mark 1 Billion cross-chain messages and $1B TVL very soon, with 200+ Applications in the Wormhole Ecosystem. Currently, Wormhole supports 30+ blockchains and has transferred $35B+ of assets.
Community and Support
Building native cross-chain applications is a new and somewhat challenging process; however, Wormhole boasts a vast community and supports initiatives such as xGrants, the ongoing Wormhole Accelerator Program, and the Cross-Chain Ecosystem Fund.
The Wormhole community is continuously growing, and Wormhole has also begun focusing on regional communities like Wormhole China and Wormhole India. The global Discord community of Wormhole is 240k strong and expanding.
The subcommunities of Wormhole make it even stronger, such as Madlads’ Community, Monad’s Community, SuperteamDAO, and many more.
If you are new to the Wormhole, here is a quick action step for you: join the Wormhole Discord and become a part of Wormhole’s Global Community. Also, head over to your regional Wormhole Community and drop a "GM!!"
Wormhole X (prev. Twitter) | Wormhole Wassie | Wormhole Global Community
Wormhole China | Wormhole India | Wormhole India Telegram
Conclusion
That was all about Wormhole, where the main focus was on the messaging process of Wormhole and its role in enhancing the blockchain ecosystem by facilitating full interoperability. Through recent integrations and a notable growth trajectory, it's clearly visible that Wormhole is emerging as a leader in interoperability. It provides cross-chain infrastructure for developers to a platform (portal) to bridge assets for everyday crypto users.
The future prospects of both Web3 and Wormhole hinge on the swiftness with which developers opt for building cross-chain applications in the first place, rather than developing applications and then considering cross-chain functionality, the emphasis should be on embracing cross-chain as a foundational aspect. Potential concerns related to security and developer experience may exist, but these challenges will likely be addressed by the developer community, as is customary in the evolution of any technology.
In conclusion, Wormhole's trajectory suggests it is positioned to play a crucial role in the interoperability landscape. The success of Web3 and Wormhole will be shaped by the proactive adoption of cross-chain development practices, with the community addressing challenges that may exist and arise in future, ensuring a dynamic and resilient future for web3.
That’s all folks!! 🙌