The shift from Externally Owned Accounts (EOA) to Smart Contract Accounts(SCA) is gaining momentum and has been embraced by many enthusiasts, including Vitalik himself. Despite the excitement, the adoption of SCA is not as widespread as EOAs. The key among them are the challenges posed by bear markets, the concern of migration, signing issues, gas overheads, and most critically, engineering difficulties.
The most significant advantage of Account Abstractions (AA) is the ability to use code to customize functionality. However, one major engineering challenge is the non-interoperability of AA functionalities, and the fragmentation hampers integration and opens the door to vendor lock-in. Additionally, ensuring security while simultaneously upgrading and composing features can be intricate.
Enter Modular Account Abstraction, as a subset of the broader AA movement, this innovative approach can separate smart accounts from their custom functions. The goal is to create a modular structure to develop secure, seamlessly integrated wallets with diverse functionalities. In the future, it can realize a free “app store” for smart contract accounts that sets wallets and dApps free from building features but focuses on user experience.
After reading this article, readers will gain insights about:
SCA Landscape
The traditional EOA introduces many challenges like seed phrase, gas, cross-chain, and multiple transactions. We never intended to introduce complexity, but in fact, blockchain is not an easy game for the masses.
Account Abstraction leverages the smart contract account allowing programmable validation and execution, where the user is able to approve a series of transactions in one go, rather than sign and broadcast each, and implement many more features. It introduces benefits to user experience(eg. gas abstraction, and session keys), cost(eg. batching transaction), and security(eg. social recovery, multi-sig). Currently, there are two ways to achieve account abstraction:
👉 If you’re not familiar with AA or ERC4337, check SevenX’s previous research here.
The topic of Account Abstraction (AA) has been under discussion since 2015 and it was further propelled into the limelight by ERC4337 this year. However, the number of deployed smart contract accounts still pales in comparison to EOAs.
Let’s delve into this dilemma:
In this article, we’ll dive into the #5 problem: the engineering difficulties.
🤔️
To further elaborate on the engineering difficulties:
To navigate these waters, we need upgradable contracts that ensure secure and efficient upgrades, reusable cores to enhance overall development efficiency, and standardized interfaces to ensure contract accounts can transition smoothly between different frontends.
These terms converge on a singular concept: Building a Modular Account Abstraction Architecture (Modular AA).
Modular AA is a niche within the broader AA movement which envisions modularizing smart accounts to customize them for users and empower developers to seamlessly enhance features with minimal restrictions.
Yet, in any industry, setting up and promoting a new standard is a big challenge. Initial phases may witness many different solutions before everyone settles on the main one. However, it’s encouraging to see those working on account abstraction, whether it’s the 4337 SDK, wallet developers, infrastructure teams, or protocol designers, all coming together to speed up the process.
How does the account call modules to realize functions
External call and delegate call:
About delegateCall
While delegatecall is similar to call, but instead of executing the target contract in its own context, it executes it in the context of the calling contract’s current state. This means that any state changes made by the target contract are made to the calling contract’s storage.
Proxy contract and delegateCall
To realize the composable and upgradable structure, there’s a fundamental knowledge needed called “Proxy contract”.
Safe Architecture
What is Safe:
Safe is a leading Modular Smart Account Infrastructure designed to provide battle-tested security and flexibility, it empowers developers to create diverse applications and wallets. Notably, many teams are building on top of Safe or inspired by it. Biconomy launched its account by expanding Safe with native 4337 and 1/1 multi-signatures. Witnessing the deployment of over 164,000 contracts and locking in excess of 30.7 billion in value, Safe is no doubt the premier in space.
What’s Safe’s structure
What happens when we adopt Safe:
ERC2535 Diamond Architecture
About ERC2535, Diamond Proxies:
The ERC2535 standardizes diamonds, a modular smart contract system that can be upgraded/extended after deployment and has virtually no size limit. Up till now, lots of teams have been inspired by it, like Zerodev’s Kernel, and Soul Wallet’s experiment.
What’s diamond structure:
What happens when we adopt Diamond:
Similarities abound between the Safe and Diamond architectures, both relying on proxy contracts at their core and referencing logic contracts to achieve upgradability and modularity.
Nonetheless, the primary distinction lies in the handling of logic contracts. Here’s a closer look:
The “Safe Smart Account approach” and the “Diamond Approach” serve as examples of distinct structures involving proxies and modules. How to balance flexibility and security is crucial, and these two methods could potentially complement each other in the future.
What’s the sequence of calling modules
Let’s expand our discussion by introducing ERC6900, a standard proposed by the Alchemy team, inspired by Diamond, and tailored specifically for ERC-4337. It addresses the challenge of modularity in smart accounts by providing common interfaces and coordinates the efforts between plugin and wallet developers.
When it comes to the transaction process of AA, there are three main processes: validation, execution, and hook. These steps can all be managed by using the proxy account to call modules, as we discussed earlier. While different projects may use different names, it’s important to grasp the similar underlying logic.
Function names in different design
ERC6900
It’s crucial to separate modules based on a different logic. A standardized approach should dictate how validation, execution, and hook functions for smart contract accounts should be written. Whether it is Safe or ERC6900, the standardization helps reduce the need for unique development efforts specific to certain implementations or ecosystems and prevents vendor lock-in.
How to find and verify modules in an open way
A solution that’s gaining momentum involves the creation of a place that allows users to discover verifiable modules, which we can call “registry.” This registry functions akin to an “App Store” and aims to foster a simplified yet thriving modular marketplace.
Safe{Core} Protocol
Safe{Core} Protocol is an open-source, interoperable protocol for smart contract accounts, designed to enhance accessibility for various vendors and developers while maintaining robust security through well-defined standards and rules.
Rhinestone Design
The process unfolds as follows:
While this schema is in its early stages, it holds the potential to establish a standard in a decentralized and collaborative way. Their registry enables developers to register their modules, auditors to verify their security, and wallets to integrate and enables users to effortlessly locate modules and verify their attestation information. Several future uses might be:
The concept of “Module Registry” opens avenues for monetization for plugin and module developers. It could further pave the way for a “Module Marketplace.” Some aspects might be supervised by Safe’s team, while others could manifest as decentralized marketplaces, inviting contributions and transparent audit records for all. By incorporating this, we can avoid vendor lock-in and support the expansion of the EVM by adding an enhanced user experience that attracts a wider audience.
While these approaches guarantee the safety of a single module, the broader security of smart contract accounts isn’t foolproof. Combining legitimate modules and proof they don’t have storage collisions can be a challenge, underscoring the importance of wallet or AA infrastructure in addressing such concerns.
By utilizing a modular smart contract account stack, wallet providers and dApps can be liberated from the complexities of tech maintenance. Meanwhile, external module developers have the opportunity to offer specialized services tailored to individual needs. However, challenges to address include striking a balance between flexibility and security, pushing modular standards forward, and implementing standardized interfaces that empower users to easily upgrade and modify their smart accounts.
Yet, modular Smart Contract Accounts (SCA) represent just one piece of the adoption puzzle. To fully realize the potential of SCA, additional protocol-layer support is needed from Layer 2 solutions, so as robust bundler infrastructure and peer-to-peer mempool, more cost-effective and feasible SCA signing mechanism, cross-chain SCA synchronization and management, and develop user-friendly interfaces.
Looking ahead, we envision a future where participation is widespread, sparking intriguing questions: Once SCA order flow becomes sufficiently profitable, how will traditional Miner Extractable Value (MEV) mechanisms enter the field to build bundlers and capture value? When the infrastructure matures, how can Account Abstractions (AA) serve as the foundational layer for “intent-based” transactions? Stay tuned; the landscape is evolving by the minute.
The shift from Externally Owned Accounts (EOA) to Smart Contract Accounts(SCA) is gaining momentum and has been embraced by many enthusiasts, including Vitalik himself. Despite the excitement, the adoption of SCA is not as widespread as EOAs. The key among them are the challenges posed by bear markets, the concern of migration, signing issues, gas overheads, and most critically, engineering difficulties.
The most significant advantage of Account Abstractions (AA) is the ability to use code to customize functionality. However, one major engineering challenge is the non-interoperability of AA functionalities, and the fragmentation hampers integration and opens the door to vendor lock-in. Additionally, ensuring security while simultaneously upgrading and composing features can be intricate.
Enter Modular Account Abstraction, as a subset of the broader AA movement, this innovative approach can separate smart accounts from their custom functions. The goal is to create a modular structure to develop secure, seamlessly integrated wallets with diverse functionalities. In the future, it can realize a free “app store” for smart contract accounts that sets wallets and dApps free from building features but focuses on user experience.
After reading this article, readers will gain insights about:
SCA Landscape
The traditional EOA introduces many challenges like seed phrase, gas, cross-chain, and multiple transactions. We never intended to introduce complexity, but in fact, blockchain is not an easy game for the masses.
Account Abstraction leverages the smart contract account allowing programmable validation and execution, where the user is able to approve a series of transactions in one go, rather than sign and broadcast each, and implement many more features. It introduces benefits to user experience(eg. gas abstraction, and session keys), cost(eg. batching transaction), and security(eg. social recovery, multi-sig). Currently, there are two ways to achieve account abstraction:
👉 If you’re not familiar with AA or ERC4337, check SevenX’s previous research here.
The topic of Account Abstraction (AA) has been under discussion since 2015 and it was further propelled into the limelight by ERC4337 this year. However, the number of deployed smart contract accounts still pales in comparison to EOAs.
Let’s delve into this dilemma:
In this article, we’ll dive into the #5 problem: the engineering difficulties.
🤔️
To further elaborate on the engineering difficulties:
To navigate these waters, we need upgradable contracts that ensure secure and efficient upgrades, reusable cores to enhance overall development efficiency, and standardized interfaces to ensure contract accounts can transition smoothly between different frontends.
These terms converge on a singular concept: Building a Modular Account Abstraction Architecture (Modular AA).
Modular AA is a niche within the broader AA movement which envisions modularizing smart accounts to customize them for users and empower developers to seamlessly enhance features with minimal restrictions.
Yet, in any industry, setting up and promoting a new standard is a big challenge. Initial phases may witness many different solutions before everyone settles on the main one. However, it’s encouraging to see those working on account abstraction, whether it’s the 4337 SDK, wallet developers, infrastructure teams, or protocol designers, all coming together to speed up the process.
How does the account call modules to realize functions
External call and delegate call:
About delegateCall
While delegatecall is similar to call, but instead of executing the target contract in its own context, it executes it in the context of the calling contract’s current state. This means that any state changes made by the target contract are made to the calling contract’s storage.
Proxy contract and delegateCall
To realize the composable and upgradable structure, there’s a fundamental knowledge needed called “Proxy contract”.
Safe Architecture
What is Safe:
Safe is a leading Modular Smart Account Infrastructure designed to provide battle-tested security and flexibility, it empowers developers to create diverse applications and wallets. Notably, many teams are building on top of Safe or inspired by it. Biconomy launched its account by expanding Safe with native 4337 and 1/1 multi-signatures. Witnessing the deployment of over 164,000 contracts and locking in excess of 30.7 billion in value, Safe is no doubt the premier in space.
What’s Safe’s structure
What happens when we adopt Safe:
ERC2535 Diamond Architecture
About ERC2535, Diamond Proxies:
The ERC2535 standardizes diamonds, a modular smart contract system that can be upgraded/extended after deployment and has virtually no size limit. Up till now, lots of teams have been inspired by it, like Zerodev’s Kernel, and Soul Wallet’s experiment.
What’s diamond structure:
What happens when we adopt Diamond:
Similarities abound between the Safe and Diamond architectures, both relying on proxy contracts at their core and referencing logic contracts to achieve upgradability and modularity.
Nonetheless, the primary distinction lies in the handling of logic contracts. Here’s a closer look:
The “Safe Smart Account approach” and the “Diamond Approach” serve as examples of distinct structures involving proxies and modules. How to balance flexibility and security is crucial, and these two methods could potentially complement each other in the future.
What’s the sequence of calling modules
Let’s expand our discussion by introducing ERC6900, a standard proposed by the Alchemy team, inspired by Diamond, and tailored specifically for ERC-4337. It addresses the challenge of modularity in smart accounts by providing common interfaces and coordinates the efforts between plugin and wallet developers.
When it comes to the transaction process of AA, there are three main processes: validation, execution, and hook. These steps can all be managed by using the proxy account to call modules, as we discussed earlier. While different projects may use different names, it’s important to grasp the similar underlying logic.
Function names in different design
ERC6900
It’s crucial to separate modules based on a different logic. A standardized approach should dictate how validation, execution, and hook functions for smart contract accounts should be written. Whether it is Safe or ERC6900, the standardization helps reduce the need for unique development efforts specific to certain implementations or ecosystems and prevents vendor lock-in.
How to find and verify modules in an open way
A solution that’s gaining momentum involves the creation of a place that allows users to discover verifiable modules, which we can call “registry.” This registry functions akin to an “App Store” and aims to foster a simplified yet thriving modular marketplace.
Safe{Core} Protocol
Safe{Core} Protocol is an open-source, interoperable protocol for smart contract accounts, designed to enhance accessibility for various vendors and developers while maintaining robust security through well-defined standards and rules.
Rhinestone Design
The process unfolds as follows:
While this schema is in its early stages, it holds the potential to establish a standard in a decentralized and collaborative way. Their registry enables developers to register their modules, auditors to verify their security, and wallets to integrate and enables users to effortlessly locate modules and verify their attestation information. Several future uses might be:
The concept of “Module Registry” opens avenues for monetization for plugin and module developers. It could further pave the way for a “Module Marketplace.” Some aspects might be supervised by Safe’s team, while others could manifest as decentralized marketplaces, inviting contributions and transparent audit records for all. By incorporating this, we can avoid vendor lock-in and support the expansion of the EVM by adding an enhanced user experience that attracts a wider audience.
While these approaches guarantee the safety of a single module, the broader security of smart contract accounts isn’t foolproof. Combining legitimate modules and proof they don’t have storage collisions can be a challenge, underscoring the importance of wallet or AA infrastructure in addressing such concerns.
By utilizing a modular smart contract account stack, wallet providers and dApps can be liberated from the complexities of tech maintenance. Meanwhile, external module developers have the opportunity to offer specialized services tailored to individual needs. However, challenges to address include striking a balance between flexibility and security, pushing modular standards forward, and implementing standardized interfaces that empower users to easily upgrade and modify their smart accounts.
Yet, modular Smart Contract Accounts (SCA) represent just one piece of the adoption puzzle. To fully realize the potential of SCA, additional protocol-layer support is needed from Layer 2 solutions, so as robust bundler infrastructure and peer-to-peer mempool, more cost-effective and feasible SCA signing mechanism, cross-chain SCA synchronization and management, and develop user-friendly interfaces.
Looking ahead, we envision a future where participation is widespread, sparking intriguing questions: Once SCA order flow becomes sufficiently profitable, how will traditional Miner Extractable Value (MEV) mechanisms enter the field to build bundlers and capture value? When the infrastructure matures, how can Account Abstractions (AA) serve as the foundational layer for “intent-based” transactions? Stay tuned; the landscape is evolving by the minute.