We have been hearing about this "Account Abstraction" a lot. Let's break it down in the simplest terms.
What are wallets?
For interacting with Ethereum or any blockchains, we need WALLETS. They are basically the gateway to the web3 world. Currently, two types of wallets are used for interaction with the blockchain - EOAs(Externally Owned Accounts) and Smart Contract Accounts. EOAs are the wallet addresses of users that talk to the blockchain controlled by the private key. Smart Contract Accounts are the addresses generated when we deploy and reference a smart contract while making any contacts or transactions and are controlled by the code.
Poor UX
The user experience of interacting with the blockchain is a very slow and tedious process. Access to the wallet by seed phrases has become a major hindrance for mass adoption. The current experience of interacting with the web3 applications is very brutal for a new user. It involves the following steps -
Create an account
Store the private key
Purchase funds
Transfer funds
Initiate transaction
Pay gas fees
Wait for the transaction to confirm
Continue
As the EOAs are governed by private keys, the risk of compromise is very high as you may accidentally share your private key. Many instances have happened where users have lost access to their accounts and no one was held accountable. There's even a saying in crypto like - "Not your keys, not your crypto". Thus EOAs have very limited capabilities, are extremely risky and the level of responsibility is dangerously high.
Enter Account Abstraction ๐
Account abstraction is the proposal to allow users to use smart contract wallets instead of EOAs. As a result, users are no longer required to conduct transactions using EOAs. We can set our own rules through smart contracts which can be more flexible than traditional EOAs.
Features
Setting up multi-signature functionality
Bundling the transactions together
Setting the own account recovery mechanism
Logic to control how funds are transferred
Setting up 2FA with Zero Knowledge Proofs
History
Previously, many proposals were made for account abstraction starting with EIP-86 in 2016, EIP-2938 in 2020, and EIP-3074 again in 2020. But all these proposals didn't go through and are labelled stagnant as merging them into Ethereum requires consensus layer protocol changes to the network.
EIP-4337 proposed the idea of AA without changing the consensus layer protocol.
Working of ERC-4337
A "pseudo-transaction" object known as a UserOperation, which is a structure that describes a transaction to be sent on behalf of a user, is introduced by EIP-4337.
An "alt mempool" is essentially a waiting area for holding data on unconfirmed transactions when User Operations enter one.
On the Ethereum network, nodes have the option of acting as "bundlers." The term "bundle transaction" refers to a transaction that combines various user operations that have been picked up from the mempool by bundlers.
The "EntryPoint" is a global "singleton" smart contract that receives bundle transactions that have been created. On the entire blockchain, there is only one EntryPoint smart contract. The EntryPoint smart contract's handleOps function is invoked by the bundler.
When this method receives a transaction bundle, it calls the unique 'validateUserOp' function on each account. Each wallet for a smart contract must provide this feature.
Before continuing to conduct the operation, "validateUserOp" should check the operation's signature and pay the price if the account deems the operation valid.
In order to carry out the operation that the EntryPoint contract sends in, each smart contract wallet also needs to implement a second function, which is anticipated to be called "execute."
Thus, it has created endless possibilities, create the next evolution of wallets and promises to improve the much-needed user experience in web3.
Check out these companies implementing AA: Thirdweb, Biconomy, Safe, Banana Wallet and many more.
Thanks for making it to the end! ๐ซ
Please consider following me if enjoyed reading it.
Connect with me here -
Twitter - twitter.com/0x_yasshhh_
LinkedIn - linkedin.com/in/yash-jagtap-46384610a
GitHub - github.com/yash251