Chain Abstraction
Chain Abstraction is a feature in Reown AppKit that enables dApps to facilitate seamless cross-chain transactions for users. It allows users to spend crypto tokens, such as stablecoins, across different blockchain networks without needing to manually bridge tokens, worry about network-specific tokens, or manage multiple wallets.
Chain Abstraction is currently an early access feature.
Chain Abstraction Demo
Demo
Want to see Chain Abstraction in action? Try out the live demo to experience Reown AppKit’s Chain Abstraction flow firsthand.
When can you leverage Chain Abstraction?
-
Seamless Cross-Chain Transactions: Users can transact on a target blockchain network even if their assets reside on a different source network. For example, a user can make a payment on the Base network using USDC held on Arbitrum.
-
Enhanced User Experience: By abstracting the complexities of cross-chain interactions, dApps can offer a more intuitive and frictionless experience, reducing the need for users to understand or manage the underlying blockchain infrastructure.
-
Developer-Friendly Integration: Reown AppKit provides a set of tools and methods, such as prepare and execute, that allow developers to integrate chain abstraction functionality into their dApps with minimal effort.
How It Works
-
Transaction Preparation: When a user initiates a transaction, the dApp uses the prepare method to determine if the user has sufficient funds on the target network. If not, it identifies the necessary bridging transactions required to move assets from the source to the target network.
-
Transaction Execution: Once the necessary transactions are prepared and signed, the execute method broadcasts them, handling the bridging process and completing the original transaction on the target network.
-
Gas Estimation Handling: To ensure accurate gas estimation, dApps should pass gas: null when sending transactions, allowing the wallet to handle gas calculations appropriately.
Networks and Assets Supported
Currently, Chain Abstraction on AppKit supports the following assets on the following networks:
Network | Assets |
---|---|
Optimism | USDC, USDT, ETH |
Arbitrum | USDC, USDT, ETH |
Base | USDC, USDS, ETH |
Solana | USDC |
Example Use Case
Consider a scenario where a user wants to purchase an NFT on the Base network but holds USDC only on the Arbitrum network. With Chain Abstraction:
-
The dApp detects the asset location and prepares the necessary bridging transactions.
-
The user signs the transactions, and the assets are bridged from Arbitrum to Base.
-
The purchase is completed on the Base network without the user manually bridging assets or switching networks.
You can try out this use case in the demo above.