XCM (Polkadot) Cross-Consensus Integration
XCM is language for communication between blockchains in Polkadot ecosystem. Not transport protocol, but language: set of instructions describing what to do on remote chain. XCM message is program that receiving chain interprets and executes.
Different model vs EVM bridges: sovereign account — each parachain has account on each other, XCM can manage this. True interoperability, not just token transfer.
Polkadot Architecture
Relay chain (Polkadot, Kusama) — central coordinator. Provides shared security. Not for applications — only consensus and XCM routing.
Parachain — specialized blockchain connected via slot auction. Own logic via Substrate/FRAME.
XCMP — transport for XCM. Also VMP: UMP (Upward), DMP (Downward).
Sovereign account — each chain has deterministic address on each other. XCM manages these funds.
XCM Instruction Set (V3)
Main instructions: WithdrawAsset, BuyExecution, DepositAsset, TransferAsset, Transact, ReportHolding, SetErrorHandler.
Message is sequence of instructions on XCVM. Has registers: holding, origin, surplus weight.
Asset Registration
Before XCM can move asset, destination chain must know about it. Register MultiLocation mapping. Configure Asset Transactor in xcm-executor.
HRMP Channels
To transmit XCM between parachains need open HRMP channel. Bilateral: para A requests, para B accepts. Each operation is XCM to relay chain.
Teleport vs Reserve Transfer
Teleport: trusted, asset destroyed on source and created on destination. Between relay and Asset Hub.
Reserve Transfer: asset locked on reserve, derivative minted on destination. More universal for chains without mutual trust.
Testing
Chopsticks: fork real Polkadot/Kusama networks locally. Test XCM between forks without deploy.
XCM Emulator: xcm-emulator crate for Rust unit tests simulating multiple chains.
Rococo: public testnet relay chain for Polkadot.
Stack: Substrate + FRAME + xcm-executor, @polkadot/api + @paraspell/sdk for frontend, Chopsticks for testing.
Timelines: XCM integration in parachain (add cross-chain transfers, HRMP config) — 4-6 weeks. New parachain with full XCM support — 3-5 months.







