Table of Contents
“Account Abstraction” aims to improve user experience and overall security by introducing smart contract functionality in crypto wallets. In today’s article, we will better understand this concept and why crypto sorely needs this.
The Need for Account Abstraction
At BNB Chain, our goal has always been to onboard the next million into web3. However, there is a major issue here. Getting around wallets can be quite challenging if you are a new user. Traditional wallets are also known as Externally Owned Accounts (EOAs) since users must own private keys and use them to process each transaction.
EOA wallets have two major weaknesses:
- Key Management: Your private key is everything. The moment you lose it, you essentially lose all your coins. That’s a very scary prospect for newcomers and one of the biggest obstacles to adoption.
- Limitations: EOA wallets are usually incapable of performing complex actions such as conditional or multi-sig transactions.
- Gas Issues: EOA wallets are not exactly gas-friendly. Every single step you take requires you to spend a certain amount of gas.
As with any innovative system, such complexities must be abstracted to enhance user-friendliness. Account abstraction is a concept that leverages smart contract wallets to shift transactions away from EOAs. Account abstraction wallets can automate transactions, optimize gas fees, and offer several other interesting features, such as:
- Two-factor authentication
- Social Recovery
- Spending Limits
- Multi-sig support
However, the question now is: how can these abstraction features be integrated into the Ethereum network without requiring major changes to the base protocol?
An approach that can be taken is to use entry-point contracts. Let’s see how it works.
How Does Account Abstraction Work?
The key concepts involved in the process of Account Abstraction are UserOperation, Bundler, Sender, EntryPoint, Paymaster, and Aggregator. Let’s understand how they work.
UserOperation
These are the actions taken on the user’s side. They differ from traditional transactions in three key ways:
- Additional fields: UserOperations include new fields in the transaction structure, allowing for more sophistication.
- Alternate mempool: This is one of the most important features of AA wallets. All transactions are sent to a separate mempool altogether. In this mempool, the transactions are bundled and included in a block.
- Authentication: Users can customize the authentication rules of their transactions.
Any user operation can contain multiple instructions and additional data to execute smart transactions.
Bundler
The bundler contract monitors the alternative mempool built for user operations. It selects several UserOps from the mempool and bundles them into a single transaction. The bundle is then sent to the EntryPoint contract. As you can imagine, Bundlers are a critical aspect of the overall AA infra. They receive payments for each successful UserOp to incentivize their facilitation of the process.
EntryPoint
The EntryPoint is a specialized smart contract that acts as a central hub for processing user transactions in the AA framework. It enables decentralized, account-based transactions by working with bundlers, which are network participants responsible for gathering and sending UserOps.
When the EntryPoint receives a bundle, it starts by verifying each UserOp. Verification ensures the wallet has enough funds to cover gas fees and checks the operation’s validity, including its signature and authorization. If any wallet lacks sufficient funds or fails verification, the EntryPoint rejects the transaction.
Once verified, the EntryPoint executes the UserOp by calling the wallet’s specified function and deducting funds from the wallet to reimburse the bundler for gas costs.
Paymaster
One of the main problems with using EOA wallets is the need for native tokens to pay gas fees. For example, if you want to use the BEP20 network on Metamask, you will need BNB tokens to conduct any transaction. The Paymaster fixes this issue.
The Paymaster contract manages gas payment policies. It allows users to pay gas fees in tokens other than the blockchain’s native token or lets developers sponsor gas fees for users.
Paymasters also enable developers to add custom validation logic or modules, providing flexibility for applications to handle gas payments in different ways based on their specific requirements.
Aggregator
An Aggregator optimizes transaction processing by combining multiple user signatures into a single aggregated signature. Instead of validating each signature individually, the Aggregator allows the bundled UserOperations to be validated as a group, saving gas costs and improving processing speed. This is especially useful for bundlers handling large batches of transactions.
Benefits of Account Abstraction
Account abstraction brings a transformative set of benefits to the Web3 ecosystem.
Enhanced Security
Account abstraction supports custom verification logic and multi-signature requirements, improving account security. It enables two-factor authentication, biometrics, and time-based permissions while reducing reliance on private keys, minimizing risks of unauthorized access or theft.
User-Friendly Onboarding
Meta transactions eliminate the need for users to hold native blockchain tokens upfront, simplifying onboarding and lowering barriers to entry for interacting with dApps.
Cost Efficiency
Bundling multiple operations into a single transaction, reducing gas fees and making complex operations, such as DeFi strategies or in-game actions, more economical.
Elimination of Seed Phrases
Account abstraction replaces seed phrases with more secure alternatives like biometrics and two-factor authentication, reducing risks associated with loss or compromise.
Shared Accounts and Multi-User Operations
Supports multi-signature wallets and user permissions, allowing shared accounts and limited access controls, enhancing collaboration and security for businesses and individuals.
Interoperability
Compatible with Ethereum Virtual Machine (EVM) chains such as BNB Chain, Ethereum, Polygon, Avalanche, and Arbitrum, enabling seamless integration across blockchains.
Account Abstraction on BNB Chain
Account abstraction on BNB Chain enables users to interact with BSC or opBNB using smart contract wallets instead of EOAs. Two main types of AA solutions exist on BNB Chain:
- AA Infrastructure Providers
- AA Wallet Services
Infrastructure providers like Biconomy, Stackup, and Particle offer essential tools such as developer SDKs, bundlers, and Paymasters, consolidating RPC services for enhanced efficiency. Wallet services, including Trust Wallet and Particle, focus on user-facing features like social login, account recovery, and gas abstraction, making it easier for developers to embed AA solutions into dApps.