Agoric’s upcoming Orchestration API is a tool to help developers build seamless applications out of disparate interoperable chains and services. Today’s Web3 users have to spend too much energy worrying about what chain their liquidity lives on and too much time interacting with protocols that were never meant to be user-facing. This is the equivalent of Doordash making a user manually query their database from the command line to find an available delivery driver and then log into their bank account separately to send payment to the restaurant.
Building seamless user experiences is a difficult problem to solve because even though different chains and services are interoperable, assets and information still require manual intervention when multiple networks and transactions are involved. Let’s look at some examples of multi-chain application concepts to show how orchestration improves both the user and developer experience.
1. Multi-chain Stablecoin Yield Maximizer
Capturing interest on stablecoins like USDC, IST, or DAI has become a cornerstone of many DeFi strategies. Several of the most attractive interest rates available come from depositing these stablecoins with protocols like Maker, Shade, or Inter Protocol. But identifying the best interest rate is only half the battle; if you have to swap your stablecoins across blockchain borders (like from Cosmos to Ethereum), reaching your destination could entail anywhere from three to five transactions across two or three different wallets, a DEX, and one or two bridges. As Noble CEO Jelena Djuric said, “We assume that because people are super excited to ape into the next thing that they'll just deal with the friction points and be okay with it, but that's actually not the case.”
With Agoric Orchestration, all of these steps can be accomplished within the same interface with only a single signature required from a user. Using USDC as an example, here’s what happens under the hood:
User deposits USDC into the Stablecoin Yield Maximizer application
Smart contracts within the application use interchain queries (ICQ) to find latest lending rates throughout the 70+ IBC-connected chains
The contracts then deposit the user’s USDC into the highest yielding protocol
Using on-chain timer services, the application periodically assess rates and rebalances
The user gets the best rate available and rewards are harvested without recurring manual labor
The cross-chain approach enabled by Orchestration introduces efficient capital allocation, as users can seamlessly move their stablecoins to whichever chain offers the highest yield at any given time without being restricted by the limitations of a single blockchain. Agoric’s native on-chain timers and async execution make it easy for devs to build a Stablecoin Yield Maximizer that automates the entire process so users can pick a strategy, set it, and forget it while it executes on-chain.
2. Multi-Chain Vaults
In DeFi, vaults are a strategy for locking a given asset into an application that can deploy auto-compounding strategies for the principal token. For example, you can use Inter Protocol to lock up assets like ATOM or stTIA to borrow IST against your deposit. These mechanisms are becoming ubiquitous pillars of DeFi across multiple ecosystems, but the time and effort required to turn liquid capital into an asset that can be deposited and minted against can cost the user time and resources.
Instead of moving a token from where a user has it to another chain in order to do something, a cross-chain vault lets a user lock up the asset on its native chain and access a liquid staked token on a new chain to trade the rights to it without the original asset ever needing to move. Cross-chain vaults will work with NFTs as well, a feature used in the upcoming Crabble application.
A cross-chain vault application could use interchain queries to return a list of currently available IBC-connected vault options. With one click, a user can select a vault, and with a second click, set the desired amount of available assets on the native chain to be locked up. The multi-chain vault application accesses the user’s Interchain account on the destination chain to initiate staking, awaits confirmation that the tokens are staked, and once confirmed, asynchronously mints the LST for the user, all in the background. The Orchestration API makes it easy for a dev to include all of that functionality for execution after the user signs a single signature.
3. Multi-Chain Stake Manager
Many of the most popular tokens today allow their holders to stake on the native chain for security, governance, or generating rewards. Reallocating capital from a staked asset on one chain to a staked asset on another, however, remains a cumbersome, complicated process. Managing multiple staked token positions, or actively managing one that rotates assets frequently, is even more challenging. By integrating with various blockchains, a multi-chain stake manager application allows users to access and compare staking rewards and conditions across different networks, then move into a position from a single interface, enabling them to make informed decisions and maximize their returns.
If a user wants to use an EVM asset (like ETH) to take advantage of an opportunity on another chain, like staking TIA on Celestia for example, that journey could be as many as four different blockchains and entail multiple wallets, bridges, and swaps across as many (if not more) transactions and applications.
There are existing cross-chain capabilities that can get part of the way there, but they hit a wall when they need to string together multiple complex actions. In the multi-chain staking case, the core challenge occurs when the EVM asset reaches the Cosmos chain to be staked because most transportation layers like bridges or Axelar GMP have trouble sending contract logic beyond a token’s arrival at its destination.
Agoric Orchestration allows a contract to receive the acknowledgement and drive the staking action; existing tools until now have required additional signatures by the user. This makes it easier for devs to build multi-chain staking applications that abstract away the complexity of these transaction flows.
See how Calypso is powered by Orchestration.
4. Multi-Chain Swap Aggregator
Thanks to technologies like Squid Router, Skip Protocol, and DEX aggregators like 1inch or CoW Swap, platforms that help users find the most efficient trade route between two assets or transfer route between two blockchains are becoming invaluable tools for helping users and developers alike keep costs low and maximize the efficiency of their transactions.
Where current swap aggregators increase access to liquidity, improve transaction cost efficiency, and simplify the user experience (among other benefits), a cross-chain swap aggregator would do the same but at a scale that can be an order of magnitude higher than what a single DeFi ecosystem could offer. Improved interoperability with more blockchains can help platforms like Skip or Squid provide even better experiences for their users than what they already have.
5. Multi-Chain Liquidator
Liquidations are when a borrower’s collateral is sold to repay a loan if the value of the collateral asset falls below a certain point. They are essential for risk management, incentive alignment, and platform liquidity for lending markets like UX Chain. Multi-chain borrowing and lending is still in its infancy because cross-chain auctions are a difficult problem to solve, preventing devs from building effective cross-chain liquidation mechanisms.
With the Orchestration API, you could build a cross-chain liquidator that can automatically detect positions eligible for liquidation and act on them at the most opportune times, allowing for more dynamic and efficient collateral management. By interfacing with automated market makers across different networks, the liquidator ensures that collateral is sold for the best possible price, maximizing recovery values and minimizing losses. Once the liquidation process is complete, the proceeds are directly sent to the liquidator's recipient address, streamlining the process and reducing the potential for errors or delays. Effective cross-chain liquidations would allow platforms like UX Chain to support robust multi-chain lending markets.
The Orchestra Plays On
The fact that any of these transaction paths are possible using entirely decentralized services in the first place is a testament to how far interoperability in web3 has come in recent years thanks to products like IBC, Axelar GMP, Circle CCTP, Gravity, or Wormhole (to name a few). The next step is making all of these incredible services accessible for developers through the Orchestration API to make it easier for users to take advantage of the best web3 has to offer.
Sign up for our newsletter to be first to try the orchestration API at launch, and follow the Agoric Events Calendar to catch Dean IRL explaining how Agoric will help unite the $2.7T multi-chain ecosystem (as of publish date).
Head to our Orchestration page to learn more about how you can build intricate multi-chain applications with Agoric.
Don’t miss an update: connect with Agoric on Discourse, Discord, X, LinkedIn, and Telegram, and subscribe to our newsletter.