Source: Denglian Community
Learn how account abstraction can make cryptocurrencies safer and easier to use. It adds security features and removes technical barriers to blockchain adoption.
IntroductionBlockchain technology promises financial innovation, but it is too complex. Users must manage private keys, be aware of gas fees, and retain ETH to cover fees. Transaction signatures are complex, and one mistake may result in permanent loss of funds.
These technical barriers hinder the widespread adoption of cryptocurrencies. Currently, there are approximately 290 million unique addresses on Ethereum. However, less than 1 in 10 addresses are active. Why is this happening? Is there any solution?
Vitalik calls Account Abstraction (AA) “the culmination of a ten-year journey.” It makes using cryptocurrencies as easy as PayPal, but with the decentralized nature of blockchain. Account abstraction allows users to manage their blockchain accounts through customizable smart contracts while enhancing security and flexibility. Although the concept of account abstraction applies to most blockchain ecosystems, this article will focus primarily on Ethereum.
To understand its importance, let’s first explore current limitations and the need for change.
Understanding Ethereum AccountsThere are two types of accounts in Ethereum:
Externally Owned Accounts (EOA)Most users interact with the main blockchain through Externally Owned Accounts (EOA) . MetaMask, Trust Wallet and Coinbase Wallet are good examples.
EOA is an account consisting of a pair of cryptographic keys: a public key and a private key. The public key is used to verify that the EOA transaction was signed by the sender, and the private key is used to sign the transaction. Access to the private key means access to and control over the account and therefore the funds and assets associated with the account.
To conduct a blockchain transaction, a user must:
Have enough local tokens to cover gas costs
Sign the transaction with a private key
Waiting for blockchain confirmation
However, EOA has limited functionality and is prone to losing private keys. Additionally, they cannot batch transactions, customize security rules, or delegate gas fee payments to others. That's why there are alternatives.
Smart Contract Account (CA)Smart contract account, also known as smart contract wallet, is a programmable account on the blockchain . They are deployed as smart contracts. Popular examples include Safe and Argent.
The smart contract account performs functions when receiving transactions. Their execution mode and recovery mechanism are controlled by the logic of the smart contract code.
These wallets can:
Automate staking
Schedule payoutsPay
Set daily spending limits
Split accounts between groups
Require multiple signatures for large transfers
However, smart Contract wallets still rely on EOA to initiate transactions. This means users face the same challenges, but with greater technical complexity. So, despite the progress, several issues remain.
Limitations of EOA and CAThe biggest problems with the above accounts fall into three categories:
Complex Key Management: For EOA, losing a private key or mnemonic phrase can mean a total loss of funds. Once stolen, there is no way to recover an account and the risk of user error is high.
Transaction Limitations: In most cases, users must pay gas fees with native tokens, which means they must always keep some tokens. Additionally, EOA does not allow users to batch multiple transactions, with each interaction with the dApp requiring a separate approved transaction.
Poor user experience: Technical barriers faced by new users prevent regular use and mass adoption. Even simple operations require multiple steps, with no clear documentation explaining the process or what different terms mean. Users are often faced with interfaces full of confusing terminology and transaction details that go unexplained. Limited recovery options make most errors irreversible.
Cyfrin Updraft's course lists the problems that account abstraction is designed to solve and identifies the need for more elegant solutions.
What is account abstraction?The Ethereum account abstraction is described in Ethereum Improvement Proposal EIP-4337, making smart contracts the primary account type. This enhances security and flexibility, with features such as multi-signature approvals and social recovery mechanisms. The result is the ability to create user-friendly accounts with advanced features.
ERC-4337 Account AbstractionERC-4337 is an account abstraction proposal that works without changing the core Ethereum protocol. Instead, ERC-4337 creates an additional layer of infrastructure centralized around alternative memory pools. This layer allows smart contract verification, execution and interaction with UserOperations. These special transaction-like objects enable smart contracts to become primary accounts. Meanwhile, Bundlers handle their collection, aggregation, and submission to the blockchain.
Let's explore the five components of this solution in detail:
UserOperation is a structure that represents transactions initiated on behalf of a user. To reduce confusion, it is not called a "transaction". It includes familiar fields such as sender, destination address, data payload, gas cost parameters, signature, and nonce. However, it also introduces additional fields specific to its functionality, as shown below. Usage of signature fields is determined by each account implementation, not by the protocol. These operations go into an "alternative mempool", separate from regular Ethereum transactions.
UserOperation field (Source: ERC-4337)
Bundlers are specialized Ethereum nodes. They monitor a separate mempool called alt-mempool and combine multiple UserOperations into a single transaction. They then submit it to the blockchain and pay transaction fees. In return, they earn fees for handling these tasks.
EntryPoint is a singleton smart contract that validates and forwards instructions to smart accounts to execute UserOperations. It checks whether each CA has enough funds to pay for gas. After verification, it executes the transaction and debits the funds from the user's account. It then refunds the gas to Bundler. However, the EntryPoint contract logic also supports Paymasters.
The Paymaster contract is responsible for paying the gas fee of the transaction, not the initiator. This design allows for flexible payment interactions without gas fees. It also supports payments and transactions sponsored by third parties using ERC-20 tokens. Paymaster therefore eliminates the need for users to hold native blockchain tokens in order to use the network.
The optional Aggregator merges all user signatures into one. This allows validation of a set of UserOperations to be performed more efficiently as a whole, rather than one by one. Using Aggregator helps reduce transaction costs and increase processing speed.
How does account abstraction work?The following workflow shows how these five components interact:
Users create UserOperations objects.
Bundlers combine multiple UserOperations into a transaction and send it to the EntryPoint contract.
EntryPoint initiates verification, which is implemented on the CA. It then processes the transaction by calling the `execute()` function implemented on the CA.
UserOperations are executed, triggering state changes.
Optionally, Aggregator aggregate signature verificationcertificate, and Paymaster handles transaction fees.
Account abstraction workflowAfter explaining account abstraction After that, let’s look at why it’s crucial.
Key Benefits of Account AbstractionBlockchain account abstraction brings significant improvements in three main areas.
Stronger SecurityAccount abstraction improves security through:
Multi-signature support: Users can create rules that require approval from multiple people before a transaction is executed. Each signer has different permissions, and the account owner controls spending limits and conditions. This prevents unauthorized spending and protects against hacker attacks.
Social Recovery: Account holders select trusted individuals (called "Guardians") who can jointly approve account recovery if access is lost. For example, 3 of the 5 designated guardians may need to approve the restoration. Time locks provide additional protection by delaying large transfers, eliminating the risk of permanent loss due to forgotten passwords or lost keys.
Better key management: Users can access their accounts via hardware keys or biometrics. Thanks to the use of multi-factor authentication, even if one method is compromised, the account remains secure. This enhances security without adding complexity.
Improved user experienceWeb3 account abstraction changes how users interact with cryptocurrencies in three ways:
Easy to get started: New users can get started with basic email or social logins , the system handles complex wallet creation in the background. This makes using cryptocurrencies as easy as any mobile app. No one needs to understand the private key or mnemonic phrase.
Flexible payment: Users no longer need to hold ETH to pay gas fees, and can use any ERC-20 token to cover gas costs. Apps can pay their users through sponsorship deals. Businesses can manage expenses for their teams.
Smart transactions: Users can combine multiple operations into a batch transaction. An approval covers the entire set of operations and the system finds the best gas price. This saves time and money on every interaction.
Advanced FeaturesAccount Abstraction enables cutting-edge functionality with two major upgrades:
Programmable Rules: Users can set daily spending limits, schedule future payments, and create new rules for different types of Transaction configuration rules. For example, small payments may only require a single signature, while large transfers require multiple approvals.
Automated operations: Smart contract functions process regular payments without user input, and complex transactions are executed in a precise sequence. Users can also provideCreate your own rules.
So, let’s see how these theoretical advantages play out in the real world.
Real-world account abstraction use casesNotable areas where account abstraction adds value include:
Smart contract wallets: Argent features social recovery, gas abstraction, and other smart features. Safe offers multi-signature support, transaction batching, and advanced controls.
Enterprise: Visa uses account abstraction to improve crypto payments on Ethereum. The Paymaster contract covers fees, making transactions free for users, similar to how some debit cards work.
Web3 Games: Account abstraction removes cryptographic complexity and enables in-game purchases while managing gas costs for players.
Decentralized Finance (DeFi): The platform leverages account abstraction to enable one-click transactions and batch approvals while optimizing transaction costs.
So, how do you get more information?
Get started with Account Abstraction Developer ResourcesA good starting point is the EIP-4337 entry on the official Ethereum website. It covers the motivations, specifications, and rationale for using alternative memory pools for account abstraction. There you can also find reference implementations and security considerations.
Next, explore Cyfrin’s comprehensive account abstraction library on GitHub. It includes a quick start guide, sample deployments, and FAQs. Beyond that, learn more about account abstraction with our comprehensive course section on Cyfrin Updraft.
But you may still be wondering how to build and deploy programmable account functionality.
Implementation considerationsTwo main approaches to account abstraction implementation:
Ethereum uses external bundlers and entry contracts
ZKsync builds account abstraction directly into the chain
As mentioned before, on Ethereum, users send operations to the bundler, which in turn forwards them to the entry contract. The entry contract verifies and executes the transaction. On ZKsync, users directly send transactions to the chain, and the system contract handles verification and execution.
Both methods allow wallets to define custom rules for transaction approval, such as requiring multiple signatures or using social login.
ConclusionAccount abstraction changes the way users interact with the blockchain. It adds modern financial management capabilities to crypto wallets, allowing users to recover lost accounts, set spending limits, and pay fees using any token.
Major companies like Visa are using account abstraction today. Games use it to simplify complexity. DeFi apps make trading easier.
The tool already exists. The standard is valid. Now developers can build better crypto apps for everyone. Realize the vision of web3 and learn how to build account abstraction into your project.