Building Cross-Chain Applications: An Easier Start with Across Protocol

By Slashdot Staff

Introduction

The future of the internet is being built on blockchains.

The digital world is becoming increasingly decentralized, and the demand for block space grows exponentially. More and more users want access to onchain ecosystems. To put this into perspective, there are currently over 10 million daily active users across more than 1,000 networks.

With so many chains available, there is an increasing focus on interoperability—the ability for different blockchain networks to communicate and transfer assets, data, and commands seamlessly between each other.

Modern users look for seamless cross-chain interoperability, along with speed, security, and affordability. No more slow bridges, no more high fees. Yet, the challenge of managing decentralized applications (dApps) on multiple chains is a nightmare.

We need an easy-to-use solution that empowers developers to build dApps with native cross-chain interoperability.

Challenges of Cross-Chain Development

Most onchain applications are siloed within a single chain, which limits their functionality and creates bottlenecks for both end users and developers:

  • High Gas Fees on Ethereum: The cost of executing transactions on Ethereum.
  • Delays in Bridging Assets: Moving assets between chains often involves long wait times.
  • Poor UX: Most dApps aren’t built with native cross-chain functionality. Their users are forced to manually handle cross-chain transfers with third-party bridges.
  • Security Vulnerabilities: Many bridging solutions are susceptible to cyber attacks.

For developers, building native cross-chain capabilities from scratch is a complex and time-consuming task that requires significant expertise and resources. Because of this, most developers deploy their dApps on multiple chains and attempt to manage them all at once.

However, managing multiple deployments across many chains is a complicated and resource-intensive task that introduces inefficiencies at various levels:

  • Multiple Deployments: Each chain requires a separate deployment, which forces developers to maintain multiple codebases, manage version control, ensure consistency, and coordinate communication across different environments.
  • Costly and Redundant Audits: Every chain demands its own security audit, significantly increasing costs. Audits must be tailored to the unique security requirements of each chain, creating redundancy.
  • Chain-Specific Quirks: Developers must adapt to each blockchain’s unique quirks, such as the recent Polygon (Matic) renaming, differing gas fee structures, network protocols, and chain-specific architecture. This adds friction and complexity to the development process.
  • Smart Contract Complexity: Managing several straightforward ERC-20 smart contract deployments can be relatively easy. However, once your smart contract relies on running keeper bots, monitoring onchain events, and requiring funding, it becomes impossible to handle—you’d need a dedicated person just to manage this.

Without native cross-chain interoperability, managing dApps across multiple chains isn’t just inefficient—it’s unsustainable. These pain points can significantly hinder the growth and adoption of dApps. This is why cross-chain interoperability is a critical area for innovation.

Enter Across—the ultimate solution for building native cross-chain interoperability.

Across Protocol Overview

Across Protocol addresses the key pain points developers face when implementing cross-chain functionality. Its unique approach optimizes cross-chain communication and handles the back-end execution processes across 13 supported chains on Ethereum’s Virtual Machine (EVM). This eliminates the need for multiple, separate deployments, empowering developers to focus on what matters—building dApps their users love to use.

But how does it work?

Across’s secret sauce lies in its Intents-based architecture. With Intents, users specify their desired outcome (e.g., transferring assets between chains), and Across handles the complex process of finding the best onchain path and executing it “under the hood.” This approach frees users to focus on their desired outcome instead of dealing with how to achieve it. Across accomplishes this with a robust, decentralized network of third-party Relayers who fill cross-chain transactions on behalf of users, removing all finality risk from the user’s plate.

For dApp developers, this means they can abstract away the intricate details of cross-chain logic to provide a seamless experience for their users. With Intents, the protocol optimizes transactions based on user preferences, minimizing gas fees, delays, and security risks.

Similar to how a traditional developer wouldn’t deploy on Azure and AWS, web3 developers shouldn’t have to deploy on multiple blockchains. It’s way too cumbersome to handle several deployments at once.

With Across, you only need to deploy on one chain to access cross-chain interoperability.

How to Build Cross-Chain dApps with Across

Across Protocol is designed to be developer-friendly. You can access a straightforward smart contract-based process and clear documentation to streamline cross-chain functionality. Whether you’re building a DeFi application or adding onchain features to a traditional application, the Across API gives you instant access to seamless cross-chain functionality with minimal effort.

Here’s a high-level guide on how to get started:

  1. Identify cross-chain actions for your dApp – Start by defining the specific cross-chain actions your application requires. These could include:
    • Transferring assets across chains.
    • Executing smart contract functions on multiple chains.
    • Facilitating cross-chain interactions for users (e.g., DeFi transactions, NFT transfers, etc.).
  2. Choose between the two integration approaches – Across provides two main methods for integrating cross-chain actions, depending on your application’s needs:
    • Generic Multicaller Handler Contract: Use this approach if you want to rely on a pre-built contract to handle cross-chain actions. The Generic Multicaller Contract is ideal for most use cases, allowing you to pass data across chains without building a custom handler.
    • Custom Handler Contract: If your application requires more specific logic or customization, consider implementing a custom handler contract. This allows you to define more complex cross-chain behaviors that are tailored to your dApp’s specific needs.
  3. Implement the Multicaller or Custom Handler – Based on your choice, you’ll need to either interact with the Generic Multicaller Handler or develop your Custom Handler Contract. Here’s a quick summary of both:
    • Using the Generic Multicaller Handler Contract: The multicaller allows you to package multiple cross-chain actions into a single transaction. By submitting these calls through the multicaller contract, you can execute them across chains in one operation. This approach is optimal for most applications that need standard cross-chain functionality.
    • Using a Custom Handler Contract: For more advanced dApps, you may choose to build a custom handler contract. This contract will implement the specific logic for how assets or data should move across chains. This option gives you full control over how transactions are validated, executed, and resolved.
  4. Set up the UI for cross-chain actions – Across provides a UI guide for embedding cross-chain actions directly into your application’s front end. The UI is designed to make cross-chain actions as seamless as possible for users by integrating into the dApp’s workflow. This reduces friction and allows users to move assets or execute functions across chains with minimal effort.
  5. Testing and Finalizing Integration – Before going live, ensure that cross-chain transactions work seamlessly across all supported chains. Whether you are utilizing the generic multicaller or a custom handler, you can deploy your dApp on a Testnet environment to test cross-chain actions.

