Account Abstraction
A basic introduction to AA, and how it works.

tl;dr
To understand account abstraction we'll understand wallets and accounts first.
What is a wallet?
Crypto wallets are simple programs, software or systems that enable the storage of public and private keys. These public and private keys allow the user to send, receive and also monitor their assets. Thus a wallet is nothing but an interface for a blockchain account (EOA) that helps us interact with tokens on the blockchain.
Different wallets and their types.
1. Software/Online wallets, aka hot wallets:
Eg. Coinbase, Binance, Exodus, Electrum, Mycelium, MetaMask etc.
Here public and private keys are stored in their servers. And can be accessed with their account. Some software wallets are non-custodial, where the public and private keys are stored in the wallet itself.
2. Hardware wallets, aka cold wallets:
Eg. Ledger Nano S, Trezor Model One, SafePal S1, Trezor Model T etc.
Hardware wallets are USB sticks that store your public and private keys for you, you can unplug them and then basically no one has access to them.
What are Eth Accounts?
An Ethereum account consists of four key components: nonce, balance, codeHash, and storageRoot.
Nonce: The number of transactions the account makes irrespective of the account type. Transactions can either be a simple transfer or the creation of contracts.
Balance: It is the amount of Wei an account holds. Wei is a denomination of ether.
codeHash: It is the code of the eth account tied to the EVM, this is only in the case of contract accounts. If the account is an EOA the codeHash is an empty string.
storageRoot: The storageRoot of an Ethereum account is the hash that encodes the account's storage content. It is a 256-bit hash of a Merkle Patricia trie's root node.
There are two types of Eth Accounts: Contract Accounts (CAs) and Externally Owned Accounts(EOAs).
Externally Owned Accounts(EOAs)
A 'regular' Ethereum account with which you can initiate transactions, send, and receive ETH or any other Ethereum-based token (ERC-20, ERC-721, etc), and interact with smart contracts is an externally owned account (EOA). The average Ethereum user owns an EOA, and through wallets, the account interacts with the blockchain.
EOAs cost nothing to create, as they incur no storage requirements. They are simple accounts unassociated with data storage or code. EOAs are the only Ethereum account type with private keys, and these private keys have control over transaction signing.
Contract Account(CAs)
Contract Accounts aka Smart Contracts are different from EOAs. The codeHash written on the EVM controls their activity. These contracts are once written cannot be changed and will define the nature of transactions the contract account can complete. They do not initiate a transaction. Instead, they can only send transactions in response to a transaction received.
What is Account abstraction?
Aka: contract account / smart contract / smart account
Account abstraction seeks to eliminate the existence of two types of accounts (EOAs and CAs) by unifying them into a single type. Thus, a single contract account will fulfil the functionality to transact with tokens and create contracts. It is a concept where each wallet is a contract account and can be programmed in a very personalized way, enhancing various new disruptive use cases that are currently limited by EOAs.Account abstraction has various use cases, some of which are already in use by various applications like gnosis safe, argent etc.
What are its use cases?
1. Recovery: In the case of EOAs Private key can be recovered once lost. With AA we can add social recovery or other recovery mechanisms.
a. Social Recovery: In case a user's private key is lost or compromised, AA allows mechanisms to securely replace the key controlling the account, without worrying about seed phrases again.
b. Dead man's switch: A dead man’s switch can be set for the account if the key is not active for a certain amount of time, someone else of their choice can inherit the account and its assets.
c. Key rotation: If told your key is compromised, instead of moving all your assets to a different account, you can simply rotate(regenerate) the keys.
2. Signature Abstraction: AA allows to change of the signature scheme to simpler, more gas-efficient ones, or quantum-resistant ones. Or even use the secure enclave of iOS and Android devices to turn every phone into a hardware wallet.
a. Multisig: A MultiSig wallet is a digital wallet that operates with multi-signature addresses. This means that it requires more than one private key to sign and authorize a crypto transaction or, in some cases, several different keys can be used to generate a signature.
b. Device as key: Hardware devices such as phones can be used to store a share of key and as a wallet signer. In case of loss of the device, one can use recovery to assign another device as a signer.
c. BLS aggregation: A BLS digital signature aka Boneh–Lynn–Shacham is a cryptographic signature scheme which allows a user to verify that a signer is authentic. The scheme uses a bilinear pairing for verification, and signatures are elements of an elliptic curve group. It has a feature with which signatures of the same msg can be compressed or aggregated in a single signature. It can be added on top of L2 to reduce gas.
3. Roles and Policies:
a. Spending Limits
Small payments seamlessly from a wallet, for large payments, can be set to connect to a wallet.
b. Multiple roles, delegating specific actions
Payroll can pay employees once a month, with a spending limit and a signature from the controller.
Legal can perform on-chain votes with the company's tokens, but can't transfer them.
CFO can transfer any sum with 24 hours delay and a signature from another C-level executive.
External auditor monitors delayed payments and can veto them, but can't initiate transfers.
c. Session key
Ephemeral keys kept in the browser can perform less-sensitive operations.
4. Gas abstraction:
Gas sponsorship models
Pay gas with ERC20 tokens
Privacy - interacting with the blockchain without buying ETH
Cross-chain operations
Technical Overview
Steps to achieve account abstraction.
There are mainly two steps to be carried out, Validation and Execution.
Validation
An arbitrary logic to determine whether a transaction is valid or not.
These valid functions are used by sequencers to know in advance whether a transaction is valid or not.
Execution
The execution function carries out the actual execution of transactions.
Execution Process:
EIP 4337 introduces a new object called a user operation, this is an object that tells the wallet what the user wants to do. It contains a signature and other data for verification as well. User operations are created and signed by users and then sent to a special user operation mempool, which is similar to and parallel to the existing ethereum transaction pool. A special entity called a bundler listens into this mempool and as new user operations are added they get picked up and bundled into a single entity called a bundle transaction, from there they're included in an ethereum block just like any other plain vanilla transaction. The incentive structure and fee prioritization logic would be similar to how transactions are included in the blockchain.
References:
https://101blockchains.com/types-of-crypto-wallets/
https://eips.ethereum.org/EIPS/eip-4337
https://www.argent.xyz/blog/wtf-is-account-abstraction/
https://www.cryptologie.net/article/472/what-is-the-bls-signature-scheme/
https://notes.ethereum.org/@vbuterin/account_abstraction_roadmap#:~:text=ERC-4337 attempts to do,producing bundles for block proposers
https://etherworld.co/2021/10/06/an-overview-of-account-abstraction-in-ethereum-blockchain/#:~:text=Implementation of Account Abstraction will,examples of smart contract wallets
https://blockzeit.com/why-account-abstraction-is-a-game-changer-in-crypto-adoption/#:~:text=Account abstraction allows the users,and Contract Accounts (CA)
https://blockzeit.com/social-recovery-wallets-why-they-are-becoming-popular/