The Role of Account Abstraction in Ethereum's Evolution

The experience of wanting to carry out blockchain transactions but not having enough native tokens is all too familiar for crypto users - I mean, I have some USDC. Why can't I use that instead? What the heck is a private key, and what do you mean if I lose access to it, my account is lost forever? While the number one rule for dealing with crypto wallets is always to keep your private keys private and secure, what if losing your private keys is not the end? What if I can pay for blockchain transactions with any ERC-20 token in my wallet and not have to worry about whether or not I have enough Ether? These and more are made possible with Account Abstraction.

But before we dive into Account Abstraction and its potential, a little background study on the concept of Accounts on Ethereum is vital because Ethereum accounts are the basic foundation for Account Abstraction. The following section gives a basic overview of Ethereum Accounts and the role each type of account plays. Feel free to skip the next section if you are already familiar with Ethereum Accounts and how they work.

Understanding Ethereum Accounts

Accounts in Ethereum are a digital identity or address that can hold and transfer crypto assets such as Fungible tokens and NFTs. There are two main account types on the Ethereum Network; the first is the Externally Owned Account (EOA). This is usually the first account a user interacts with; it is the one with private keys. The second account is the Contract Account, which is different from the EOA in that it is programmable and capable of executing complex instructions independently of the user. Let's look at a more detailed overview of both account types.

Externally Owned Accounts (EOAs)

Externally Owned Accounts, or EOAs, are the most fundamental account type within the Ethereum ecosystem. EOA creation goes like this, a secret phrase usually 12 or 24 words is generated randomly, from which a Private Key is created, then a Public Key from the Private Key, then a Wallet Address, which is gotten from the last 20 bytes of the Public Key. Thankfully, Wallet applications such as Metamask and Phantom wallet simplify the process of EOA creation.

The Private Key is unique and must be kept secret; anyone with access to your Private Key essentially controls your account, and losing your private key may mean irrecoverable loss of the account, hence the rule we stated at the beginning of the article. A Public key can be shared publicly, and while it is generated from a private key, it is not possible to derive the private key from a public key.

EOAs are useful for carrying out basic operations such as holding, sending, and receiving digital assets, managing ETH balances, and interacting with decentralized applications (dApps) and smart contracts. Despite their versatility in managing transactions and engaging with dApps, EOAs have a notable limitation: they cannot hold or execute smart contract code logic, restricting them to simpler transactional functions.

Contract Accounts (CAs)

On the other hand, Contract Accounts (CAs), also known as Smart Contract Accounts, are accounts that can carry out transactions independent of user input based on predefined instructions. Essentially, CAs are programmable, and this allows for the execution of more complex operations beyond standard transactions, such as optimizing gas fees and multisig management and enabling features like account recovery. Unlike EOAs, CAs are not controlled by a private key, but by the logic encoded in their smart contract code, so there is no need to worry about losing private keys.

However, the deployment of CAs on the blockchain requires initial funding, as they consume network resources for storage and computation. A CA is created by deploying a smart contract, which then allows the account to interact with the Ethereum Virtual Machine (EVM) and execute its encoded logic. While CAs can receive transactions and hold assets similarly to EOAs, they are distinguished by their ability to perform transactions only in response to received ones, i.e., they cannot initiate transactions.

What is Account Abstraction in Ethereum?

Okay, now that we have a fairly good grasp of how accounts work on the Ethereum network, we can now proceed to learning about Account Abstraction and how it works on the Ethereum network.

Definition and Concept

Account Abstraction is a concept that aims to create a fusion of both EOAs and CAs to create something called a Smart Contract Account or Smart Account. A Smart Account is a programmable account that can initiate transactions. It can perform all the functions of a regular EOA with the added features of a CA. This means that a Smart Account can be programmed to handle account security and recovery in a variety of ways, including the use of email and passwords, as well as social authentication for account creation and security. With Smart Accounts, the possibilities for improving the overall user experience are endless.

How It Works

Account Abstraction on Ethereum is made possible by the ERC-4337 standard. This standard allows users' wallets to be converted into Smart Contract Accounts without requiring significant changes to Ethereum's infrastructure, simplifying interactions with the network. The process involves using a "pseudo-transaction" object called UserOperation, which represents actions by the user. These UserOperations are gathered together by entities known as Bundlers into a single bundle transaction. This is then processed by a smart contract known as the EntryPoint contract on the Ethereum blockchain. This system removes the need for users to manage private keys and maintain ETH balances for each transaction, enabling a more user-friendly experience.

