What Are Cross-Chain Smart Contracts?

Cross-chain smart contracts are applications made up of multiple smart contracts deployed across multiple blockchain networks, creating a single decentralized application.

Cross-chain smart contracts are decentralized applications that are composed of multiple different smart contracts deployed across multiple different blockchain networks that interoperate to create a single unified application. This new design paradigm is a key step in the evolution of the multi-chain ecosystem and has the potential to create entirely new categories of smart contract use cases that leverage the unique benefits of different blockchains, sidechains, and layer-2 networks.

In this article, we explore the rise of the multi-chain ecosystem, outline the benefits and challenges of existing multi-chain smart contract strategies, and explain how cross-chain smart contracts present a paradigm shift in how blockchain-based decentralized applications are created. We then look at some of the innovative use cases unlocked by cross-chain smart contracts and outline how the Cross-Chain Interoperability Protocol (CCIP) can help facilitate this transition by enabling secure cross-chain communication between blockchains. 

The Rise of the Multi-Chain Ecosystem

Historically, the adoption of smart contracts has largely taken place on the Ethereum mainnet due to it being the first blockchain network to support fully programmable smart contracts. Alongside its first-mover advantage, additional factors have also contributed to Ethereum’s adoption, such as its growing network effect, decentralized architecture, time-tested tooling, and an extensive community of Solidity developers. However, rising demand for Ethereum smart contracts has led to an increase in network transaction fees over time, as demand for Ethereum’s blockspace (computing resources) exceeds supply. While the Ethereum mainnet continues to provide one of the most secure networks for smart contract execution, many end-users have begun to seek lower-cost alternatives. 

In response, the adoption of smart contracts on alternative layer-1 blockchains, sidechains, and layer-2 rollups has rapidly increased in the past year in order to meet the needs of users and developers. Once just a theory, the multi-chain ecosystem is now a definitive reality, as demonstrated by the increasing diversification of the DeFi ecosystem’s Total Value Locked across various on-chain environments. Additional on-chain metrics, such as daily active addresses, transaction count, and network bandwidth consumption, also clearly show the growth of the multi-chain ecosystem. 

The Multi-Chain DeFi Ecosystem
The growth of the multi-chain DeFi ecosystem over time.

The availability of new on-chain environments has increased the total aggregate throughput of the smart contract economy as a whole, leading to the onboarding of more users who are able to transact at a lower cost. Furthermore, each blockchain, sidechain, and layer-2 network offers its own approach to scalability, decentralization, mechanism design, consensus, execution, data availability, privacy, and more. In the multi-chain ecosystem, all of these different approaches can be implemented and battle-tested in parallel to push forward the ecosystem’s development. 

The Ethereum community has embraced the multi-chain approach, as evidenced by the adoption of a rollup-centric roadmap for scaling the throughput of the Ethereum ecosystem via the deployment of various layer-2 scaling solutions. Layer-2 networks increase the transaction throughput of Ethereum-based smart contracts, resulting in lower fees per transaction while retaining the security properties of the Ethereum mainnet. This is achieved by verifying off-chain computations on the Ethereum baselayer blockchain using fraud proofs or validity proofs, and in the future, also leveraging data sharding to expand capacity for rollup calldata.

To take advantage of the multi-chain ecosystem, many developers are now increasingly deploying their existing smart contract codebase across multiple networks rather than on just one blockchain. By developing multi-chain smart contracts, projects have been able to both expand their user base and experiment with new features on lower-cost networks that would otherwise be too cost-prohibitive. The multi-chain approach has become increasingly commonplace across numerous DeFi verticals: for example, the SushiSwap DEX is deployed across 15 chains, the Beefy Finance yield aggregator across 12 chains, and the Aave money market across three chains. 

The Limitations of Multi-Chain Smart Contracts

While the multi-chain ecosystem provides numerous benefits to both users and developers, the deployment of the same smart contract code across multiple blockchains introduces a number of unique challenges and trade-offs. 

