SmDawudeen
2 min readJan 15, 2024

--

Polkadot’s XCM

Polkadot’s XCM is the communication standard enabling secure messaging among its native blockchains (parachains) and external networks via bridges, essential for Web3. This article introduces key terms associated with XCM.

XCM

Polkadot’s cross-consensus messaging format, functions as a standardized language for protocol developers. It allows them to define the data and origins for communication between chains. Serving as a universal language, XCM enables consensus systems like blockchains to interact across different transport protocols. Despite its generic and extensible nature, it’s important to clarify that XCM itself doesn’t transmit messages between consensus systems. This concept aligns with how REST operates as an architectural style for RESTful services.

XCVM
Is a state machine designed to customize the execution of XCM messages while maintaining a record of states in registers.
XCVM is designed to have the following properties:

Asynchronous: XCM allows senders to continue without waiting.

Absolute: XCM guarantees accurate, sequential, and timely message delivery.

Asymmetric: XCM messages lack automatic receipt confirmation; additional messages are required.

Agnostic: XCM is indifferent to the nature of consensus systems between messages.

Message
In XCM, a "message" is a program executable on XCVM, encompassing destination details, arbitrary data, assets, and XCM instructions. The execution of an XCM instruction on XCVM continues until completion or encountering an error, at which point it concludes and halts. This execution can potentially alter registers and/or the consensus system's state

Cross-Consensus Protocols
Polkadot implements two message-passing protocols for acting on XCM messages between parachains.

1. Vertical Message Passing (VMP) enables secure message transmission between the relay chain and a parachain. Messages are stored on the relay chain and interpreted based on XCM standards. VMP includes two variants: Upward Message Passing (UMP), which conveys messages from a parachain to the relay chain, and Downward Message Passing (DMP), facilitating messages from the relay chain to a parachain

2. XCMP (Cross-Consensus Message Passing) enables secure messages between parachains, with Direct XCMP being fast and scalable through a single relay chain transaction. In contrast, Relayed XCMP, passing data through the relay chain and VMP, is less scalable, particularly impacting parathreads with potential message reception issues due to excessive queue growth.

XCM has evolved through various versions:

Initial version: Basic messaging for inter-blockchain communication.
v1: Introduced new message contracts for enhanced flexibility.
v2: Added features like account checking and communication across incompatible blockchains.
v3: Enabled advanced functionality including bridges, cross-chain locking, exchanges, NFTs, conditionals, and context-tracking.

Conclusion

XCM significantly enhances communication among Polkadot chains, enabling seamless asset transfers without additional fees. Evolving through iterations, from basic messaging to advanced features like cross-chain locking and NFTs, XCM plays a dynamic role in the ecosystem’s interoperability.

--

--