XCM v3: Breaking New Ground for Web3 Interoperability

An exploration of Polkadot’s cross-consensus communication format and the latest features of XCM v3.

An exploration of Polkadot’s cross-consensus communication format and the latest features of XCM v3.

XCM is Polkadot’s standard for cross-chain and cross-consensus communication.

It’s a messaging format used to exchange arbitrary data between chains, and is effectively a language used by developers to compose applications that span different blockchains, smart contract platforms, and Substrate pallets.

In less than a year, XCM has transformed the Polkadot network into an ecosystem of dynamic, interconnected projects that can collaborate with each other while benefiting from Polkadot’s shared security umbrella.

And because it is cross-consensus, XCM can be used not just within the security umbrella of the Polkadot Relay Chain and its attached parachains, but also over bridges to external networks like Kusama (Polkadot's canary network) and Ethereum. It even connects different smart contract systems. For example, a smart contract built on an Ethereum EVM platform can communicate with a smart contract on a WebAssembly-based (Wasm) platform using Polkadot’s native ink! smart contract language.

Parachains across the Polkadot ecosystem have adopted XCM for a range of cross-chain use cases, opening over 100 channels and sending an impressive 10,000 messages in the first month that XCM went live. To date, over half a million XCM messages have been sent on Polkadot and Kusama combined.

With the release of XCM v3, XCM’s latest version, several important new features will be unlocked, including bridging to external networks, NFT exchanges, improved programmability, and more.

What is XCM and why does Web3 need it?

XCM stands for cross-consensus messaging. It's a format that defines what kind of data is transferred during communications between chains, and how they should be interpreted.

It aims to be a language communicating ideas between different consensus systems, and can involve both fee-free and gas-metered smart contract platforms. By cross-consensus, we mean that XCM is a generic, universal language that makes no assumptions about a particular consensus system, and thus can be used between any participating blockchain, smart contract system, runtime pallet, etc. XCM is extensible, future-proof, and highly efficient.

A crucial innovation for Web3, XCM ends the era of siloed networks, a limitation of previous-generation technology that made blockchain impractical or insufficient for many use cases. The siloed nature of previous networks was a significant barrier to user adoption and retention, and a major limitation for product development, leading to increased time to market and missed opportunities for innovation.

Without the crucial interoperability brought by XCM, the decision of which network to deploy a project on represented a serious risk, locking businesses into platforms where they can lose out on opportunities to partner with other businesses and integrate innovative technologies on other platforms.

Not only does XCM unlock cross-chain exchange of data and assets, it also enables powerful cross-chain integrations. Similar to how applications in Web2 could integrate services developed by others, thereby reducing development and maintenance overhead and increasing time to market, XCM enables applications across the Polkadot ecosystem and beyond to tap into Web3 services on blockchains that are optimized for specific use cases.

XCM used between chains and dapps built on Polkadot also enables secure, trustless interoperability on a level that has not been previously possible. With previous-generation cross-chain technology on other networks, assets were left vulnerable to hacks and double spending through centralized, insecure bridges, with losses topping $2.5 billion in 2022 alone.

What does XCM enable?

Because XCM allows blockchains to communicate with each other, it also enables businesses and developers on different chains to collaborate on projects, build applications that span several chains, or even create multichain DAOs (decentralized autonomous organizations).

For example, a decentralized application (or dapp) built on one chain could integrate an asset from another chain.

XCM can also provide a method for various token transfer models, including:

  • Remote Transfers: controlling an account on a remote chain, such that chain A has an address on chain B for receiving funds and to eventually transfer those funds it controls into other accounts on chain B
  • Teleporting: moving an asset, such as an NFT, by destroying it on one chain and creating a clone on the other chain.

XCM transport protocols: HRMP, XCMP, & VMP

While XCM is a format and a language for programming cross-chain applications, it is not a messaging protocol. XCM relies on transport protocols like HRMP, XCMP and VMP to exchange XCM messages from one system to another, plus external Bridges.

HRMP (Horizontal Relay-routed Message Passing), also known as XCMP-lite, is the first live iteration of cross-parachain messaging within the Polkadot network.

HRMP comes with all the functionality of XCMP, but is more demanding on resources because it passes all messages via the Relay Chain. HRMP will be deprecated when the full XCMP is released.

XCMP (Cross-Chain Message Passing) allows cross-chain transactions to be resolved using a simple queuing mechanism. It is the task of the Relay Chain validators to move transactions on the output queue of one parachain into the input queue of the destination parachain. The associated metadata is stored as a hash in the Relay Chain storage.

Full XCMP is an in-development upgrade from HRMP/XCMP-lite, making the process more scalable and eliminating the requirement for a governance process to open channels between individual chains.

VMP (Vertical Message Passing) comes into play when the Relay Chain itself is involved either as a sender or recipient. It allows parachains to be either the sender or recipient of a message in which the other party is the Relay Chain.

Bridges: While XCM is typically considered from the standpoint of parachains and their own intercommunications, the technology also allows for transportation beyond the Polkadot ecosystem, hence bringing into play its cross-consensus capabilities.

XCM v3

With XCM v3, XCM is well on the way to realizing its full potential, with several key advancements over v2, released in 2022.

Key among the latest upgrades is the ability to use XCM over bridges to external ecosystems. This will include but is not limited to bridges currently in development for connecting Polkadot and its parachains to the Kusama and Ethereum networks.

This even enables multi-hop setups where XCM messages can travel over multiple bridges in a single operation thanks to the addition of a new junction, GlobalConsensus, that allows destinations to be specified across virtually any blockchain ecosystem.

XCM v3 also enables further asset exchanges, and in particular cross-chain NFT functionality, and improved programmability features, including expectations, conditionals, contest tracking, and branching, so XCM messages can be programmed to behave in different ways on destination chains. For example, a message can be programmed to carry out different operations in response to an error message or return a confirmation that some activity took place on the destination chain.

Another key programmability feature included with XCM v3 is remote locking, which allows one chain to request that an asset be locked on another chain. This is a crucial interoperability feature enabling blockchains to make use of assets that exist on other chains.

XCM v3 also sets the stage for multichain decomposition, the process of moving key Polkadot functionality out of the Relay Chain and into system parachains instead. Rather than performing key functions, the Relay Chain is intended to simply relay messages. Staking can, for example, be requested on one parablock chain and carried out on another optimized parablock chain, saving bandwidth and preventing other operations from being clogged.

Unlocking the true multichain future

With XCM reaching full functionality, the multichain future outlined in the original vision for Polkadot can truly begin.

For builders, XCM represents a major leap forward in product development, giving teams the competitive advantage over siloed services and increasing time to market by eliminating the need to reinvent the wheel for every new piece of functionality a project needs to integrate. Web3 services can now be built in a more agile, modular way by tapping into powerful cross-chain integrations. This enables builders to stay on top of the innovation curve with faster product iteration cycles and decreased maintenance overhead. Thanks to XCM, businesses can also mitigate the risk of choosing a Web3 platform that doesn’t embrace native interoperability, helping them avoid the pitfalls of platform lock-in.

For Web3 users, XCM will lead to improved user experience by eliminating the boundaries between networks, ensuring that their self-sovereign data and assets can be used to access services no matter which blockchain they exist on. Ultimately, XCM enables unmatched security for an interoperable Web3, avoiding the ‘weakest link’ problem presented by previous-generation interoperability technologies.

Is your project ready to take advantage of the next wave of interoperable Web3 innovation? Read more about the technical details of XCM on the Polkadot Wiki.

Interested in developing for or building on Polkadot? Get in touch for hands-on support.

From the blog

Uplifting new voices and validators: Polkadot's path to sustainable decentralization

Decentralized Nodes and Decentralized Voices programs by the Web3 Foundation offer pathways for validators and governance participants to gain influence based on merit, helping to build a fairer, more resilient Polkadot ecosystem that aligns with the core principles of web3.

Is large-scale, high-quality Web3 education possible?

The Polkadot Blockchain Academy (PBA) is taking Web3 education to the next level with PBA-X, an online course crafted to deliver high-quality blockchain knowledge at scale. Learn how we’re preserving educational standards, fostering a global community, and creating new opportunities for learners everywhere.

Blockchain explained: A practical guide from concepts to use cases

Blockchain has grown far beyond its roots in cryptocurrency, reshaping industries from finance to healthcare. This guide walks you through the basics, benefits, and groundbreaking potential of blockchain and its impact on the future of the open internet.

Empowering the next wave of founders: Welcome to EasyA x Polkadot University

Unlock a structured path to start building on Polkadot with EasyA x Polkadot University.

Dynamic & Modular: Scaling Ambition with Agile Coretime

Polkadot’s Agile Coretime simplifies launching and scaling blockchain projects with dynamic blockspace allocation and flexible cost options. Learn how Agile Coretime makes it easier to build, launch, and scale ambitious Web3 projects.

How play-to-earn (P2E) is transforming onchain mobile sports gaming

Play-to-earn games are transforming mobile sports gaming. Learn how blockchain, NFTs, and platforms like Polkadot create new opportunities for digital asset ownership and cross-chain gameplay.

Polkadot Token 2049 and Decoded Asia 2024: A multichain ecosystem in action

At Token 2049 and Decoded Asia 2024 in Singapore, Polkadot teams and contributors showcased a multichain future for real-world applications. Key moments included Dr. Gavin Wood’s vision for digital individuality, Chrissy Hill’s regulatory insights, and announcements from emerging projects shaping the Web3 ecosystem.

What is a crypto wallet? Your all-access pass to the future web

In Web3, your wallet is your most valuable digital tool. It’s more than just a place to store, send, and receive cryptocurrencies securely—it’s your passport to the decentralized world.

July 2024: Key network metrics and insights

Welcome to your go-to source for the latest tech updates, key metrics, and discussions within Polkadot, brought to you by the Parity Success Team. This blog series covers a variety of topics, drawing insights from GitHub, project teams, and the Polkadot Forum.

Polkadot 2.0: The rebirth of a network

Polkadot 2.0 reimagines blockchain with a bold rebrand and powerful features: Agile Coretime, Async Backing, and Elastic Scaling. Step into a more flexible, faster, and scalable network. Learn about the improvements and changes that led to this next era of Polkadot.

Meet the Decentralized Futures grant recipients: transforming ideas into impact on Polkadot

The Decentralized Mic is here to spotlight the innovative projects and teams driving Polkadot’s growth. Join us as we explore the achievements of Decentralized Futures grant recipients and their contributions to the Polkadot ecosystem on the new ecosystem community call series.

The ultimate 2024 Polkadot grants and funding guide

Explore Polkadot ecosystem funding: grants, venture capital, bounties, and community initiatives. Discover opportunities for blockchain builders today.