Learn how account abstraction makes cryptocurrency safer and easier to use. It adds security features and removes technical barriers to blockchain adoption.
Introduction
Blockchain technology promises financial innovation, but it is overly complex. Users must manage private keys, understand gas fees, and keep ETH to pay fees. Transaction signatures are complex, and a single mistake can result in permanent loss of funds.
These technical barriers have hindered the widespread adoption of cryptocurrency. Currently, Ethereum has approximately 290 million unique addresses. However, less than one in ten addresses are active. Why is this happening? Is there a solution?
Vitalik calls Account Abstraction (AA) “the culmination of a ten-year journey.” It makes using cryptocurrency 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. While the concept of account abstraction applies to most blockchain ecosystems, this article will focus on Ethereum.
To understand its importance, let’s first explore the current limitations and the need for change.
Understanding Ethereum Accounts
Ethereum has two types of accounts:
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.
An 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 an EOA transaction is signed by the sender, and the private key is used to sign the transaction. Access to the private key means access and control over the account, and therefore also control over the funds and assets associated with the account.
To conduct blockchain transactions, a user must:
Have enough native tokens to pay for gas
Sign the transaction with the private key
Wait for blockchain confirmation
However, EOAs have limited functionality and are 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 Accounts (CA)
Smart contract accounts, also known as smart contract wallets, are programmable accounts on the blockchain. They are deployed as smart contracts. Popular examples include Safe and Argent.
Smart contract accounts execute functions when they receive transactions. How they execute and their recovery mechanisms are controlled by the logic of the smart contract code.
These wallets can:
Automate staking
Schedule payments
Set daily spending limits
Split funds between groups
Require multiple signatures for large transfers
However, smart contract wallets still rely on EOA to initiate transactions. This means that users face the same challenges, but with greater technical complexity. So despite the progress, several issues remain.
Limitations of EOA and CA
The biggest issues with the above accounts fall into three categories:
Complex key management: For EOA, losing one private key or mnemonic phrase can mean a total loss of funds. Once stolen, there is no way to recover the account and the risk of user error is high.
Transaction limitations: In most cases, users must pay for gas fees in native tokens, which means they must always keep some tokens. Additionally, EOAs do not allow users to batch multiple transactions, with each interaction with a dApp requiring a separate approval transaction.
Poor User Experience: Technical barriers faced by new users hinder 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 are not explained. Limited recovery options make most mistakes irreversible.
Cyfrin Updraft’s course lays out the problems that account abstraction aims to solve and makes clear the need for a more elegant solution.
What is Account Abstraction?
Ethereum account abstraction is described in the Ethereum Improvement Proposal EIP-4337, making smart contracts the primary account type. This enhances security and flexibility, with features such as multi-signature approval and social recovery mechanisms. The result is the ability to create user-friendly accounts with advanced functionality.
ERC-4337 Account Abstraction
ERC-4337 is an account abstraction proposal that works without changing the Ethereum core protocol. Instead, ERC-4337 creates an additional infrastructure layer, centralized around an alternative memory pool. This layer allows smart contracts to validate, execute, and interact with UserOperations. These special transaction-like objects enable smart contracts to act as 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 a transaction initiated on behalf of a user. To reduce confusion, it is not referred to as a “transaction”. It includes familiar fields such as the sender, destination address, data payload, gas fee parameters, signature, and nonce. However, it also introduces additional fields specific to its functionality, as shown below. The use of the signature field is determined by each account implementation, not by the protocol. These operations go into an “ alternative memory pool ”, separate from regular Ethereum transactions.
Bundlers are specialized Ethereum nodes. They monitor a separate memory pool called alt-mempool and combine multiple UserOperations into a single transaction. They then submit it to the blockchain and pay a transaction fee. In return, they earn fees by processing these tasks.
EntryPoint is a Singleton smart contract that validates and forwards instructions to smart accounts to execute UserOperations. It checks that each CA has enough funds to pay the gas fees. After verification, it executes the transaction and deducts funds from the user account. It then refunds the Bundler to cover the gas fees. However, the EntryPoint contract logic also supports Paymasters.
Paymaster The contract is responsible for paying the gas fees of the transaction, not the initiator. This design allows for flexible payment policy interactions without gas fees. It also supports the use of ERC-20 tokens for payments and transactions sponsored by third parties. Thus, Paymaster eliminates the necessity for users to hold native blockchain tokens to use the network.
The optional Aggregator combines all user signatures into one. This allows verification of a set of UserOperations to be done more efficiently as a whole, rather than one by one. Using an Aggregator helps reduce transaction costs and increase processing speed.
How does the account abstraction work?
The following workflow shows how these five components interact:
Users create UserOperations objects.
Bundlers combine multiple UserOperations into a single 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, the Aggregator aggregates signature verification, and the transaction fee is processed by the Paymaster .
Having explained account abstraction, let’s see why it’s so important.
Main Benefits of Account Abstraction
Blockchain account abstraction brings significant improvements in three main areas.
Stronger Security
Account abstraction improves security in the following ways:
Multi-signature support: Users can create rules that require multiple people to approve a transaction before it can be 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 collectively approve account recovery if access is lost. For example, 3 of 5 designated Guardians may need to approve recovery. Timelocks 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. With multi-factor authentication, accounts remain secure even if one method is compromised. This increases security without adding complexity.
Improved User Experience
Web3 account abstraction changes how users interact with cryptocurrencies in three ways:
Simple Onboarding: New users can get started with a basic email or social login, and the system handles complex wallet creation in the background. This makes using cryptocurrencies as easy as any mobile app. No one needs to understand private keys or mnemonics.
Flexible Payments: Users no longer need to hold ETH to pay for gas, and can use any ERC-20 token to cover gas costs. Applications can pay for their users through sponsored transactions. Enterprises can manage expenses for their teams.
Smart Transactions: Users can group multiple operations into a single batch transaction. One approval covers the entire set of operations, and the system finds the best gas price. This saves time and money on each interaction.
Advanced Features
Account abstraction enables cutting-edge features through two major upgrades:
Programmable Rules: Users can set daily spending limits, schedule future payments, and configure rules for different types of transactions. For example, small payments might only require a single signature, while large transfers might require multiple approvals.
Automated Actions: Smart contract functionality processes recurring payments without user input, and complex transactions are executed in a precise order. Users can also create their own rules for special cases.
So, let’s see how these theoretical advantages play out in the real world.
Real-World Account Abstraction Use Cases
Notable areas where account abstraction adds value include:
Smart Contract Wallets: Argent has social recovery, gas abstraction, and other smart features. Safe provides multi-signature support, transaction batching, and advanced controls.
Enterprises: 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 crypto complexity and enables in-game purchases while managing gas costs for players.
Decentralized Finance (DeFi): Platforms use account abstraction to enable one-click transactions and batch approvals while optimizing transaction costs.
So, how do you get more information?
Getting Started with Account Abstraction
Developer Resources
A good starting point is the EIP-4337 entry on the Ethereum website. It covers the motivation, specification, and rationale for using an alternative memory pool for account abstraction. There, you can also find a reference implementation and security considerations.
Next, explore Cyfrin's comprehensive Account Abstraction Repository on GitHub. It contains quick start guides, sample deployments, and FAQs. Beyond that, dive deeper into Account Abstraction with our full course section on Cyfrin Updraft.
But you may still be wondering how to build and deploy programmable account capabilities.
Implementation Considerations
Two main approaches to account abstraction implementation:
Ethereum uses an external bundler and an entry contract
ZKsync builds account abstraction directly into the chain
As mentioned earlier, on Ethereum, users send operations to the bundler, which forwards them to the entry contract. The entry contract validates and executes the transaction. On ZKsync, users send transactions directly to the chain, and the system contract handles validation and execution.
Both approaches allow wallets to define custom rules for transaction approval, such as requiring multiple signatures or using social login.
Conclusion
Account abstraction changes the way users interact with blockchains. It adds modern financial management features to crypto wallets, allowing users to recover lost accounts, set spending limits, and pay for things with any token.
Major companies like Visa are using account abstraction today. Games use it to simplify complexity. DeFi apps make trading simpler.
The tools exist. The standards work. Now developers can build better crypto apps for everyone. Realize the vision of web3 and learn how to build Account Abstraction into your project.
Preview
Gain a broader understanding of the crypto industry through informative reports, and engage in in-depth discussions with other like-minded authors and readers. You are welcome to join us in our growing Coinlive community:https://t.me/CoinliveSG