Particle Network 101: Developer Experience Edition
Table of Contents:
We’ve remarked on it often, and we’ll say it again: Particle Network sits at a unique spot in the Web3 ecosystem.
Serving end-users and developers, our mission is to make the experience of using Web3 as seamless as possible, providing developers with tools to create state-of-the-art dApps. And, by modularly combining a Wallet-as-a-Service (WaaS) stack with account abstraction, we have produced what we call Modular Smart WaaS, the flagship product of our infrastructure stack.
In this article, we want to give developers an overview of the simple process of integrating Particle Network within their dApps, highlighting our approach to Developer Experience. Our Modular Smart WaaS was created with this experience in mind: it minimizes the friction in integrating social logins, generating app-embedded wallets, and tapping into account abstraction, all through refined libraries that provide fast, seamless implementations without sacrificing integration depth.
Let’s go over Particle Network’s philosophy to development experience, what is available within Modular Smart WaaS, some examples of integrations, and how Particle Network compares to other solutions in the market.
Particle Network’s foundations
In building a general-purpose tool to fit any use case, from Web3 games to SocialFi dApps, we understand the fundamental need to combine the following:
- A focus on customization and flexibility –in our case, with modularity as a foundation– to accommodate all sorts of possible applications and use cases.
- Fully and swiftly embracing infrastructure changes and upgrades, such as account abstraction, to tap into the latest technologies.
- Pushing the boundaries of Web3 further by developing proprietary technology that allows for better, unseen solutions.
- Mantaining integration simplicity for developers, sustaining an accessible baseline for implementation
The above gave way first to Particle's Wallet-as-a-Service stack and then to us embracing account abstraction to produce Modular Smart WaaS. It also birthed the idea of a comprehensive, expansive ecosystem surrounding it, which we’ll discuss later.
First of all, what is Modular Smart WaaS?
Before diving into Particle Network’s developer experience, it’s important to have a strong gasp on this cornerstone of our ecosystem. This information will then allow us to delve into the specifics of our implementation process.
Modular Smart WaaS allows developers to use MPC-TSS and social logins to enable non-custodial, dApp-embedded wallets accessible through users' Web2 accounts. It also empowers them to natively tap into ERC-4337 account abstraction for a seamless, flexible experience.
In the pursuit of creating an ecosystem where developers are true stakeholders in the network’s success, these tools are 100% free to use, setting up the stage for a system that eventually captures, accrues and distributes value.
The below diagram breaks down the different components of Modular Smart WaaS.
Furthermore, thanks to Particle’s multiple integrations and partnerships, developers leveraging Modular Smart WaaS can modularly tap into a wallet infrastructure with solutions for:
- Cross-chain bridging
- Customization
- Interoperability
- Fiat on/off-ramps
- Swaps
- API endpoints for contract locking, retrieving logs, token management, analytics, DeFi interactions management, marketplace compatibility, etc.
Crucially, all of the aforementioned functionalities are enabled by two SDKs –Auth and AA–, which developers can integrate in under 30 lines of code.
Account abstraction within Modular Smart WaaS
As a native AA implementation, Smart WaaS features support for ERC-4337 account abstraction on the user and developer side. In this design, an EOA is still the Signer for a smart account, but the assignment and unification of these two accounts are handled by Particle. End-users have the possibility of choosing whether to utilize an EOA or smart account within the wallet itself, and their smart accounts are also constant across applications that use Particle’s tech stack. All users have associated smart accounts that developers can tap into for full-stack AA directly through our AA SDK.
Particle’s AA-SDK also enables standard mechanisms of interacting with smart accounts programmatically –such as constructing and sending either singular or batched UserOperations, managing session keys, smart accounts, and other core components of the AA stack; all accessible directly by our SDK. This results in a short path to to using AA powered by social logins, often requiring less than 20 minutes.
dApp developers can also approach AA modularly within our tech stack, plugging into their choice of smart account implementations, Bundlers, Paymasters, etc. with ease. Particle, as a WaaS provider can also be plugged into any initial/onboarding point within AA applications, even if they don’t natively use our AA SDK. As such, even non-native AA applications can use Particle’s WaaS for onboarding. This completes a completely customizable development experience for native and non-native applications alike.
Below, you can see a breakdown of Particle Network’s AA ecosystem. Note that we have also developed a proprietary Bundler and cross-chain Paymaster:
To round out the picture, Particle’s native modular AA support (via a native SDK, Particle’s RPCs, etc.), while powerful on its own, is also innately cross-compatible with other AA stack providers thanks to Particle’s foundation as a WaaS tool.
Below, you can see a breakdown of Modular Smart WaaS’ native and external implementations:
Modular Smart WaaS is architected with developer experience in mind. As such, developers can plug into the modules they find convenient for the specific purposes of their applications.
After this overview of Particle Network’s technology stack, let’s take a look at examples of integration flows.
Developer experience: Effortlessly integrating with Particle Network
Within a general-purpose solution such as a WaaS tool, developers can make their applications much more accessible and reduce entry barriers. However, the friction (or lack thereof) in integrating these tools can be a determining factor.
Developers integrating Particle Network can start using social logins in a matter of minutes thanks to two user authentication modules streamlining the wallet creation process: Particle Auth and Particle Connect.
Particle Auth enables end-to-end authentication and interaction component with Particle WaaS, powering wallet creation and management via social logins. Particle Connect, on the other hand, is the SSO for Web3; aggregating both Web2 and Web3 onboarding options in a unified custom connection modal. This last point is showcased below:
Particle Network has a suite of over 60 API endpoints and 32 SDKs, the latter of which are spread across nine different platforms. Integrating Particle Network's Wallet-as-a-Service solutions through these various SDKs and APIs is meant to be as simple as possible while retaining a high degree of customizability and fundamental flexibility. Particle Auth and Particle Connect both have extensive web support, with web being the most popular platforn. Getting started often takes less than five minutes or 20 lines of code.
To demonstrate how cut-and-dry integrating with Particle Network is, the next section will showcase the process of integrating Particle Auth for both desktop and mobile devices. Further guides can be found in our documentation.
Integrating Particle Network’s Particle Auth
Particle's Modular Smart Wallet-as-a-Service has over 32 SDKs, many of which are specific to integrations within web applications.
Available across seven different platforms and six different languages, Particle Auth aims to be a universally accessible means of integrating Particle's WaaS within any Web3 application, enabling Web2-adjacent onboarding and embedded wallet interaction.
To begin integrating Particle Auth for desktop dApps, you only need to:
- Sign up on the Particle dashboard.
- Create a project and application.
- From the dashboard, obtain the project ID, client key, and app ID.
- Install Particle Auth Core (@particle-network/auth-core-modal).
- Add five lines of additional code to your index file. Below is an example of what the index file should look like after these additional lines:
import React from 'react';
import ReactDOM from 'react-dom/client';
import { AuthCoreContextProvider } from '@particle-network/auth-core-modal';
import App from './App';
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<AuthCoreContextProvider
options={{
projectId: process.env.REACT_APP_PROJECT_ID,
clientKey: process.env.REACT_APP_CLIENT_KEY,
appId: process.env.REACT_APP_APP_ID,
}}
>
<App />
</AuthCoreContextProvider>
</React.StrictMode>
)
After this, developers can immediately begin using the features pertaining to social login, direct chain interaction (data read/write), etc.
Mobile integrations
Particle's Wallet-as-a-Service has SDKs across Android, iOS, Unity, Flutter, and React Native.
For mobile systems this process is roughly the same as for web, although with differences depending on the specific platform. The implementation flow of the associated services (Particle Auth, Particle Auth Core, Particle Connect, and the Particle AA SDK) varies significantly based upon the specific platform. It generally requires developers to:
- Sign up on the Particle dashboard.
- Create a project and application.
- Pull the project ID, client key, and app ID.
- Install Particle Auth / Auth Core.
- Configure your project
- Initialize Particle
The resulting initialization will look like one of the following snippets, depending on the platform:
// Android
ParticleNetwork.init(this, Env.DEV, EthereumChain(EthereumChainId.Mainnet))
// iOS
let config = ParticleNetworkConfiguration(chainInfo: chainInfo, devEnv: devEnv)
ParticleNetwork.initialize(config: config)
// Flutter
ParticleAuth.init(Ethereum.mainnet(), env);
// Unity
ParticleNetwork.Init(ChainInfo.Ethereum);
// React Native & Cocos
particleAuth.init(chainInfo, env);
Leveraging account abstraction through Particle Network
Similarly, using AA with Particle’s SDKs is also quite simple. To do so, developers only need to:
1. Set up Particle Auth following the above process.
2. Add the following code snippet to their primary App component (or the equivalent within their React app):
const smartAccount = new SmartAccount(provider, {
projectId: process.env.REACT_APP_PROJECT_ID,
clientKey: process.env.REACT_APP_CLIENT_KEY,
appId: process.env.REACT_APP_APP_ID,
aaOptions: {
simple: [{ chainId: EthereumGoerli.id, version: '1.0.0' }] // chainId referring to your chain of choice
}
});
The above makes it possible to either call functions on smartAccount directly, such as buildUserOperation, signUserOperation, sendUserOperation, sendTransaction, getAddress, etc. Developers can also create a custom ethers object in which transactions will be automatically routed as UserOperations:
const customProvider = new ethers.providers.Web3Provider(new AAWrapProvider(smartAccount), "any");
And, to define specific fee payment mechanism:
const customProvider = new ethers.providers.Web3Provider(new AAWrapProvider(smartAccount, SendTransactionMode.Gasless), "any");
Comparing our developer experience to other solutions'
Besides native AA support and integration richness, Particle also stands out in other areas we consider critical for developer and end-user experience, such as security. These areas are:
Private key management (security)
Particle Network uses a 2/2 advanced TSS approach that ensures that the private key's security is never concentrated in a single location or entity throughout its lifecycle. This involves generating the key split into two independent shares, stored separately, ensuring that each share reveals nothing about the full key. Of these shares, one is stored locally by the user, and the other by Particle’s Trusted Execution Environment. All cryptographic operations are performed without combining these shares.
Particle also allows the user to create a Master Password, is used to encrypt their local key fragment, which can then be stored safely. This enables users to restore their wallets across devices with complete security. An ongoing key share refresh mechanism also reinforces the system's robustness, improving security and making an attack virtually impossible.
The above, compared to other solutions (particularly those relying on KMS or SSS systems) enhances security and ensures no single party has full control over the secret, and that it does not ever exist in full in any one place. In WaaS, this also ensures that no third party ever can spend users’ assets, providing the highest security when properly implemented while avoiding the complexities or custodianship of a hybrid approach.
Developers integrating solutions based on other approaches should be mindful of centralization and custodial risks. In SSS, for example, the secret must exist in whole at its generation and again every time it is reassembled. This opens attack vectors, as an attacker could focus on the reconstruction points to take possession of the secret or attempt to attack the storage entity. Activities such as signatures require frequent usage, increasing the attack opportunities and potential reward for an attacker, who could obtain a user’s private key, even unbeknownst to them, resulting in high risk.
Performance
When it comes to WaaS tools, different providers might perform differently in different areas. Two key areas to analyze are the time to generate a wallet (from the time a user clicks “Connect” to the wallet being usable), and the time for repeating users to log in. The underlying management systems of each solution can impact these performance metrics.
To showcase this, we measured the time that different WaaS tools take to create a Web3 wallet using authentication through Google:
Metrics such as time-to-onboard can be the difference between a lost and a captured user and, even when the difference is negligible, it’s key to have this in mind when developing using WaaS.
Ease of use
In general, Particle has made an effort to differentiate itself, creating tools that remove all friction from the WaaS integration experience. Some of these are:
- Becoming 100% free to integrate for developers.
- Out-of-the-box working integrations without mandatory further customization or configuring.
- No domain whitelisting requirements.
- A straightforward, intuitive configuration flow.
- No gated features.
The above stems from our developers-first philosophy, and allows Particle Network to pride ourselves in receiving continuous positive feedback from developers and partners.
Conclusion and notes on Particle Network’s ecosystem and evolution
With a continued focus on building a deeply intertwined, synergetic ecosystem driving Web3’s adoption, empowering developers to create better products, and streamlining user experience across the board, Particle is expanding its product offering. Our vision begins with an understanding that, for Web3 to continue accelerating and attracting creativity and talent, our ecosystem must solve the infrastructure and design constraints holding it back.
As such, we set out to create an ecosystem that could align these values and create incentives for all stakeholders. To unify these concepts and bring them to life, we conceptualized a transition to a token-centric economic model, powered by a unique technology stack.
With this goal in mind, and with Modular Smart WaaS already in the market, we saw that the next evolutionary step in our mission was to build the infrastructure to make Web3 interactions easier for developers and end-users alike. If you made it this far in this article, and are equally excited about what’s to come, we invite you to begin integrating Particle Network and check out our documentation
We’ll be posting more news on the release of new features very soon!
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 powers chain abstraction, addressing Web3's fragmentation of users and liquidity. This is enabled by Particle's Universal Accounts, which give users a unified account and balance across all chains.