Universal Accounts: UX, DevX, and Technical Implementation

Universal Accounts: UX, DevX, and Technical Implementation

Table of Contents:

Web3 is at a turning point in its goal to deliver decentralized solutions to the masses.

The scalability problems that bugged our ecosystem for years led to the independent development of a myriad of L1, L2, and even L3 solutions. This has brought along secure, fast, and cheap blockchains, each with functional dApp ecosystems of their own… but at the trade-off of fragmenting the overall user base, liquidity, and user experience of Web3.

As more blockchains launch and grow their ecosystems, users' accounts and balances are growingly spread across them. This turns the experience of using the overall ecosystem and leveraging dApps residing in different chains into a costly, time-consuming one, where asset management takes most of users’ time.

Particle Network aims to tackle these problems through account-level chain abstraction, brought to users via Universal Accounts. These accounts create a unified UX, agnostic to any specific blockchain, giving the user the ability to deposit and use their funds transparently across blockchains as if they were interacting with a single chain. In this article, we’ll expand upon these Accounts’ technical foundation, User Experience, and how developers will be able to integrate them into their applications.

User Experience

As mentioned above, Universal Accounts provide users with a single address, balance, and interaction point across every blockchain. Technically speaking, Universal Accounts are specialized Smart Contract Wallets that aggregate token balances across all chains by automatically routing and executing atomic cross-chain transactions, pooling funds together to meet the conditions of a given operation. This allows users to spend their assets across all chains while paying for gas in any token.

The process of creating a Universal Account is as simple as connecting a wallet (either through social logins using Particle Network’s Wallet Abstraction or a regular Web3 wallet, such as MetaMask, UniSat, Keplr, etc.) and depositing assets into it. These accounts do not require users to handle a private key, as they are for all purposes extensions of the user’s existing wallet, which they can use to sign into a Universal Account.

Universal Accounts live on the Particle Network Testnet, with the first implementation of Universal Gas.

Universal Accounts give users a single interface across the EVM and non-EVM ecosystem. They also allow users to complete complex multi-step transactions on any chain with only one signature, allowing them to save time and resources.

The following example walks through a practical application of using a Universal Account:

  1. A user finds an NFT in Chain D that they want to purchase. It costs $300 (priced in ETH).
  2. The user currently has assets on different chains. They hold 100 $USDT on Chain A, 100 $USDT on Chain B, and 100 $USDT on Chain C. 
  3. Since the user is on a Universal Account and can see their unified balance, they simply click “Buy” and sign the transaction.
  4. Particle Network’s Universal Liquidity automatically pools the balances of all chains as if they were one and executes the transaction. The user can then choose which of their existing assets (USDT, USDC, ETH, etc) they want to use for paying gas.

How is this possible? Technical implementation

As previously discussed, Universal Accounts are based on an Omnichain Smart Contract Wallet, where code logic and state storage are separated. This separation allows for central state management across various chains. 

To synchronize states across chains, Particle Network uses its Master Keystore Hub module as a central source of truth. Thanks to this, smart accounts, which typically suffer from a lack of state parity due to their nature as independently deployed and updated contracts, are synchronized with every state change. Such state changes include alterations to account signer, session keys, the addition of modules, and so on. The state present within the Master Keystore Hub, such as the signer of an account or its modules, is the same state used across all deployed instances. When an update is needed, regardless of the chain from which it originates, the Master Keystore Hub will work alongside Particle Network’s Relayer nodes to update other deployments.

Role of the Master Keystore Hub in cross-chain transactions.

Furthermore, the system uses a Merkle Tree for its signature design, which is independent of any blockchain. This chain-agnostic signature design ensures that, regardless of the complexity or number of transactions being executed, users need to sign only once, authenticating transactions across multiple blockchains and making the process more efficient and user-friendly. In addition to this, transactions, otherwise known as UserOperations, are bundled together and executed atomically –further reducing gas costs and the amount of time it takes for a sequence of operations to complete.

Universal Liquidity

To maintain a single balance and address across chains, Universal Accounts tap into Particle Network's Universal Liquidity. Universal Liquidity is enabled by a distributed network of Bundler nodes, which execute any operations necessary on any chain (such as token swaps and interactions with Liquidity Providers) to achieve the user’s goal. As a result, users use their token balance across all chains, interacting with new chains without holding tokens on them.

For example, in transactions requiring a movement on chains in which a user has no funds, Universal Liquidity will automatically pull funds from the user’s balance on chains where the user has assets. This also enables Universal Gas, which will be covered shortly. All transactions are settled through the Particle Network modular L1, which ensures the security, decentralization, and successful sequential execution of these operations.

To illustrate Universal Liquidity, let's consider the example above, where a user wants to seamlessly purchase an NFT priced at $300 in ETH on Chain D using a balance equally distributed among Chain A, Chain B, and Chain C. Under these conditions, Universal Liquidity will perform the following operations:

  1. By clicking “Buy”, the user bundles UserOperations involving five chains (Chain A, B, C, D, and Particle Network) into a single signature processed by the Particle L1. 
  2. Upon the execution of the aforementioned signature, the USDT on Chains A, B, and C is exchanged for an intermediary token, e.g. USDC, using the corresponding chains’ DEXs (Decentralized Exchanges).
  3. The USDC from Chains A, B, and C is sent to a Liquidity Provider (LP).
  4. The LP releases the full USDC amount on Chain D.
  5. The USDC on Chain D is exchanged for ETH using a DEX on Chain D.
  6. The ETH on Chain D is used to purchase the NFT.
