Parallel Heiko Cross-Chain Bridge — A Functional XCM Format

Adegoke Yusuff
Parallel Finance
Published in
6 min readApr 5, 2022

What is a Cross-Chain Bridge

To understand the Parallel Heiko Cross-Chain Bridge and how it works, we need to look into what a cross-chain bridge is and why it is important in the blockchain industry. As the name implies, a cross-chain bridge enables the transfer of assets across different blockchains. These chains may be composed of different protocols and operating models, but the bridge ensures interoperability and fluidity between them by enabling token transfer, data exchange, and feedback flow between the independent platforms.

Interoperability has been an important component of the financial system. The advent of blockchain technology made it more prominent, and Decentralized Finance — DeFi created a more pressing need for it since there is more demand for asset transfer across chains. As such, having a bridge to make this possible is inevitable. For example, if you have KSM on the Kusama network but want to spend it on the Parallel Heiko network, you can transfer it to Heiko using a bridge.

Overall, a cross-chain bridge serves as a neutral zone that enables users to deploy assets for fast and easy transactions irrespective of blockchain and reduces operational difficulties by allowing access to multiple blockchains through the same network.

Parallel Heiko Cross-Chain Bridge

The Parallel Heiko Cross-Chain Bridge is the native cross-consensus messaging (XCM) format of the Parallel Heiko platform. It is one of the six recently released products in the platform’s DeFi super DApp suite, and it provides instant and cheap transfer of KSM from the relay chain (Kusama) to the parachain (Heiko) in just a few clicks. We plan to add DOT to the assets that can be transferred as soon as XCM is available on the Polkadot network.

The Cross-Chain Bridge eliminates the barrier and allows users to easily send assets from other chains to Heiko to utilize the platform for higher yields to meet their investment goals. Here’s the guide on how the Cross-Chain Bridge works.

To understand how the Cross-Chain bridge works, we need to dive into what a cross-consensus messaging (XCM) format is. This will help us understand its importance in parsing information across different chains and ensuring interoperability across different protocols.

Cross Consensus Messaging (XCM) Format

Cross-Consensus Messaging (XCM) Format was first mentioned in Polkadot’s documentation and, by extension, Kusama. It evolved from Cross-Chain Messaging Format to become a robust architectural style of message transfer for more than chains but also pallets, smart contracts, bridges, and sharded enclaves.

XCM is not a protocol. As such, it cannot parse messages across consensus by itself. Rather, it is a format for how message transfer should be performed and a language for ideas between consensus systems. Kusama’s architecture allows the interoperability of parachains, enabling the cross-chain transfer of assets and data. To achieve this, an XCM format defines the language around how the message between the two chains should be parsed.

XCM has the following properties:

  • Generic, extensible and customizable: Although it was first mentioned in the Polkadot documentation, XCM is not specific to it. It aims to be a generic, extensible, and customizable language format between different consensus for use with free and gas-metered parachains, their relay chain, smart contract platforms, and more.
  • Interacting with a system whose transaction format is unknown: XCM is well-defined, abstract, and versatile and can be used to provide a long-lasting transaction format for wallets to create many common transactions.
  • It is highly efficient to operate in a tightly constrained and metered environment, as with many chains.

XCM Transport Protocols

Polkadot and Kusama implement two types of cross-consensus transport protocols for acting on XCM formats between their constituent parachains, Heiko being one of them. They include:

  • VMP (Vertical Message Passing): VMP protocol is responsible for message transfer between relaychains and parachains, and it is further divided into two:
  • UPM (Upward Message Passing): This allows parachains like Heiko to send messages to their relaychain (Kusama).
  • DMP (Downward Message Passing): It allows relaychains, e.g., Kusama, to pass messages down to their parachains, e.g., Heiko.

Parallel Heiko Cross-Chain bridge currently implements a DMP protocol, and we plan to integrate other XCM transport protocols in the future.

  • XCMP (Cross-Chain Message Passing): This transport protocol allows transferring messages and data between parachains on the same relaychain. It resolves cross-chain transactions using a simple queuing mechanism based on the Merkle tree to ensure fidelity. Here, relaychain validators are saddled with the responsibility of moving transactions on the output queue of one parachain into the input queue of the destination parachain. Only the metadata of the transaction is hashed and stored in the relaychain.

The input and output queues are sometimes referred to in the relaychain codebase and associated documentation as ingress and egress messages.

It is important to note that while XCMP is currently under development, there exists a stop-gap protocol referred to as Horizontal Relay-routed Message Passing (HRMP) in its place. Messages transferred by this protocol are stored and read from the relaychain.

XCM Token Transfer Models

XCM can request recipient system-specific operations or optionally include gas fee payments for requested operations on a target network. However, here are some of the identified transfer models and common use-cases of XCM:

  • Asset Teleporting: involves the movement of an asset from one chain to another, e.g Kusama to Parallel, by destroying the amount being transferred in the origin chain and creating a clone (same amount as destroyed) on the target chain. This is similar to how Parallel Heiko Cross-Chain Bridge operates. It creates a clone of the KSM from the relaychain (same amount and value) on Heiko and destroys that amount from the relaychain to be utilizable by the user on Heiko (we plan to include other models in the future).
  • Remote Transfers — involves asset movement from one chain to another via an intermediate account in the origin chain that is trustlessly owned by the target chain. The XCM execution in the target chain mints a derivative of the assets representing a target address. The derivative asset is always interchangeable with the native asset 1:1. Parachains like Moonbeam support remote transfers.

More information about XCM can be found in the Polkadot Wiki.

Since Heiko is a parachain within the Kusama ecosystems, one of its most direct implementations of XCM is to enable asset transfer from Kusama and other parachains from/to Heiko. This will allow users to bring their tokens to Heiko and all its DApps — ensuring access to a broader money market and the opportunity to earn additional yield. Interestingly, Heiko’s Cross-Chain Bridge is a Substrate pallet designed for this purpose.

About Parallel Heiko

Heiko is the Kusama blockchain-based sister network to Parallel Finance. It features a suite of DeFi super dApps that include Staking, AMM, v2 Decentralized Crowdloan, Wallet, Farm, Cross-Chain Bridge, and Decentralized money market. The platform is committed to building a decentralized future that empowers the community to increase DeFi capital efficiency, security, and accessibility.

We are one of the largest parachains in the Polkadot space with over $700M+ TVL and 200K+ active users and have some of the best investors, including Sequoia, Founders Fund, Coinbase, Polychain, etc. The platform has a rapidly growing global team of over 70 doers from top organizations in and outside the cryptocurrency space, including The World Bank Group, Dash, Crypto.com, ChainLink, Meta, Polygon, Ledger, JP Morgan, Standard Chartered, Amazon, BlockFi, etc. and we are still hiring!

Stay in touch with us.

Website: https://parallel.fi

Twitter: https://twitter.com/ParallelFi

Telegram: https://t.me/parallelfi_community

Discord: https://discord.gg/buKKx4dySW

Medium: https://parallelfinance.medium.com

--

--

Adegoke Yusuff
Parallel Finance

Ade is an expert Web3 writer with deep expertise and experience in Blockchain and Decentralized use cases — DeFi, NFT, GameFi, P2E, Identity Management, etc.