Checklist for Testing:

  • Ensure asset transfers are executed correctly across multiple chains.
  • Validate that transaction data is properly passed and executed on the target chains.
  • Check for any inconsistencies in gas fees or execution times.

Across Protocol Features

Relayer and Liquidity Provider (LP) Network

Across Protocol operates a decentralized network of Relayers and liquidity providers (LPs). Relayers submit and execute cross-chain transactions on behalf of users, while LPs provide the liquidity needed to bridge assets across chains. This reduces reliance on centralized intermediaries and creates a more efficient, resilient system.

When a user initiates a cross-chain transaction, Across ensures it is executed quickly and securely, with Relayers competing to offer the best fees and speed. This also creates a more decentralized ecosystem, which is crucial for scaling the next generation of dApps.

Optimistic Oracle for Security

One of the biggest challenges in bridging solutions is security. Across addresses this by using UMA’s Optimistic Oracle, which secures transactions with minimal overhead. The Optimistic Oracle validates cross-chain transactions and resolves any disputes through economic incentives rather than computational power, improving efficiency and reducing costs.

This unique approach ensures that cross-chain interactions are secure and trustworthy without the need for heavy, expensive computations. Developers can integrate Across into their dApps with the confidence that their users’ assets and transactions are safe.

Low-Cost Gas Fees and Fast Transactions

Across Protocol sets itself apart from other solutions by offering dramatically reduced gas fees. Since it incentivizes Relayers to compete to offer the most efficient routes, Across ensures that cross-chain transactions are fast and cost-effective.

For developers, this means users experience near-instant finality for transactions, significantly improving the user experience and removing one of the biggest barriers to adoption in the Ethereum ecosystem.

1-Click Cross-Chain Actions

With Across, cross-chain transactions can be batched into 1-click experiences for users. By abstracting away the onchain processes from the user experience, Across enables dApps to provide simple and cohesive cross-chain user flows as smooth as Amazon’s 1-click checkout feature.

Research shows that user drop-off rates increase in correlation to the number of steps they must complete to accomplish their goal. Reducing the number of steps in your application’s user flows will effectively improve UX and increase user retention.

Use Cases

To illustrate the potential of Across Protocol, let’s explore a few real-world use cases that can benefit from integrating cross-chain interoperability.

DeFi Protocols

Decentralized finance (DeFi) applications can be restricted by the liquidity available on the chain they’re built on. By integrating Across Protocol, DeFi protocols can enable users to execute cross-chain deposits and transactions. This unlocks greater liquidity opportunities and empowers users to maximize their yield across multiple ecosystems without the need for manual bridging.

For example, Umami, a leading DeFi platform built on Arbitrum, recently integrated Across to provide their users with 1-click deposits into their yield-bearing vaults.

Native Interop for AppChains

With the advent of RaaS (Rollup as a Service) providers, it has become much easier for developers to deploy their own chains. Platforms like Gelato and Caldera allow you to easily create and deploy a Layer 2 (L2) blockchain in minutes. This has led to a rising trend in appchains—L2s that are designed and optimized to serve a specific dApp or use case. Unlike other L2s, appchains don’t aim to create a developer ecosystem, but only offer one dApp to their users. In turn, this means that they need interoperability from day one. If users can’t bridge to the chain or access a bridging mechanism baked into the dApp’s native UI, the dApp becomes useless.

For example, let’s consider an NFT marketplace with its own chain. By integrating directly with Across, developers can empower users to deposit funds to mint NFTs from any supported chain. Ideally, directly in the dApp so users don’t have to manually bridge themselves. This level of cross-chain freedom can expand an NFT marketplace’s reach and liquidity.

Web2 to Web3 Transition

For traditional developers interested in integrating web3 features, Across offers a simplified entry point into blockchain-based functionality. By handling the complexity of cross-chain transactions under the hood, Across frees developers to focus on building their applications while tapping into new web3-based markets. Whether it’s supporting cross-chain transfers or enabling crypto payments from multiple blockchain ecosystems, Across provides the infrastructure to bridge the gap between traditional and decentralized ecosystems.

“Across’ vision is simple: by leveraging Intents-based technology, we empower users to specify what they want to accomplish onchain, offload the technical complexities to third parties, and achieve their desired outcome in the most optimized way possible. This, in turn, allows developers to use Intents as the interface between their users and their application, providing an effortless cross-chain experience straight from their native UI.”

Ryan Carman | Product Manager at Across

Get Started with Across

The interoperable future is here. Users want to easily interact across multiple blockchains without the complexity, delays, or risks typically associated with cross-chain transactions.

Building applications with cross-chain interoperability is becoming the new standard for applications, particularly dApps. We urge developers to embrace the interoperable future and use this opportunity to get ahead of the curve.

Across Protocol makes it easy. Learn more and contact our team to get started here.

Related Categories