What is Factory?
A Factory is a smart contract responsible for deploying smart wallets under the ERC-4337 framework. It leverages the CREATE2 opcode to generate deterministic wallet addresses, ensuring that a wallet’s address remains consistent across different chains, regardless of when it is deployed.
Factories play a crucial role in Account Abstraction, simplifying wallet creation, ensuring cross-chain compatibility, and optimizing gas efficiency.
How Factories Work in ERC-4337Copied!
In ERC-4337, Factories deploy smart wallets when a user initiates their first transaction. This process utilizes the initCode field in the UserOperation structure. If the wallet does not exist yet, the EntryPoint contract calls the Factory to deploy it at a pre-determined address using CREATE2.
This approach allows:
-
Predictable Wallet Addresses – The address can be calculated even before deployment.
-
Multi-Chain Compatibility – The same Factory and initialization code generate identical wallet addresses across all supported chains.
-
On-Demand Deployment – Wallets are only deployed when needed, reducing unnecessary gas fees.
LightAccount Factory CompatibilityCopied!
The Notus API supports a standard Factory implementation called LightAccount (v2.0.0). This implementation adheres to the best practices of ERC-4337 and ensures seamless integration with the Notus API’s suite of tools and features.
Key Features of LightAccount (v2.0.0):
-
Standardized Compatibility: Fully compatible with the ERC-4337 specification, ensuring smooth wallet deployment.
-
Gas Optimization: Uses an efficient design to minimize gas costs during wallet creation.
-
Multi-Chain Consistency: Enables deterministic wallet addresses across all supported chains, providing a unified user experience.
Security and Audits
The LightAccount Factory (v2.0.0) has undergone a thorough security audit to ensure its reliability and robustness. You can review the audit report here.
Factory Deployments
The LightAccount Factory is deployed across multiple chains, ensuring cross-chain compatibility and deterministic wallet addresses. You can find the list of deployed addresses here.
Kernel Account Factory CompatibilityCopied!
In addition to supporting LightAccount, the Notus API is also compatible with Kernel Account. Kernel is a minimal and extensible smart contract account designed for ERC-4337 wallets, offering a modular architecture that allows developers to customize and enhance wallet functionalities through plugins.
Key Features of Kernel Account
-
ERC-4337 Compatibility – Fully adheres to the ERC-4337 standard, ensuring seamless integration within the account abstraction ecosystem.
-
Modular Design – Supports the addition of plugins, enabling developers to extend wallet capabilities without modifying the core contract.
-
Gas Efficiency – Engineered to optimize gas consumption during wallet operations, reducing transaction costs for users.
Security and Audits
The Kernel Account has undergone thorough security audits to ensure its robustness and reliability. You can review the audit reports here.
Factory Deployments
The Kernel Account Factory has been deployed across multiple chains, ensuring deterministic wallet addresses and consistent behavior. For a comprehensive list of deployment addresses and supported networks, visit this page.
Additional Resources
For more details on Kernel Account’s architecture, updates, and developer documentation, visit the Kernel GitHub Repository.
Why Use the Same Factory Across All Chains?Copied!
To ensure smart wallets maintain the same address across multiple chains, the same Factory contract and initialization code must be used. This guarantees:
-
Deterministic Address Generation – The CREATE2 opcode calculates wallet addresses based on the Factory address, salt, and initialization code. Using the same Factory ensures these parameters remain consistent.
-
Cross-Chain Compatibility – A unified wallet address allows users to interact with the same wallet across different blockchains without additional configurations.
-
Seamless User Experience – Eliminates the need for separate wallets on each chain, simplifying asset management and improving interoperability.