Firstly, each new deployment of a multi-chain smart contract’s code on another blockchain network creates an entirely new copy of the application, meaning it is no longer a single unified application. Instead, each contract deployment manages its own internal state (e.g. tracking account balances), with limited or a complete absence of interoperability between deployments on different blockchain environments. While users can access a copy of the application on their preferred network, the user experience will not necessarily be the same from chain to chain. 

Multi-chain smart contracts
Multi-chain smart contracts are dApp deployments that are isolated in nature.

This dynamic is most obvious with decentralized exchanges, particularly Automated Market Makers (AMMs), that take a multi-chain approach. Because a user’s assets can only exist on one blockchain at any given point in time, liquidity within the application as a whole becomes fragmented across different on-chain environments. The result is reduced liquidity within each individual deployment, leading to higher slippage for users and a reduction in trading fees. Furthermore, each deployment of an AMM on another blockchain starts from scratch with zero liquidity, which can result in higher dilution of the protocol’s native token if liquidity mining programs are extended to the new deployment as a way to bootstrap liquidity.

Any application that requires a single source of truth on the application’s state, such as an on-chain domain name system with a central registry, is difficult to implement in a multi-chain manner. If multiple registries were deployed across multiple blockchains, then the same name could be registered multiple times across different chains with different owners, leading to collisions. As such, applications that require a global state of consistency are often deployed to just one blockchain network. 

In addition to application-level challenges, the multi-chain ecosystem can also increase friction for end-users, who may be required to learn to interact with an increasing number of networks. Given that assets held on a particular blockchain can only be used within dApps native to that blockchain, users are required to manually bridge their tokens across blockchains if they want to use dApps in other on-chain environments. This not only involves reconfiguring their wallets, learning new UX patterns, and managing additional base-layer tokens for gas, but might also require compromising on security, as many traditional cross-chain token bridges have security limitations. 

Ultimately, the fundamental constraint of multi-chain smart contracts is the limited or lack of interoperability between deployments on different blockchains, sidechains, and layer-2 networks. While token bridges exist to support multi-chain applications, the ability to securely transmit data between blockchains opens up an entirely new design paradigm in how smart contracts can be architectured. 

The Introduction of Cross-Chain Smart Contracts

Secure cross-chain communication—the transmission of arbitrary data, tokens, and commands between on-chain environments—enables the creation of cross-chain smart contracts. Cross-chain smart contracts are decentralized applications that consist of separate smart contracts on different blockchain networks that intercommunicate to create a single unified application. 

Cross-chain smart contracts
Cross-chain smart contracts are a unified dApp with logic on different blockchains.

Although this can be approached in different ways, at a fundamental level a cross-chain smart contract design paradigm enables developers to split up their applications into modularized components. In essence, different smart contracts on different chains perform different tasks yet all stay in sync and work towards supporting a single use case. This enables developers to leverage different blockchain networks for their unique benefits: They might create a decentralized application that uses a highly censorship-resistant blockchain for tracking asset ownership, a high-throughput blockchain for low-latency trading, a privacy-preserving blockchain for user identification, and a decentralized storage blockchain for metadata storage, for example. 

Furthermore, the cross-chain smart contract design paradigm can be used to enable more seamless interoperability between deployments of the same smart contract code on multiple blockchain networks. This helps to standardize user experience across different on-chain environments for existing multi-chain applications. As a result, cross-chain smart contracts help solve many of the limitations of existing multi-chain smart contracts and enable entirely new use cases as a result. To showcase the limitless potential of cross-chain smart contracts, here are some examples.

Cross-Chain Exchange

A cross-chain decentralized exchange (DEX) could offer users the ability to execute trades that source liquidity from token pools across different blockchain networks as a way to mitigate the liquidity fragmentation issues of multi-chain DEX deployments. For example, during a trade, a user’s input tokens could be split up and bridged to different blockchains to achieve the best execution price, with the resulting output tokens bridged back to the originating blockchain and into the user’s wallet. As a result, accessible liquidity across all blockchain networks would be significantly boosted, providing users lower slippage on their trades and access to greater fees for liquidity providers on each chain. 

