Moonbeam is paving the way for the next generation of connected applications through cross-chain connected contracts. This advancement unites the functionalities of many blockchains and makes them accessible to developers on Moonbeam, changing the way developers and users think about and use blockchain technology.
By removing the constraints of the past, namely a fragmented user experience, Moonbeam is leading the way toward wider adoption and new use cases. Connected contracts represent a monumental shift forward in usability by allowing end users to couple any token with functionality located on any blockchain, all in the context of a single application user experience.
As connected applications, builders can use smart contracts to communicate across blockchains through cross-chain messaging capabilities available on Moonbeam. This ready availability of inter-blockchain communications will change the face of Web3 development by producing more efficient protocols with superior user experience.
What is a Cross-Chain Connected Application?
Cross-chain connected applications refer to the cooperation of smart contracts on the “backend” of the DApps users interact with on the blockchain. These applications are connected across blockchains so there is no need to bridge assets in order to use assets in any application, on any connected chain.
Connected applications built on Moonbeam using contracts can tap into functionality from Ethereum, Cosmos, Avalanche, and Polkadot via messages that are sent across chains. As a parachain on Polkadot, Moonbeam natively supports XCM as a messaging transport. But Moonbeam also supports cross-chain messaging systems such as Axelar, LayerZero, and deBridge as well. Native support for cross-chain messaging means that Moonbeam is especially good at supporting DApp developers with a need to support many kinds of assets and use cases across many chains.
Definitions: How Blockchains Can Work Together
The idea of chains working together has been around for some time, so it’s important to understand what cross-chain means.
Multi-Chain Smart Contracts
Multi-chain smart contracts refer to an applications that exists on more than one blockchain, but each deployment of the application is an island: it does not communicate with other blockchains, even if it is the same application. For example, a hypothetical application called SuperApp that exists on Ethereum has no connection to SuperApp on Moonbeam.
Many projects deploy on more than one blockchain so that users can interact with native assets of the chain the application is deployed on without having to bridge anything. This “multi-instance” or multi-chain smart contract approach involves copying contracts from one chain and deploying them on other chains. The “backend” of the contracts do not communicate. This lack of communication causes fragmentation of resources and liquidity, a negative for everyone because each chain requires its own TVL to support the protocol. This is not true interoperability, though it is a step in that direction.
Cross-Chain and Cross-Chain Connected Contracts
“Cross-chain” is an emerging concept that generally refers to applications on multiple blockchains that can communicate and coordinate with one another. Cross-chain use cases have been explored by many Layer 1 blockchains, and now Moonbeam brings the idea to fruition through cross-chain connected contracts.
Cross-chain connected contracts refer to smart contracts that communicate behind the scenes to allow users access to assets from any chain for use on any other connected chain. Users access one application built on Moonbeam, but can work with any of their assets from any blockchain using the cross-chain connection.
Cross-chain connected smart contracts enable applications to track resources on all connected chains, including tokens. Instead of bridging tokens from one chain to another to use DeFi applications, for example, the smart contract could lock tokens on one chain and allow their use on another from where they are (no bridging or moving the tokens). For example, instead of needing multiple isolated protocols, a cross-connected lending and borrowing application would allow smart contracts to access collateral on any chain because it would be visible and usable through the cross-chain connection.
Connected Applications Improve Upon Today’s Multi-Instance Approaches
In most instances, smart contracts are designed for one chain, like Ethereum, and then copied for deployment on other EVM-based chains, like Moonbeam. When deployed on a chain, the smart contract operates only within the chain on which it lives, which means any users or assets need to move over to that blockchain in order to interact with the app. That means that users would interact with the duly-deployed smart contract on one chain, which would be a separate event from interacting with the equivalent smart contract on another chain. What happens on Ethereum would stay on the Ethereum smart contract, and what happens on Moonbeam would stay on Moonbeam.
Recall the hypothetical SuperApp DApp as an example of multi-deployment. Imagine it is deployed on 16 chains. Users can interact with the SuperApp smart contract on Moonbeam, using native Moonbeam assets, which is convenient and easy, though isolated. The same user might use SuperApp on another chain, and interact with that chain’s native assets. Though he or she is interacting with the same application, SuperApp, and using the same smart contract, the experience on Moonbeam would be different than the experience on the other chain, and the contracts would have no way of knowing that the user had interacted on both chains.
The problem with this process is that, in this multi-instance approach to deployment, the multi-chain smart contracts on the separate chains do not communicate which leaves the user inflexible when it comes to using or moving tokens, and there is a need to deal with the inconvenience of using different wallets, addresses, block explorers, etc. If you wanted to use SuperApp on Avalanche, for example, you would have to first change your ETH to WETH and find a trustworthy bridge to move your tokens, which is often confusing, time-consuming, costly, and risky.
This lack of communication between blockchains results in a burdensome user experience on each blockchain, even when using the same DApp. In the SuperApp example, the two chains would also both require their own liquidity to function which fragments the available amount (in some cases, splitting across 10 or 20 chains), potentially making the user experience more tedious and costly. Moonbeam’s cross-connected smart contracts solve this major issue, making room for new use cases.
With cross-connected smart contracts, Moonbeam applications can connect to other blockchains behind-the-scenes so that the user experience would be simplified, safe, and convenient. Through the single access point of an application on Moonbeam, a user has access to all of their assets, no matter where those tokens are located.
Moonbeam as a Platform for Cross-Chain Connected Applications
Moonbeam is a pioneer when it comes to providing users with unified access to users, assets, and services through cross-chain connected applications. The Moonbeam platform makes a frictionless user experience possible through cross-chain compatibility with many blockchains, an excellent developer environment with tool support, and modern proof of stake architecture built on the Substrate framework. No longer is there a need to deal with fragmented user experience, lack of liquidity, and poor functionality.
Builders on Moonbeam can design smart contracts that access the functionality of remote blockchains which is achieved by secure message passing. On Moonbeam, this ability comes from general messaging passing through collaborations with Axelar, LayerZero, deBridge, and the use of XCM (cross-consensus messaging).
General message passing (GMP) is the term used to describe the latest evolution in cross-chain interoperability. GMP allows developers to connect smart contracts on different chains together to move not only tokens, but data and payloads, which will drive the efficiency and usability of Web3 applications moving forward. GMP can move data, tokens, and payloads. GMP solutions allow smart contracts on different chains to connect and interoperate in efficient and useful ways that previously were not possible.
Similarly, XCM is a messaging format that enables Substrate-based chains, like Moonbeam, to natively communicate with one another. This allows parachains on Polkadot to easily tap into each others’ specialized resources. Moonbeam is collaborating with several other top-tier parachains to access a variety of use cases including Centrifuge, Manta, Acala, and more.
The combination of these technologies through Moonbeam’s cross-chain platform allows builders to:
- Offer new products that aren’t limited to locally-available assets on an individual chain (without the need to bring them over via traditional bridges)
- Create unified visibility from a single application into state across multiple smart contracts on remote chains
- Propagate changes or decisions from one chain on other satellite chains by allowing data to flow across chains
- Connect Polkadot ecosystem to the outside world through a single connection to Moonbeam, allowing Polkadot assets such as DOT and GLMR to flow to other chains, and allowing outside assets such as ETH and USDC to flow into Polkadot parachains
Optimized Development Environment
Moonbeam’s developer-friendly platform offers complete Ethereum compatibility and broad tool support.
- Minimal Codebase Changes: if you have an existing contract or are simply used to building in an EVM-based environment, your code will work right away with no need to rewrite or reconfigure
- Language Support: write smart contracts in Solidity or anything that compiles to EVM bytecode
- Core Developer Integrations: integrations with the most-requested developer tools and services like block explorers (Etherscan, Subscan), multisig (Gnosis Safe), APIs (The Graph, Covalent, Biconomy, OnFinality), oracles (Chainlink, Band Protocol) and multiple VRF solutions.
- Unified Accounts, Addresses, and Signatures: use your existing Ethereum H160 accounts & ECDSA signatures to interact with Moonbeam
- Cross-Chain Enabled Assets: mint and interact with XC-20s which retain the simplicity of ERC-20s but can natively move across the broader Polkadot ecosystem as if they were Substrate-based tokens
Modern Substrate-Based Architecture
As a Substrate-based chain, Moonbeam allows builders to securely scale their DApps through specialized resources across the entire Polkadot ecosystem. This is possible through a combination of Substrate-native features, like shared security and forkless on-chain upgrades, as well as a number of customizations that are unique to the Moonbeam platform, like custom precompiles that marry Ethereum-style and Substrate functionality in one environment. This results in a robust set of benefits for Moonbeam-based applications:
- Shared security and finality derived from the Polkadot Relay Chain gives Moonbeam the full strength of Polkadot’s validator set.
- Forkless upgrades mean that the core blockchain can be easily and safely upgraded with functionality and security improvements.
- Tap into specialized resources on other parachains including privacy, storage, and identity services
- Specially-designed staking & governance precompiles: participate in infrastructure staking or important on-chain referenda from standard (Ethereum-style) wallets
- Extend Moonbeam smart contracts with parathreads (coming soon) using custom blockchain-level functionality developed with Substrate
The cross-chain connections that Moonbeam is implementing are leading the way in cross-chain connected applications.
By unifying access to services across many remote blockchains — not just across parachains — the future generation of applications will be able to provide a superior user experience for existing DApp users and new crypto users alike. By obscuring the non-necessary infrastructural headaches from the end-user experience, the future of decentralized applications will be drastically simplified and easier for new entrants to adopt.
Through Moonbeam, applications are not limited to locally available assets, data is visible across chains, and information can flow freely. This capability means that Moonbeam serves as a single connection point for any blockchain to connect to many other blockchains, and there are endless new use cases that are unlocked.