Getting Started: Chain Abstraction
Chain abstraction is the idea that users should not have to interact directly with blockchains. As a design philosophy, it improves the multi-chain user experience by enabling seamless interaction with assets and services across different blockchains, allowing a given user to access the benefits of the multi-chain without necessarily needing to understand all of the underlying complexity. Agoric helps developers achieve chain abstraction with its Orchestration API, which enables devs to create simple, intuitive user experiences for navigating the multi-chain ecosystem.
What is Chain Abstraction?
Chain abstraction is a key part of the evolution of the user experience in the multi-chain ecosystem. Put simply, chain abstraction is when the everyday user can conduct intricate, multi-chain actions seamlessly and without necessarily having to know what chain they are on at any given point; the chain is simply abstracted away.
The success and proliferation of appchains, rollups, and other scaling solutions today has made it so users typically must manually manage assets across these networks, with the unintended side effect that the user experience has grown more complex. This tendency of the current blockchain environment has led to a phenomena called chain chaos, where due to the diversity and abundance of chains, users must grapple with fragmented liquidity, actively shephard their assets across chains, and in general must possess a good understanding of how each chain functions and their respective ecosystem of applications and services.
Many in the blockchain space are trying to alleviate the problem of chain chaos by offering chain abstraction solutions. The goal is to give developers the ability to offer users simple, intuitive experiences, such as 'clicking a button' to conduct activities across the varied ecosystem, like swapping tokens, staking, lending, borrowing, and managing portfolios across chains. The chain abstraction layer handles the intricate details behind the scenes, such as bridging assets and communicating with different blockchains, with the benefits accruing to the user.
As Agoric CEO Dean Tribble explains, "What users want is seamless access to multi-chain liquidity… when you order a hamburger with an application on the phone, you don't care which cloud system the application is running in. You just want your hamburger delivered."
To help developers build applications that realize this vision of chain abstraction, Agoric offers the Orchestration API.
Realizing Chain Abstraction: Orchestration API
To help developers realize chain abstraction and take the edge off of chain chaos, Agoric offers the Orchestration API. This is a tool for developers to easily program and coordinate the activities of assets and services across multiple, disparate chains. From the perspective of the user, when cross-chain activities are orchestrated automatically, the need for manual intervention is reduced, and ultimately, the chain is abstracted away.
Orchestration is the developer’s solution to build multi-block action sequences by handling the asynchronous and timer-based cross-chain messaging required to do so behind the scenes, while taking advantage of IBC to achieve interoperability. Moreover, the Orchestration API is written in JavaScript, the native language of the Agoric smart contract platform. This means developers can code in an environment they're comfortable with without having to get up to speed on the low-level details of each blockchain.
Altogether, the Orchestration API offered by Agoric abstracts away many of the complexities faced by developers building multi-chain applications, empowering them to focus on the end user experience. Orchestration ultimately enables the creation of unified cross-chain products and services that weren't previously practical to build.
By creating an Agoric contract and importing the Orchestration API into their projects, developers can access straightforward calls for specific cross-chain functions, such as:
Sending tokens cross-chain
Creating accounts on remote chains
Perform cross-chain actions through remote accounts
Get notified of state changes on remote accounts
See what you can build with orchestration, read: Five Multi-Chain App Designs
Putting Chain Abstraction into Practice with Orchestration
Chain abstraction enables accessible multi-chain applications, where the degree of user intervention would otherwise be high, and which are susceptible to chain chaos. To see how the principles of chain abstraction and Agoric’s orchestration tools can be critical solutions for multi-chain apps, let’s look at two possible use cases: multi-chain vaults and multi-chain stake managers.
Multi-Chain Vaults:
Multi-chain vaults benefit from the principles of chain abstraction by simplifying the user experience and reducing the time and effort required to lock assets and access liquid staked tokens across different chains. Agoric's Orchestration API plays a crucial role in achieving this abstraction by automating complex cross-chain actions, such as querying available vault options, initiating staking, and minting liquid staked tokens. Users are thus able to select a vault and set the desired amount of assets to be locked with just a few clicks.
By abstracting away the underlying complexities, multi-chain vaults provide a simpler and more efficient way for users to manage their assets across multiple chains.
Multi-Chain Stake Manager:
Similarly, multi-chain stake managers that achieve chain abstraction allow users to easily compare and access staking opportunities across different networks without needing to navigate multiple interfaces, or perform complex cross-chain transactions manually. Agoric's orchestration tools, particularly those that enable sending contract logic beyond a token's arrival at its destination, enable developers to create stake manager applications that abstract away the intricacies of moving assets across chains. Users can view and compare staking rewards and conditions across various networks from a single interface, and then initiate staking positions with minimal effort.
Example multi-chain staking with orchestration from the Calypso app.
Other examples abound, including multi-chain stablecoin yield maximizers, multi-chain swap aggregators, multi-chain liquidators, and more you can read about here.
In these use cases, we find that chain abstraction and the orchestration tools that enable it help developers build user experiences resembling something closer to Web 2.0, with uniform entry points, few clicks, and a lot of automation in the background. This lowers the barrier to entry for both users and developers coming from Web 2.0 who are accustomed to this frictionless standard in web applications.
—————
Stay on the cutting edge of web3 development. Subscribe to the Agoric Developer Newsletter for more on chain abstraction, orchestration, and multi-chain design.
Join us to learn more about orchestration in person around the world, or online at a Welcome to Agoric session!
Want to be the first to try the Orchestration API? Complete the Getting Started tutorial and let us know about your experience on Discord. Our DevRels are happy to help!