Furthermore, cross-chain DEXs could also be designed to enable users to trade their native tokens from one blockchain environment for native tokens on a different blockchain environment—a user might trade ETH on the Ethereum blockchain for BTC on the Bitcoin blockchain, for example. This would enable users to gain exposure to native assets on different blockchain platforms without requiring wrapped tokens or centralized exchanges. 

Cross-Chain Yield Aggregation

A cross-chain yield aggregator could deploy user-deposited funds into the various different DeFi protocols that exist across the multi-chain ecosystem. By increasing the scope of potential yield-generating sources, users could generate greater yield without needing to manually bridge their tokens across chains and chase the highest yields themselves. This would significantly reduce the friction of multi-chain yield farming since users wouldn’t need to manually bridge across environments. Instead, the entire process would be abstracted away. 

This design would also have the secondary effect of increasing liquidity across the multi-chain ecosystem by helping increase the Total Value Locked of DeFi applications in new and upcoming on-chain environments.

Cross-Chain Lending

Cross-chain money markets could foster the creation of cross-chain loans, enabling users to deposit collateral (e.g. ETH) in a market on one blockchain and then borrow tokens (e.g. USDC) from a market on another blockchain. This would allow users to keep their collateral on a highly-secure blockchain of their choice while borrowing tokens on a higher-throughput blockchain to deploy into applications within that on-chain environment. 

A cross-chain money market could also empower users to borrow tokens from a market deployment on another blockchain featuring a lower interest rate, with the borrowed funds then bridged back to the chain where the loan was opened. This could help standardize yields across blockchains, leading to lower costs for borrowers on lower-liquidity money market deployments featuring higher borrowing interest rates.

Cross-Chain DAOs

Decentralized Autonomous Organizations (DAOs) could leverage cross-chain interoperability to enable on-chain voting on one or multiple higher-throughput blockchain networks, with the results then relayed back to the higher-cost blockchain network where the protocol’s core governance contracts exist. This would incentivize greater participation by decreasing the transaction costs for DAO participants while still maintaining on-chain transparency and censorship resistance for each participant. 

Furthermore, a cross-chain DAO could govern and modify the parameters of smart contracts across different blockchain networks in a seamless manner, expanding the scope of what can be governed by token holders within one or multiple on-chain environments. 

Cross-Chain NFTs

Cross-chain Non-Fungible Token (NFT) marketplaces could allow users to list and bid on NFTs hosted on any blockchain network. This could help increase the accessibility and liquidity of NFTs and enable them to be bridged across on-chain environments seamlessly after the bidding process has been completed. In addition, on-chain gaming applications that exist on one blockchain could leverage cross-chain interoperability to track the ownership of NFTs on another blockchain. This would allow users to keep their NFTs securely stored on their blockchain of choice yet gain the ability to use the NFT within gaming applications on any other blockchain. 

***

While these are just a few examples of the use cases that are made possible by a cross-chain smart contract paradigm, there are ultimately an unlimited number of potential use cases. In addition to the modularization of decentralized applications, cross-chain smart contracts can also be designed in an entirely different manner to leverage the benefits of the multi-chain ecosystem.

Storefront Smart Contracts

Existing single-chain or multi-chain smart contracts can benefit immensely from cross-chain interoperability through the deployment of storefront smart contracts—smart contracts that serve as a gateway to a smart contract application on another blockchain network. These contracts allow users to stay within their blockchain environment of choice while depositing into and interacting with existing decentralized applications running in an entirely different on-chain environment. 

Users would no longer need to manually bridge across blockchains to interact with smart contracts that exist solely on another blockchain—they might not even necessarily need to know which blockchain, sidechain, or layer-2 network a smart contract application is running on. They would be able to access the application as if it were simply running on the blockchain they are already transacting on.

Storefront smart contracts could be attached to any existing decentralized application, such as a derivatives platform or money market, in a backwards-compatible manner. This would enable cross-chain interoperability to be added to existing protocols in a permissionless manner due to the composable nature of smart contracts. The creation of a more seamless and interoperable ecosystem would boost the growth of the multi-chain economy significantly. 

How CCIP Enables a Secure Cross-Chain Ecosystem

