The Internet of Blockchain was born to solve the problem of seamless interaction between blockchains. And Polkadot is one of the Internet of Blockchain platforms that the market is very interested in. For Parachains on Polkadot to interact with each other, a bridge or technology stack is needed to do so.
With Polkadot, the project has developed a technology stack inside Polkadot called XCM, which enables unlimited interoperability of Parachains mounted on Polkadot. And this is also considered the technology for Polkadot to compete with Cosmos.
So what is XCM? Does XCM have any different technology than IBC, the bridge protocol between Zones on Cosmos? Let’s find out details in this article!
To understand more about XCM, you can read the following articles:
- What Are Relaychain, Parachain & Parathread? Overview of the 3 Main Components That Make Up Polkadot
- What is Internet of Blockchain? Advantages and Disadvantages of Internet of Blockchain
- What is Cosmos (ATOM)? Cosmos Cryptocurrency Overview
What is XCM?
Cross-Consensus Messaging format is abbreviated as XCM, XCM is a “cross-consensus” messaging format, instead of just “cross-chain”. This difference is that the goals of the format are designed to convey the kinds of ideas that are sent not only between chains, but also smart contracts and pallets, as well as across bridges and regions. fragmented like Polkadot’s Spree.
XCM is a messaging format, not a messaging protocol. It cannot be used to actually send any messages between systems or utilities but it only expresses what should be done by the recipient. It is important to understand its boundaries and its place in the Polkadot technology stack.
XCM aims to be the language for communicating ideas between consensus systems. It must be general enough for it to be useful throughout the growing ecosystem. Since scalability inevitably involves change, it must also be future-proof and forward-compatible. Finally, it must be efficient enough to run on-chain.
Structure Of XCM
Excluding bridges and contract pallets, Polkadot comes with three separate systems to actually pass XCM messages between its constituent chains: UMP, DMP, and XCMP. UMP allows parachains to send messages to their relay chain. DMP allows relay chains to pass messages down to one of their lower chains. XCMP, is probably the best known of them all, and this allows parachains to send messages between themselves. XCM can be used to express the meaning of messages across each of these three communication channels.
The core of the XCM format is XCVM, which stands for Cross-Consensus Virtual Machine. It is an extremely high-level incomplete virtual machine whose instructions are designed to be at the same level as transactions.
A message in XCM is essentially just a program running on XCVM. It is one or more XCM instructions. The program executes until it reaches the end or encounters an error, at which point it terminates and pauses.
XCVM includes a number of registers, as well as access to the overall state of the consensus system hosting it. Instructions can change the registry, they can change the state of the consensus system, or both.
XCM’s Operating Mechanism
Sending an asset to another chain is probably the most common use case for cross-chain messaging. Allowing one chain to manage another chain’s native assets enables all kinds of derivatives use cases, the simplest being decentralized exchanges but often grouped together as decentralized finance or DeFi .
In general, there are two ways for assets to move between chains, and this depends on whether the chains trust each other’s security and logic.
- Teleporting: When two chains have the same security level, identical shards under the same security umbrella, and overall consensus, Teleporting can be applied. This method specifically burns the assets on the first chain and then transmits the message to the destination chain to Mint the original amount of assets.
- Reserves: This method is often applied to chains with different security levels and they do not trust each other. Specifically, the assets are burned in the first chain and Mint is in the 3rd chain (which is the trusted root chain), then the original chain will transfer the assets to the destination chain.
Why Not Use Native Message Format?
Message format gateways, on-chain native transactions, or smart contracts can be useful in certain scenarios, but there are some major drawbacks that make it less useful for XCM’s goals. First, there is a lack of cross-thread compatibility, so a system intended to send messages to multiple destinations will need to understand how to construct a message for each destination. On that note, even a single destination can change its original message, transaction format over time. Smart contracts can be upgraded, blockchains can introduce new features or change existing features and in doing so change their transaction format.
Second, common on-chain use cases do not easily fit into a single transaction. Special tricks may be required to withdraw funds, exchange them and then send the results all in one transaction. Onward relay messages, necessary for a consistent reserve asset framework, do not exist in chains that are unknown to others.
Third, operations such as fee payments do not easily fit into a model that assumes fee payments are negotiated as smart contract messages. Meanwhile, transactions provide some system for processing payments, but are also often designed to contain signatures, which makes no sense when communicating between consensus systems.
Some Application Cases of XCM
While the goal of XCM is to be generic, flexible, and future-proof, there are, of course, practical needs it must address, especially cross-chain token transfers. The payment of options fees (possibly using those tokens) is another interface, as well as a common interface for implementing an exchange service, that is common throughout the DeFi world. Finally, it is possible to use the XCM language to perform some platform-specific actions. For example, in a Substrate chain, a remote call can be sent to one of its pallets to access an appropriate feature.
- Remote Transfer: Allows the local chain to have an address on the remote chain to receive funds and ultimately transfer those funds it controls to other accounts on that remote chain. The process of moving assets only takes place on one chain.
- Teleport: A token like USDT or USDC, has versions that are all perfectly fungible on several different chains. It is possible to burn such tokens on one chain and mint the corresponding token on another supported chain.
- Reserve-Based Transfer: There may be two threads that want to specify a third thread, a content thread that can be considered native, to be used as a reserve for that content. The derivative form of assets on each of those chains will be fully supported, allowing the exchange of derivative assets with underlying assets on the reserve chain that supports it. This could be the case where two chains do not necessarily trust each other, but are willing to trust the parent chain.
In addition to sending messages between chains, XCM is also useful in other contexts, for dealing with a chain whose transaction format you don’t necessarily know in advance. With chains with little-changing business logic (e.g., Bitcoin), the transaction format or the format used by the wallet to send instructions to the chain tends to stay completely the same or at least compatible indefinitely .
With highly scalable metaprotocol-based chains like Polkadot and its constituent chains, business logic can be upgraded across the network with a single transaction. This can change everything, including transaction formats, causing potential problems for wallet maintainers, especially for wallets that are required to be kept offline.
The Importance of XCM to Polkadot
XCM (Cross-Chain Message) is an important part of Polkadot because it allows large volumes of data and assets on many different blockchains to be communicated and exchanged easily, quickly and reliably. trust.
XCM allows transactions to be performed between different blockchains on Polkadot automatically and securely, helping to facilitate the development and integration of applications and protocols on the Polkadot platform. It also enables connectivity with other blockchains such as Bitcoin and Ethereum, playing a key role in building a comprehensive and decentralized blockchain ecosystem.
Advantages and Disadvantages of XCM
Advantage
- Ability to communicate between blockchains: XCM allows different blockchains on Polkadot to communicate and exchange data and assets easily with each other.
- Speed and availability: With XCM, transactions between different blockchains can be performed quickly and securely. This enables increased usability and availability of applications and protocols on Polkadot.
- Potential for integration with many other blockchains: XCM is extensible, allowing integration with many different blockchains outside of Polkadot. This creates the potential for extensive cross-chain connections in the future.
- Guaranteed security and algorithms of Polkadot: Transactions between blockchains on Polkadot are guaranteed by Polkadot’s unique and secure algorithms. This ensures a high level of security and reliability of transactions.
Defect
- Limited compatibility: Different blockchains may not be fully compatible with each other, so improvements will need to be made to improve compatibility in the future.
- Integration complexity: Integrating different blockchains into Polkadot via XCM can be quite complex and requires blockchain expertise.
- Systemic risk management: Since XCM allows communication between different blockchains, there may also be some systemic risks such as security incidents or transaction duplication, which require regulatory measures risks to ensure the safety and reliability of the system.
Comparing Polkadot’s XCM With Cosmos’s IBC
Feature |
XCM (Polkadot) |
IBC (Cosmos) |
---|---|---|
Ability to communicate between blockchains |
Have |
Have |
Communication speed between blockchains |
Fast |
Fast |
Possibility |
High |
High |
Potential for integration with multiple blockchains |
Have |
Have |
Ability of extension |
Have |
Limit |
Compatibility between blockchains |
Needs improvement |
Good |
Integration complexity |
Need expertise in blockchain |
Need expertise in blockchain |
System risk management |
Measures are needed to ensure safety and reliability |
Measures are needed to ensure safety and reliability |
In short, both Polkadot’s XCM and Cosmos’ IBC enable different blockchains to communicate and exchange data and assets easily. However, XCM seems to have higher expansion potential than IBC. Both require systemic risk management and need blockchain expertise to integrate different blockchains.
Personal Projections About XCM
XCM is the core of the Internet of Blockchain on Polkadot, helping to eliminate barriers between blockchains. With the new technology being a stack in Polkadot and having high complexity, XCM carries many expectations from the development team and users.
If what the project mentioned is true, XCM can help Polkadot surpass Cosmos. But in terms of building and attracting projects, perhaps Polkadot is weaker when Cosmos has a quite complete SDK set, easy to use and tweak arbitrarily. The most special point is that Cosmos allows Layer 1 to use Your own Token to pay fees and development projects in the Cosmos ecosystem are separate and not affected by each other.
But anyway, Polkadot and Cosmos are also the two Internet of Blockchain platforms worth waiting for in the upcoming cycle. And everything is not really clear, it is still possible to change the position and technology in the next road.
Summary
XCM is a very important part of Polkadot, but because of its high technology and complexity, it still does not really work stably and optimally. So for Polkadot to develop, it is necessary to complete XCM now and then develop other satellites.
So I have clarified what XCM is? This is one of the parts of knowledge that is very difficult to understand, so I hope my article helps you understand all the knowledge in the easiest way and remember it the longest!