💡
Note: For the sake of illustration, we’ve included the process of underlying swaps within this flow. However, operations including tokens that can be used for intermediary purposes (e.g. USDT) may not require swapping.

In other words, the user engages in an atomic swap with the LP, exchanging their assets for the LP's intermediary token, which is then transferred to the LP. The LP then releases the intermediary token on the target chain (Chain D), which is exchanged for the target asset on the target chain and used for its intended transaction. The LP in this context is not a traditional DEX LP providing liquidity for token pairs; rather individual providers who earn a small fee for every trade by facilitating the transportation of the intermediary token (e.g., USDC) across different chains.

The above process is diagrammed in a generalizable fashion below:

Utilizing multiple assets from different chains with Universal Liquidity.

Within this process, the two remaining core modules of Particle Network are engaged:

  • Decentralized Bundler: A network of distributed Bundler nodes used to initiate UserOperations on external chains, such as performing a DEX swap or purchasing an NFT.
  • Decentralized Messaging Network: Monitors whether UserOperations on external chains have been executed successfully, and then settles the execution status on our L1. This involves a network of decentralized Relayer nodes, tasked with monitoring external chain events and the settlement of state events using Hyperlane’s messaging protocol.

Abstracting the complexities of gas payments: Universal Gas

Universal Accounts also give users the ability to leverage Universal Gas, which solves the problem of users needing to hold multiple gas tokens (ETH, MATIC, BNB, etc.) to pay for gas across different chains. With Universal Gas, users can pay for gas in any token across all chains.

Universal Gas leverages Universal Liquidity and is implemented through an Omnichain Paymaster. Particle Network's native token, $PARTI, acts as a crucial exchange medium within this system, ultimately settling all gas fees in this token. 

Mechanically, users pay the Paymaster in the token of their choice for the equivalent value of $PARTI consumed within their UserOperations. As mentioned above, Bundler nodes are responsible for sending transactions to their target chains for execution.

This is exemplified in the diagram below:

Universal Liquidity workflow.

Within Particle Network’s Testnet, a primitive version of Universal Gas is implemented, as shown in the picture below. Within this implementation of Universal Gas, users manually deposit assets from different chains (Testnets) to then be used as Universal Gas Tokens. This can be seen below:

Particle Pioneer’s Universal Gas deposit system.

How can developers leverage Universal Accounts?

As an account-level chain abstraction solution, developers can integrate Universal Accounts (and therefore chain abstraction) without tailoring their dApps specifically for this purpose.

To begin leveraging chain abstraction, developers simply need to integrate Particle Network’s Universal SDK, which makes it possible for a user to create or use a Universal Account attached to their chosen wallet. Programmatically, this is represented through the assignment of an EIP-1193 provider within a library such as Ethers, Web3.js, etc. Upon signing in, users can immediately fund or begin using their Universal Account for transactions.

The onboarding process within an application leveraging Particle Network’s Universal SDK is as follows:

  1. A user onboards through a typical connection mechanism, such as RainbowKit, and connects their wallet.
  2. A Universal Account is (optionally) loaded or assigned to their wallet. The SDK handles this by providing an EIP-1193 provider object that automatically routes transactions through their Universal Account.
  3. The user is presented with this account and its balances either through an embedded wallet modal or through a custom interface built by the application.
  4. Finally, transactions can be executed normally –as leveraging Universal Accounts does not interfere with the application’s existing functionalities. Users can now enjoy all the advantages of Universal Accounts.

The Universal SDK can be enabled in as little as twenty lines of code. Currently, Particle Network’s AA SDK is the closest representative of what this flow will look like programmatically. An example of this can be found here.

Onboarding a user into a Universal Account

Furthermore, developers that have already integrated either of Particle’s Wallet Abstraction services (Modular Smart Wallet-as-a-Service and BTC Connect) for either social logins or account abstraction in the EVM and BTC ecosystems will have all their users leveraging Smart Accounts automatically upgraded to Universal Accounts. Particle Network’s Wallet Abstraction SDKs will feature an update allowing for this upgrade, allowing users to immediately begin using the properties of Universal Accounts without migrating funds or adapting to a new address.

Conclusion

As sovereign chains continue to proliferate, solutions like Universal Accounts will be critical for maintaining Web3's core values of interoperability and openness while unlocking a new frontier of usability and accessibility for Web3. Along with Universal Gas, we expect these services, provided by our modular L1, to finally remove the major bottlenecks hampering Web3 adoption today.

Ultimately, Particle Network aims to pioneer a new paradigm that transcends the fragmented infrastructure of today’s reality. With chain abstraction solutions like Universal Accounts operating seamlessly under the hood to provide familiar interfaces for users and enhanced accessibility for dApp developers, widespread Web3 adoption is poised to flourish.


Particle Network's Wallet Abstraction solutions are 100% free for developers and teams. By integrating them, you can set your project in a path to leveraging chain abstraction.


About Particle Network

Particle Network Logo

Particle Network is addressing Web3's fragmentation of users and liquidity through Universal Accounts. Particle's chain abstraction is powered by a Cosmos SDK L1 blockchain enabling the experience of a single account, balance, and address that can be used across all chains, allowing users to interact with any dApp and pay gas with any token.

Website | Docs | Discord | Twitter

Share this article

About the author(s)

Carlos Maximiliano Cano

Carlos Maximiliano Cano

Particle's Content Manager. He's been in Web3 since 2017, collaborating with technical and marketing teams in crowdfunding, research, DeFi, privacy, and zero-knowledge proofs.
Ethan Francis

Ethan Francis

Denver, Colorado
Accelerating Web3 adoption