While cross-chain smart contracts represent a major paradigm shift in how decentralized applications can be created, the vast majority of blockchain networks operating at scale today are siloed by default, meaning they are unable to natively send and receive data between different blockchain networks. In order to support cross-chain smart contracts, additional infrastructure in the form of a bridge is required to enable cross-chain communication. 

Blockchain bridges have so far largely focused on the transfer of tokens between networks, often with assets from one chain wrapped onto another. However, cross-chain smart contracts require more generalized bridges to support the transfer of arbitrary data packets, tokens, and commands. Such infrastructure must also be highly secure, reliable, and based on an audited codebase so messages are transmitted without corruption, received in a timely manner, and protected against external conditions such as blockchain reorgs. Just as decentralized oracle networks (DONs) helped solve the blockchain oracle problem (the inability for blockchains to access off-chain resources), they could also serve as a conduit for secure blockchain interoperability.

As a natively blockchain-agnostic protocol, the Chainlink Network is integrated across a wide range of blockchains, sidechains, and layer-2 networks, making it well-positioned to support the multi-chain ecosystem’s shift to cross-chain smart contracts. In order to achieve this goal, a global open-source standard for cross-chain communication called the Cross-Chain Interoperability Protocol (CCIP) is currently under development. 

In comparison to traditional cross-chain bridges, CCIP aims to enable smart contracts to send both data and/or tokens across any blockchain in a secure manner. Data messages can be encoded/decoded by smart contracts in any manner, supporting a wide degree of flexibility in how they are interpreted. Importantly, CCIP will leverage the existing collection of hyper-reliable, tamper-resistant, and blockchain-agnostic Chainlink oracle nodes, which already help secure tens of billions of dollars in value within the multi-chain DeFi economy. 

 

In addition to a high-quality codebase, CCIP is planned to be further secured through an innovative risk management system called the Anti-Fraud Network. The Anti-Fraud Network is composed of DONs made up of independent committees of nodes, separate from those of facilitating CCIP-enabled bridges, with the sole purpose of monitoring CCIP services for malicious activity and blockchain network conditions such as block reorgs. This additional verification layer can initiate the emergency shutdown of bridges, which pause the transfer of data and tokens temporarily to help protect cross-chain smart contracts and users against potential black swan events. 

Cross-Chain Interoperability Protocol (CCIP)
The Cross-Chain Interoperability Protocol (CCIP) will allow messages to be passed between blockchains.

Hundreds of single-chain and multi-chain smart contract applications are already leveraging Chainlink oracles for off-chain data and trust-minimized computation, and such protocols can leverage the same decentralized infrastructure to support cross-chain interoperability. In addition to providing the infrastructure for creating cross-chain smart contracts, CCIP will also support the creation of various cross-chain token bridges, allowing users to directly bridge their tokens to different blockchains alongside commands on how to deploy such tokens. While there are some inherent challenges to the creation of cross-chain infrastructure, the priority on ensuring the highest level of security through audited code and a defense measure is a key focus in the creation of the CCIP standard. 

Conclusion

Today’s multi-chain ecosystem is full of innovation, with more and more developers deploying their applications to additional on-chain environments to increase their user base and traction. But while there are some limitations to the multi-chain smart contract design paradigm, the introduction of cross-chain smart contracts presents a significant opportunity to not only overcome these limitations but to unlock entirely new use cases as a result.  

CCIP will help accelerate this transition by aiming to provide the highly reliable and secure cross-chain infrastructure required to enable decentralized applications to securely transmit arbitrary data to smart contracts on any other blockchain network. Just as nobody could fully predict all of the future use cases enabled by the Internet in the early 1990s, the most innovative use cases enabled by cross-chain smart contracts have yet to be discovered. 

If you’re interested in building cross-chain functionality with CCIP and want to learn more, visit chain.link/solutions/cross-chain or reach out to an expert.

To learn more about Chainlink, visit chain.link, subscribe to the Chainlink newsletter, and follow @chainlink on Twitter.

More On This Topic

Need Integration Support?
Talk to an expert
Faucets
Get testnet tokens
Read the Docs
Technical documentation