Darwinia Universal Cross-Chain Messaging SDK

Published on: 05.08.2022
Darwinia Universal Cross-Chain Messaging

Darwinia are happy to announce the Darwinia Universal Cross-Chain Messaging SDK, a solidity library that provides the easiest way for decentralized applications to become cross-chain applications. By simply importing the SDK, developers can integrate cross-chain messaging capabilities into their new or existing Dapps.

The SDK abstracts away the technical bits of LCMP and other cross-chain protocols for developers, reducing the level of difficulty required to use them. It allows developers to focus on integrating only the capabilities they need, from the blockchains that provide them.

They’ve currently implemented the Substrate-based Messaging SDK, which provides a wrapper for LCMP on Substrate.

Technical layers

The Substrate-based Messaging SDK (S2S SDK) is implemented in solidity (shown in hot pink). It calls Darwinia Messaging Modules through precompiled contracts on the Darwinia Smart Chain(EVM). The Darwinia Messaging Modules are a series of pallets running on the Substrate-based chain, which utilize LCMP protocol to package and transmit cross-chain messages.

The EVM-compatible Messaging SDK (E2E SDK) for general use is currently under development. It is based on a set of LCMP implementations developed entirely for EVM. The underlying layer does not depend on Substrate, which means that it can run on any EVM-compatible blockchain. It should be noted that the E2E SDK is not intended to replace the S2S SDK. We choose the best underlying tech stack for different platforms, and hope to eventually provide developers with a unified cross-chain operation interface.

In addition, our cross-chain capability is currently utilizing LCMP, but we are also exploring support for different cross-chain protocols, see What is DARWINIA? for more information.

Structure

Dapp developers only need to deploy an endpoint contract on the source and destination chains to use the capabilities provided by the SDK.

An endpoint is a cross-chain operation entry point. it is prepared and deployed by Dapp developers. An endpoint represents a bridge between the local chain and the remote chain. Therefore, if a Dapp needs to interact with multiple chains, you need to prepare multiple endpoint pairs, each endpoint pair responsible for interacting with one chain.

Implementing an endpoint is very simple, just inherit an abstract contract and implement some simple functions. You can see an example here, and we also provide a guide, so you can start right away.

Why do Dapp developers need to implement endpoints themselves? Because the endpoint needs to have access control. Dapp developers can add permissions according to their own needs. Also, If others can call your endpoint’s functions or modify your endpoint parameters, it is definitely not safe! So, an access control strategy should be added to endpoints to restrict access to their functions. For example, you can use openzeppelin’s access-control to limit access to endpoints to only certain accounts.

Use case

HelixBridge utilized Darwinia Universal Cross-Chain Messaging SDK to implement cross-chain asset transfers. HelixBridge is a secure and easy to use platform for cross-chain asset transfers. It integrates the best asset bridging projects in the industry, providing users with a filtered list of asset bridges and a cross-chain portal.

HelixBridge manages cross-chain asset transfers using the Cryptocurrency Backed Asset(CBA) model, which has several functions requiring cross-chain interaction:

  • Register token. Register a token type to the bridge.
  • Remote issuing. The issue method on the target chain is called remotely through the SDK.
  • Confirmation. The target chain calls back the confirmation method of the source chain.

You can learn more here.

The future

  • EVM-compatible Messaging SDK
    The underlying layer completely implemented in solidity and can run on any EVM-compatible chain, such as ETHEREUM, BSC, etc., and can provide a wider range of cross-chain capabilities.
  • XCM support
    Cross-Consensus Message (XCM) is a general-purpose cross-chain message format developed by Polkadot that defines a language around how to transfer messages between two interoperable blockchains. XCM is not specific to Polkadot, it aims to be a generic and extensible language between different consensus systems. Darwinia will also use this format to define cross-chain messages.
  • Hybrid Message Routing
    Darwinia’s cross-chain vision not limited to the Polkadot ecosystem, but geared toward expanding to multiple ecosystems in the future. The life cycle of a cross-chain message may span multiple ecosystems. Therefore, there will be a hybrid routing system. The Messaging SDK will provide a set of libraries that support hybrid routing to simplify message packaging.

About Darwinia Network

Darwinia is a cross-chain messaging infrastructure, which provides a light client-based, programmable, universal cross-chain messaging network for decentralized applications. Now, we’ve successfully used Darwinia’s light-client cross-chain messaging protocol(LCMP) to bridge cross-chain messages between substrate-based chains, and even between substrate-based chains and EVM chains, meanwhile, Darwinia provides developers with the SDK, and developers can easily integrate cross-chain capabilities into their Dapps. This will have profound implications for cross-chain interoperability, and Darwinia will as a cross-chain messaging infrastructure to prompt the building of a hybrid cross-chain network for Polkadot.

Website Twitter |

Source

REQUEST AN ARTICLE

Market Stats:
BTC Dominance: 54.26%(+0.36%/24h)
ETH Dominance: 16.17%(+0.13%/24h)
Defi Market Cap: $85.53B(-9.38%/24h)
Total Market Cap: $2296.58B(-5.02%/24h)
Total Trading Volume 24h: $117.52B(+3.04%/24h)
ETH Market Cap: $371.4B
Defi to ETH Ratio: 23.03%
Defi Dominance: 3.55%
Altcoin Market Cap: $1050.52B
Altcoin Volume 24h: $71.18B
Total Cryptocurrencies: 29211
Active Cryptocurrencies: 9709
Active Market Pairs: 81099
Active Exchanges: 749
Total Exchanges: 8335
BTC: 63322.8$(0.39%/1H)
ETH: 3090.03$(0.41%/1H)
AVAX: 34.41$(-0.95%/1H)
BNB: 541.22$(-0.38%/1H)
MATIC: 0.7$(-0.55%/1H)
FTM: 0.66$(-1.88%/1H)
ADA: 0.46$(-0.65%/1H)
DOT: 6.6$(-0.73%/1H)
UNI: 7.18$(-0.63%/1H)
CAKE: 2.69$(-0.95%/1H)
SUSHI: 0.96$(-0.84%/1H)
ONE: 0.02$(-1.34%/1H)