About
About NFT XCM
The NFT XCM project aims to enable seamless cross-chain interoperability for NFTs within the Polkadot ecosystem. By leveraging XCM (Cross-Consensus Messaging), the project opens new possibilities for NFTs, ensuring they are no longer confined to a single blockchain.
Milestone 1: Research and Proof of Concept
Milestone 1 focused on foundational research and a proof of concept for cross-chain NFT transfers. It addressed challenges such as data models, fee estimation, and asset recovery. The POC successfully demonstrated ID-based NFT transfers using XCM v3 between Acala and Unique networks. This milestone validated the proposed approach and set the stage for further interoperability advancements.
Read more in our blog: Unique Network Cross-Chain NFT Proof of Concept
Milestone 2: Integration Tools
The simple-xcm library significantly enhances the developer experience for cross-chain NFT transfers, offering streamlined implementation and advanced features like gas estimation. These tools improve reliability and foster interoperability across the Polkadot ecosystem.
Milestone 3: New Asset Transactor integrations
Building on previous work, Milestone 3 focused on expanding asset transactor support across different environments within the Polkadot ecosystem.
- AssetHub Integration: We developed asset transactors for AssetHub, enabling seamless NFT transfers on Polkadot's primary asset parachain.
- Moonbeam Integration: Integration was successfully implemented for Moonbeam, bringing cross-chain NFT functionality to one of the most widely used EVM-compatible parachains in the ecosystem.
Milestone 4: XCM Asset Metadata Operations RFC
Milestone 4 resulted in the approved XCM Asset Metadata RFC (0125), which defines a standardized metadata format and new XCM instructions for asset metadata operations across chains.
- Metadata Standardization: Introduced a key-value pair format for asset metadata, ensuring universal interoperability.
- New XCM Instructions: ReportMetadata, ModifyMetadata
- Enhanced Cross-Chain NFT & Asset Interoperability: Enables metadata retention and modification across different chains.
- XCM Executor Enhancements: Identified updates needed for Parity's XCM executor, allowing seamless metadata operations.
This milestone removes a key limitation in cross-chain asset transfers, unlocking new dApp and wallet use cases and paving the way for decentralized metadata management across Polkadot.
Simplifying Cross-Chain Transfers
Cross-chain transfers are inherently complex, and NFTs introduce additional challenges due to their unique metadata and varying standards. The simple-xcm library is a universal solution for handling all asset types, including NFTs. It provides the Registry, an abstraction that simplifies managing chain, currency, and location data.
For production environments, the Registry can preload Polkadot ecosystem chains:
const registry = new Registry().addEcosystemChains('Polkadot');
For local or custom networks (such as those used in this demo), the Registry allows manual configuration.
Estimating Fees and Selecting Fee Assets
Accurate fee estimation is essential for cross-chain transfers to avoid failures or inefficiencies. The simple-xcm library simplifies this process with tools for calculating fees and weights and querying available fee assets before transactions.
A key breakthrough in this area is the implementation of XcmPaymentApi, developed as part of our work (PR #3607). This, combined with Parity's DryRunApi, has enabled the first-ever automatic fee calculation for XCM operations across all chains involved in an XCM message path.
Previously, this was impossible—chains simply lacked the ability to communicate fee estimates to clients. Now, with this capability in place, chains can implement it on their end, and our JS library can interact seamlessly with any chain that supports it. While the estimation might currently overestimate in some cases, there are clear paths for optimization. This marks a significant step forward in making XCM transactions more predictable and reliable.
Sanitizing Asset Transfers
To ensure smooth cross-chain transfers, assets must adhere to the XCM protocol's specific configurations. The simple-xcm library includes tools to sanitize asset transfers, automatically correcting unbalanced or invalid configurations. This guarantees that assets are properly formatted, reducing errors and improving transaction reliability.
See the sanitize example for more details.