DAOrayaki: How Account Abstraction Ensures Mass Adoption of Ethereum
Author: Fifty Finney
Original Title: "Account Abstraction --- A pivotal step in ensuring Ethereum's adoption."
Account abstraction has been a repeatedly discussed topic this year, yet few market participants understand what it is and how it changes the game. According to Vitalik, account abstraction is "something we've always wanted," and it has been a "long-standing dream of the Ethereum community."
In this article, we will discuss the role of account abstraction in scaling the Ethereum blockchain and ensuring mass adoption.
First, to fully understand account abstraction, we need to grasp what abstraction is in computer science:
The Art of Abstraction:
Abstraction refers to removing the physical, spatial, or temporal details of a system and focusing on more important attributes.
A popular form of abstraction in software engineering is data abstraction, which simply refers to hiding information and allowing users to interact with a computer at a high level without needing to thoroughly understand the underlying logic or processes.
Source: TIBC
For example, when developers want to write software, they use high-level programming languages like Python or Java. Programmers do not need to know how to write the 0s and 1s that make up machine code.
Ethereum Account Abstraction
Account abstraction is a form of data abstraction. To understand what is abstracted from Ethereum accounts, we must first understand how accounts work on Ethereum. There are two types of accounts on Ethereum:
Externally Owned Accounts (EOA) and Contract Accounts (CA)
Externally Owned Accounts (EOA)
These are essentially user-controlled accounts, consisting of a pair of cryptographic keys: a public key and a private key. They are generated and controlled by anyone holding the private key. Creating such an account incurs no cost, and account users can initiate transactions.
Contract Accounts (CA)
Contract accounts are controlled by smart contracts on the Ethereum network. Contracts do not have private keys; instead, they are governed by the logic of the smart contract code on the Ethereum network. Since you are using network storage, opening a contract account requires a fee. This type of account can only send transactions in response to receiving transactions.
Ethereum accounts have four fields, namely:
Nonce - This acts as a counter indicating the number of transactions sent from the account. The nonce is an important feature because it ensures that transactions occur only once on the EOA. On the CA, the nonce represents the number of contracts created by an account.
Balance - This indicates the amount of ETH owned by the address, measured in wei.
Codehash - This refers to the account code on the Ethereum Virtual Machine (EVM). Different code snippets have unique functionalities, which are activated once the hash of the code is called. For EOA, this is represented by the hash of an empty string.
Storageroot - Also known as storage hash, it simply maps the storage contents of the account.
Source: Ethereum Documentation
Now that we know the two types of accounts on Ethereum, we can define account abstraction. Account abstraction is the process of simplifying the two types of Ethereum accounts (Externally Owned Accounts and Contract Accounts) into a single type—Contract Accounts. The resulting contract accounts will be able to initiate transactions, pay transaction fees, and can be customized according to the unique needs of users. Contract accounts will have the functionalities of both traditional CAs and EOAs.
Implementation Techniques
Ethereum founder Vitalik Buterin described several methods for implementing account abstraction on the network. These methods include:
- Lazy Full Abstraction: This is a frequently discussed form of abstraction. It reduces Ethereum accounts from EOA and CA to only CA. Users will store funds in contract accounts, and the contract code interprets and executes the data encoded in nonce, balance, code hash, signature, gas price, and storage hash.
Advantages:
This simplifies the protocol significantly.
Disadvantages:
It requires very complex code to be hardwired into each account to verify nonce signatures and pay gas.
Additional logic is needed before miners create new accounts for senders.
Transactions with the same hash can be included multiple times since accounts are created in a non-standard way.
- Nonce Abstraction: In this implementation technique, the nonce is abstracted by making the transaction nonce equal to the account nonce.
Advantages:
Nonce abstraction eliminates the possibility of transactions occurring in multiple places.
Disadvantages:
It complicates the underlying protocol.
- Standardized Signature Scheme: This abstraction method adds a byte array field signature to transactions.
Advantages:
This simplifies signature verification.
Disadvantages:
It increases the complexity of the underlying layer.
Other account abstraction techniques outlined by Vitalik include adding breakpoint opcodes, adding pay gas opcodes, inserting gas price + panic opcodes, combining panic and pay gas opcodes, combining salt + code in transactions, and allowing newly created accounts to pay.
Benefits of Account Abstraction
At this point, you may be wondering how this affects you and how it will improve the Ethereum blockchain. Let's take a look at some benefits of account abstraction:
- Implementation of multi-call functionality: Currently, when interacting with the Ethereum blockchain, you must create a new transaction for each operation. With abstraction, all transactions can be completed with a single click, saving users gas and time.
Session Keys: Session keys allow users to specify rules when interacting with decentralized applications (Dapps). These rules will guarantee higher security, as users are limited to pre-approved rules, ensuring that malicious actors cannot modify accounts and steal your funds. Some parameters that can be specified with session keys include the maximum time an account can remain connected to a Dapp, the maximum gas that can be used, and the security threshold for the number of tokens that can be traded. Some teams implementing this feature include Loot, briq, matchboxDAO, and ledgers.
Social Recovery. Account abstraction allows for the end of the seed phrases popularized by Metamask. Social recovery allows users to specify recovery methods through a trusted contact or reliable third-party service. If users change their minds while trying to recover their accounts, they can also set a delay timer before recovery. Argent is implementing this measure and allows users to back up their encrypted seed phrases on Google Drive.
Multi-Factor Authentication: Some traditional financial institutions are pushing for standardized two-factor authentication. This security model can be achieved through account abstraction, allowing users to specify and create multi-signature wallets.
Plugins: Account abstraction allows third-party developers to insert new functionalities when creating accounts.
Multi-Token Fee Payment: Account abstraction will enable users to pay gas fees with any token other than Ethereum.
Fee Delegation: Account abstraction will allow users to pay fees on behalf of others. Projects and protocols can pay gas fees on behalf of users, making the onboarding process more seamless.
Diverse Signature Schemes: Account abstraction will allow for signature schemes different from the current ECDSA scheme. Only abstraction will allow for this change. This will:
Introduce quantum resistance, ensuring that Ethereum cannot be forged or attacked by quantum computers.
Create more efficient signature algorithms, which could lead to lower gas fees.
Allow contract accounts to be upgradable.
We believe that account abstraction can make the Ethereum chain more accessible to the network, paving the way for the next wave of users to enter DeFi.