Account Abstraction — A pivotal step in ensuring Ethereum’s adoption.
In our last newsletter, we discussed zk-EVMs and their role in scaling the Ethereum blockchain. In today’s newsletter, we will examine the role of account abstraction in scaling the Ethereum blockchain and ensuring mass adoption. Account abstraction is a term that has often been repeated, but few market participants understand what it is and how it can change the game. According to Vitalik account abstraction is “something we’ve always wanted” and that it had been a “longtime dream of the Ethereum community”
To fully understand account abstraction, we first need to understand what abstraction is in computer science:
The art of abstraction.
Abstraction refers to removing a system's physical, spatial, or temporal details and focusing on attributes that have far greater importance.
A prevalent form of abstraction in software engineering is data abstraction, which simply refers to hiding information and allowing users to use the computer at a high level without understanding the logic or processes occurring underneath thoroughly.
For example, when developers want to write software, they write a high-level programming language like python, java, etc. The programmer does not need to understand how to write 0s and 1s that constitute the machine code.
Now we have examined the act of abstraction, let’s refocus on the subject of this article:
Account Abstraction — A Deep Dive.
Account abstraction is a form of data abstraction. To understand what is being abstracted from accounts on Ethereum, we must first understand how accounts work on Ethereum. There are two types of accounts on Ethereum, namely:
Externally Owned Accounts (EOA)
Contract Accounts (CA).
Externally Owned Accounts (EOA)
These are essentially user-controlled accounts made up of a cryptographic pair of keys, a public, and a private key. They are generated and controlled by anyone who holds the private keys. Creating this kind of account does not cost anything, and the account users can initiate transactions.
Contract Accounts (CA)
Contract accounts are smart contracts controlled by code on the Ethereum network. Contracts do not have private keys and are instead controlled by the logic of the smart contract code on the Ethereum network. There is a cost attached to opening a contract account since you are using up network storage. This kind of account can only send transactions as a response to receiving a transaction.
Ethereum accounts have four fields namely:
Nonce - this acts as a counter indicating the number of transactions sent from an account. The nonce is an important feature as it ensures that transactions only happen once on EOAs. On CAs, the nonce represents the number of contracts created by an account
Balance - This represents the amount of eth measured in wei owned by an address.
Codehash - This refers to the code of an account on the Ethereum virtual machine(EVM). Different code fragments have different unique functions and come into play once the hash of the code is called. For EOAs, this is represented by a hash of empty strings.
Storageroot - This is also referred to as storage has and simply maps the storage content of an account.
Now that we know the two types of accounts on Ethereum, we can define account abstraction. Account abstraction is the process of reducing Ethereum's two types of accounts (Externally Owned Accounts and Contract Accounts) to a single type - Contract Accounts. The resulting contract accounts will be able to initiate transactions, pay transaction fees, and can be customized to the user's unique needs. The contract accounts will have the capabilities of a traditional CA and an EOA.
Implementation Techniques
Vitalik Buterin the founder of Ethereum describes several methods for account abstraction to be implemented on the network. These methods include:
Lazy Full Abstraction: This is the form of abstraction that is regularly discussed. It is the reduction of Ethereum accounts from an EOA and a CA to only a CA. Users store funds in the contract account and the code of the contract interpret and enforces the data encoded in the nonce, balance, code hash, signature, gas price, and storage hash.
Pro: This makes the protocol very simple
Cons:
There is a need for very complex code to be hard-wired into each account to verify the nonce signature and pay gas.
There is a need for extra logic before a miner creates a new account for a sender.
Transactions with the same hash can be included multiple times since the accounts are created in a non-standard way.
Remove nonce abstraction: In this implementation technique, the nonce is abstracted by making the transaction nonce equal to the account nonce.
Pros: nonce abstraction eliminates the possibilities of a transaction occurring in multiple places
Cons: It makes the base protocol more complex.
Standardize signature scheme: This abstraction method adds a byte-array field signature to the transaction.
Pro: This makes signature verification simpler
Cons: It increases the complexity of the base layer.
Some other account abstraction techniques outlined by Vitalik include adding breakpoint operation code, adding pay gas operation code, inserting a gas price + panic operation code, combine both panic and pay gas operation code, combine salt + code in the transaction, newly created account pays.
Benefits of Account Abstraction
By this point, you are probably wondering how this affects you and how any of this will make the Ethereum blockchain better. Let's examine some benefits of account abstraction:
Implementation of multicall feature: Currently, while interacting with the Ethereum blockchain, you must make a new transaction for every operation. With abstraction, all transactions can be performed in a single click saving the user gas fees, time, and undue stress. Consider the following tweet:
Session Keys: Session keys allow users to designate rules while interacting with a decentralized application(Dapp). These rules will guarantee increased security since users are restricted to only pre-approved rules, ensuring that malicious actors cannot modify the account and steal your funds. Some parameters that can be specified using session keys include the maximum amount of time an account can stay connected to a Dapp, the maximum amount of gas that can be used, and safety thresholds on the amount of tokens that can be transacted. Some teams implementing this feature include loot realms, briq, matchboxDAO, and ledger.
Social recovery: Account abstraction allows for the end of seed phrases popularly used by metamask. Social recovery allows users to designate a recovery method via a trusted contact or a reliable third-party service. Users can also set delay timers before a recovery if they change their minds while trying to recover an account. Argent is implementing this and allows users to back up their encrypted seed phrase on google drive.
Multi-factor authentication: Several traditional financial institutions are pushing to normalize two-factor authentication. This sort of security model is possible with account abstraction allowing users to designate and create multi-signature wallets.
Plug-ins: Account abstraction allows third-party developers to plug in new features when creating their accounts.
Multi-token fee payments: Account abstraction will enable users to pay for gas fees in any tokens other than Ethereum.
Fee delegation: Account abstraction will allow users to pay fees on behalf of others. Projects and protocols can pay for gas fees on behalf of users making the onboarding process more seamless.
Diverse signing scheme: Account abstraction will allow for a different signing scheme than the current ECDSA scheme. Only abstraction will allow this change. This will:
Allow every phone to be a hardware wallet,
Introduce quantum resistance, ensuring that Ethereum cannot be counterfeited or attacked by quantum computers,
Create more efficient signature algorithms that will likely result in lower gas fees.
Allow for the contracts account to be upgradable.
Final Words
At Fifty Finney, we are excited about the possibilities open to the Ethereum community. We believe that account abstraction can make the Ethereum chain more usable for the network to onboard the next wave of users into DeFi.
Thanks for making it to the end of the post. Kindly follow us on Twitter if you enjoyed this post.