Benefits of Account Abstraction

Throughout the entire article we have discussed in passing a few advantages of Account Abstraction. In this section, we will take a closer look at how AA is a real game changer for how we carry out transactions on Ethereum.

Improved Security

We discussed the creation of an EOA earlier in the article, discussing how losing one's private key could lead to irrecoverable loss of the account. Account Abstraction significantly improves security by removing the need for users to safeguard private keys and the use of secret phrases for account recovery, reducing vulnerability to malicious attacks or hacking attempts in the process. Depending on how the Smart Account is programmed, a lot of account recovery methods can be implemented, even opening up the possibility of allowing trusted peers to help unlock an account in a situation where a user is locked out of their account.

Enhanced User Experience

We see a notable improvement in user experience with Account Abstraction, with the allowance of multiple sign-in methods for accounts. AA also makes onchain gaming much more smoother and uninterrupted by using session keys. Session keys can be used to grant smart contracts temporary control over a user's wallet from a specific address for a set period, enhancing the gaming experience.

AA allows for the creation of rules and dedicated wallets for specific functions, like transferring funds if wallet activity has been dormant for over a year. This feature acts as a "dead man's switch," ensuring funds are not lost forever if a wallet owner passes away. As stated previously, the possibilities of optimizing user experience with AA are practically endless.

Fee Abstraction

One of the most important benefits of account abstraction is fee abstraction, which allows users to pay gas fees in any ERC-20 token instead of ETH, providing flexibility and reducing the need for a constant ETH balance. This feature also enables the batching of transactions, which can significantly reduce gas costs. By abstracting away the details of gas fees and allowing payment with various tokens, account abstraction simplifies the user onboarding process and makes Ethereum more accessible and user-friendly.

Implementation of Account Abstraction across the Ethereum Ecosystem

Starknet

Starknet is an Ethereum Layer 2 scaling solution. This simply means that it makes using the Ethereum network faster and cheaper by handling most transactions off the main Ethereum network on its own separate layer.

Starknet has supported Account Abstraction from the beginning; the concept of EOAs does not even exist on Starknet; every account on Starknet is a smart account. Starknet also allows users to pay for transactions using the native Stark token or Ether. Starknet wallets such as Argent and Braavos leverage Starknet's native Account Abstraction to create a seamless and familiar sign-in and overall user experience similar to regular Web2 applications.

ZKSync

Similar to Starknet, ZKSync is also an Ethereum Layer 2 scaling solution that supports Account Abstraction at the protocol level. Unlike Starknet, ZKSync is an EVM-compatible blockchain, which means it is possible to run applications written initially for Ethereum directly without serious modifications. While ZKSync supports the use of EOAs due to its EVM compatibility, it introduces native programmable Smart Accounts and Paymasters. According to the ZKSync docs, paymasters are specialized accounts designed to subsidize user transaction fees. These paymasters also allow users to pay for transactions using ERC20 tokens instead of native tokens.

Conclusion

In this article, we explored Account Abstraction and how it can transform how we interact with the Ethereum Network. We also explored the concept of accounts on Ethereum and examples of protocols in the Ethereum Ecosystem that implement Account Abstraction natively at the protocol level.

While Account Abstraction is still not very widespread in the Ethereum ecosystem, its potential to improve user experience and ease of transaction would play a vital role in user adoption of blockchain as a whole. Blockchain is still in its early stages, and AA might just be what is necessary to onboard the next billion users.

References

  1. https://www.geeksforgeeks.org/what-are-ethereum-accounts

  2. https://ethereum.org/en/developers/docs/accounts/

  3. https://www.quicknode.com/guides/ethereum-development/getting-started/what-are-ethereum-accounts

  4. https://medium.com/@tanish_gupta/eoas-vs-contracts-understanding-the-two-types-of-ethereum-accounts-378f9402d0e8

  5. https://www.galaxy.com/insights/research/the-road-to-account-abstraction-on-ethereum/

  6. https://www.starknet.io/blog/account-abstraction/

  7. https://docs.zksync.io/zksync-protocol/account-abstraction