The UX of Interoperability: XCMP vs IBC
A research collaboration project between DTMB and Franklin Dao, Eric Chen, Researcher @ FranklinDAO, @ChenOutOfChen on Twitter
Introduction
With the number of chains in the world, it’s become unavoidable that the future of Web3 is multi-chain. With this future on the horizon, the issue of interoperability has become more and more relevant. Many solutions have been floating around, such as Axelar bridges, Optics, and ecosystems like Polkadot and Cosmos. If we have anything to learn from the Web2 internet, it’s that in order to scale there is only room for one dominant communication protocol. For Web2, this was TCP/IP, but it’s still unclear who will be the go-to protocol for the Web3 internet.
In this paper, I will be looking at the two most promising interoperability protocols – Polkadot’s Cross-Chain Message Passing (XCMP) and Cosmos’s Inter-Blockchain Communication (IBC). More specifically, I will be looking at this comparison through the lens of a consumer, focusing on user interface and user experience.
Definitions
XCMP: Cross-Chain Message Passing is Polkadot’s protocol for interchain communication. XCMP should not be confused with XCM, which is the message format for interchain communication that XCMP uses. XCM is theoretically usable by any blockchain project, even outside of the Polkadot ecosystem.
IBC: Inter-Blockchain Communication is Cosmos’s protocol for interchain communication, which is the equivalent of XCM and XCMP working together.
User Interfaces
In the world of dApps, the interoperability between various blockchain networks is vital for their success and widespread adoption. Additionally, the success of many applications in both Web2 and Web3 can be attributed to well-designed user interfaces and superior user experiences compared to their competitors. As a result, future mass adoption of either XCMP or IBC will be significantly influenced by end users’ experiences when using dApps that implement XCMP or IBC, not just technical capabilities.
“Good user experience is not about the average case, it is about the worst case.”
- Vitalik Buterin
XCMP, in the context of Polkadot, provides a means for parachains to communicate and interact with one another. This protocol facilitates the sharing of data, assets, and functionality among the parachains connected to the Polkadot relay chain and network. The integration of XCMP is native to Polkadot, allowing it to ensure a more streamlined development experience and optimized performance.
User interface implications for dApps built on Polkadot parachains using XCMP involve a seamless and consistent experience for end-users. Since XCMP is native to the Polkadot ecosystem, dApps can leverage its unique features and optimized communication without encountering compatibility issues. Users can expect a smooth interaction between dApps built on different parachains as they all follow the same underlying protocol for cross-chain communication.
IBC, utilized by Cosmos chains, is designed to be a more general-purpose protocol that enables the communication between various blockchain networks, even those with different consensus mechanisms or token economies. IBC's universal approach allows it to bridge communication gaps and promote interoperability between otherwise incompatible blockchain networks.
When it comes to user interface implications for dApps built on Cosmos chains, the use of IBC may introduce complexities in the user experience. Since IBC enables communication between various blockchain networks with different protocols and consensus mechanisms, dApp developers must account for these differences when designing their user interfaces. End-users may need to familiarize themselves with different wallet systems, token standards, and transaction processes specific to each connected blockchain network.
The Future of XCMP
It is important to note that IBC is currently live and connecting different Cosmos zones, but XCMP is still in development. Polkadot currently leverages a message-passing protocol called HRMP (Horizontal Message Passing), which is less scalable and performant due to the fact that it stores whole messages on the relay chain. XCMP will be peer-to-peer (or more accurately parachain-to-parachain) which will increase throughput and TPS by around a factor of 2. HRMP scales O(n2) with the number of parachains while XCMP scales O(n).
Figure: Point-to-Point will be XCMP’s model, compared to HRMP’s hub and spoke model
When asked how the transition from HRMP to XCMP will affect end-users, Kevin Neilson, a developer at Moonbeam (a Polkadot parachain), said that there will be no noticeable difference other than higher throughput since it will be abstracted away from users in the backend. Right now the relay chain handles block validation, new parachains, and cross-chain messaging, so XCMP will reduce its bloat by removing cross-chain message traffic. Moreover, XCMP’s release will enable cross-communication between more chains behind the scenes.
After talking to engineers at Web3 Foundation, their best estimate for XCMP’s release is sometime in early to mid-2024. The reason for this extended timeline is that XCMP is currently a secondary business and engineering goal, after asynchronous backing and new scheduling procedures which will have higher improvements for throughput. Also, at the current message-passing volume, the relay chain is far from its limits of stored messages on-chain, so there is less urgency to transition to a peer-to-peer model like XCMP.
Developer Experience
Since network effects are critical to both these ecosystems, the developer experience becomes an increasingly important factor in determining which platform will attract more talent and projects. Right now, even Polkadot engineers, such as Joe Petrowski, will admit that building for Cosmos is a much better user experience than building for Polkadot due to the steep learning curve associated with XCM. This ease of use has led to a flourishing Cosmos ecosystem, characterized by a greater number of decentralized applications (dApps), albeit with a tendency towards smaller and more simplistic projects.
Cosmos achieves this user-friendly environment through its modular architecture, which allows developers to easily create custom blockchains utilizing the Cosmos SDK, a framework built on top of Tendermint. Developers are provided with a flexible toolkit to build solutions tailored to their specific use cases, without needing to dive deeply into complex consensus mechanisms.
On the other hand, Polkadot, with its unique relay chain architecture and the implementation of XCM, lays the groundwork for powerful and complex dApps. Developers in XCM need to consider weight, execution resources, and parachain destination IDs, among other parameters. Despite its challenging learning curve, XCM offers a high level of expressiveness that enables developers to build more powerful and complex applications. As the Polkadot community continues to grow and refine its developer tools, it is expected that the platform will eventually offer a more accessible experience, opening the door to a more expansive set of parachains and dApps.
In conclusion, although the developer experience on Cosmos currently appears to be smoother and more accessible, Polkadot's expressive XCM holds greater potential for enabling the development of powerful, complex dApps in the future.
The implication for end-users is that they will feel that Cosmos is a more cohesive and complete ecosystem right now, but once the basic infrastructure in Polkadot catches the level of Cosmos, XCM’s flexibility will lead to more impressive and innovative dApps to be built on the relay chain.
The Final Differentiator: Shared Security
As of the writing of this paper, within the Web3 community, there is certainly more hype and positivity surrounding the Cosmos ecosystem than there is around the Polkadot ecosystem. However, teams at Polkadot and on Polkadot parachains are aware of this, but they unanimously believe that Polkadot’s ecosystem will ascend due to one major reason – shared security.
Within the Polkadot ecosystem, XCMP employs a shared security model. The Polkadot Relay Chain is responsible for securing all connected parachains by providing consensus and validation services. Validators operating on the Relay Chain guarantee that transactions and state transitions on each parachain are secure and accurate. By centralizing security resources, Polkadot forms a robust defense against potential attacks, making it challenging for bad actors to exploit the network. As a result, smaller parachains can leverage the security provided by the entire network without needing to establish their own validator set.
For example, if you are a standalone small blockchain with a token market cap of $5 million, you can be attacked with just a small portion of that. On the other hand, in Polkadot, if you launch that same PoS token, you are backed by billions of dollars of stake, making it way harder to attack your chain. This is because the chain’s PoS security comes from a stake in the relay chain rather than just the stake on that chain.
End users benefit from the XCMP shared security paradigm as it enhances trust and safety when using dApps built on Polkadot parachains. Users can trust the network's security, irrespective of the specific parachain they engage with, due to the comprehensive protection offered by the Relay Chain validators. This shared security streamlines the user experience by delivering consistent security across multiple parachains, minimizing the need for users to evaluate the security of each chain before interacting with their dApps.
In comparison, Cosmos shared security model, coined Interchain Security, was launched just this year in 2023. However, before then IBC facilitated interactions between various blockchain networks, each with its security measures and consensus protocols. IBC maintains secure communication between chains through the use of light client proofs, allowing one chain to verify the state of another chain without accessing the entire blockchain data. This approach enables IBC to preserve security when transferring messages and assets across different blockchain networks.
With this previous security model, end users faced a more intricate situation when interacting with dApps built on Cosmos chains that employ IBC. Users had to consider the security and reliability of each chain they interact with, as IBC does not offer a shared security model. Unlike XCMP, where security is uniform across all parachains, IBC users might need to assess the security of each connected chain to gauge the level of trust they can place in a specific dApp. Such evaluations could include scrutinizing the consensus mechanism, validator set size, and the overall reputation of each chain.
Considering both security paradigms, my biggest takeaway is that for notable and credible dApps, the user experience, in terms of worrying about security, will not differ between Polkadot and IBC. However, due to Polkadot’s more built-out shared security model, users can interact with all parts of the ecosystem with far more confidence than they can with applications connected with IBC. It will be exciting to see how Cosmos scales with Interchain Security going into the next few months.
In other words, the Polkadot ecosystem is much like Apple’s iOS ecosystem, while Cosmos is more similar to Android. Due to Polkadot’s robust shared security model and higher barrier to entry, users will have access to a smaller set of higher-quality dApps. This will promote a more seamless user experience within the ecosystem since users can trust the security of all parachains they are using. On the other hand, Cosmos has a more expansive universe, but the average user experience quality of each chain in the ecosystem will be lower than in Polkadot. Users trade-off having access to a broader selection of dApps for higher variance in experience.
A Case Study: Moonbeam
Moonbeam, a vital component of the Polkadot ecosystem, initially started by providing Ethereum Virtual Machine (EVM) compatibility. This compatibility enabled seamless integration of existing Ethereum-based applications and smart contracts. Moonbeam then turned its attention to XCM, facilitating cross-chain communication and fund transfers within the Polkadot network.
Moonbeam now focuses on connecting with external blockchains, such as Ethereum and Avalanche, further expanding its interoperability capabilities. Through integrations with general message providers like Axelar and LayerZero, Moonbeam enables users to call contracts on any connected chain, providing a unified access point to multiple blockchain networks from within Polkadot.
Effectively, Moonbeam is a communication hub for users, allowing them to interact with various chains directly from the platform. By eliminating the need to switch networks and pay native gas fees, Moonbeam offers a seamless, user-friendly experience that significantly simplifies cross-chain interactions.
I spoke with Kevin Neilson, a developer at Moonbeam, and he walked me through Moonbeam’s core feature of transferring assets using Polkadot. When DOT is transferred to Moonbeam, it is converted to an on-chain asset called xcDOT which exchanges 1 to 1 with DOT. Users are then able to easily exchange xcDOT across the platform for tokens of other chains.
Afterwards, I also tried a similar process on Cosmos. I attempted to convert my ATOM in my Keplr wallet to OSMO. Although I was able to figure it out within 5-minutes and with just one Reddit search that told me I needed to deposit my ATOM first, I found the process to be frustratingly complicated as a new user of Cosmos.
Additionally, Neilson spoke of Moonbeam interoperability with other parachains in Polkadot. For example, the parachain OAK network provides a great experience for the decentralized scheduling of recurring tasks. OAK network allows users to automatically make payments in a decentralized manner through Moonbeam’s platform. Users are able to mutually benefit from the functionality of OAK with the convenience of Moonbeam, demonstrating how Polkadot is meant to work: an ecosystem where parachains synergize to provide compounded user value instead of just acting as independent blockchains.
Now: Cosmos > Polkadot. In the next few years: Polkadot > Cosmos.
In all, after looking at the user experience of the Polkadot and Cosmos ecosystems, my final takeaway is that Cosmos will continue to grow faster than Polkadot due to its more streamlined developer onboarding and larger network. However, I predict that in a couple of years, Cosmos will hit a wall because (1) Interchain Security has less of a track record than Polkadot’s shared security, (2) XCM’s expressiveness will lead to more innovative parachains, and (3) Polkadot’s smaller ecosystem will provide users with a more consistent and high-quality user experience. In that timeframe, I think Cosmos will find it difficult to build up enough network effects to make up for the attractiveness of Polkadot’s more robust ecosystem. But only time will tell if there’s room for both of these internet of blockchains ecosystems to coexist or if one will come to become THE Internet of Blockchains.
Good luck for project