Understanding Account Abstraction
What is Account Abstraction?
Account abstraction is a proposed upgrade to the Ethereum network that would allow users to create accounts with customizable transaction logic. The concept of account abstraction is causing waves in the Ethereum community, promising to bring significant changes to the way users interact with the decentralized web.
Understanding EOAs and the Need for Change
In Ethereum, there are two types of accounts: externally owned accounts (EOAs), which are controlled by private keys, and contract accounts, which are controlled by their contract code. Today, creating an EOA is the first step in the Web3 user journey, typically done in Metamask or another popular wallet platform. In this process, users have sole custody of their EOA and are responsible for memorizing and documenting their 12-word seed phrase for account recovery. EOAs contain a public key and a private key.
Seed Phrases and Private Keys:
Today, the key to your Ethereum ‘house’ is a seed phrase. If you lose it, you’re locked out forever. If someone else finds it, they can walk right in. With account abstraction, it’s like having a smart lock where you could have backup keys or a system to change the lock if your keys are stolen.The saying goes with EOAs, if you have the keys, do everything. If you don’t, do nothing.
As of now, only EOAs can initiate transactions on the Ethereum network, so they are the only option for a personal wallet. However, this structure limits flexibility. For example, to perform a transaction, users need to hold Ether (ETH) to pay for the gas cost, and they can't batch transactions together or set custom rules for transaction validation.
If Web3 were a business, this would be a flaw in the signup or onboarding flow. What happens here is that when a user wants to interact with a decentralized exchange like Uniswap, they almost always have first to fund their wallet using a centralized exchange like Coinbase. This is to buy the necessary ETH required to pay gas on decentralized exchanges. In the first step of their journey, users are already pushed toward centralized solutions which offer the functionality and UX they are looking for.
Account Abstraction: A Solution to EOA Limitations and More
Account abstraction proposes to overcome these limitations by enabling contract accounts to initiate transactions and implement custom logic for transaction validation. Essentially, contract accounts would replace EOAs as the default, allowing users to set their own rules for how they interact with the Ethereum network (and others that adopt account abstraction).
With contract accounts, users can have smart contract wallets, which use smart contracts to operate and manage assets rather than private keys.
Smart Contract Wallets:
These are like safes with customizable lock systems. A basic safe might just have a key. But imagine you could customize it with a biometric lock (fingerprint, eye scan) or a combination lock, or even a timer that only allows it to be opened at certain times. That’s what a smart contract wallet can be with account abstraction - it’s a wallet you can customize with various security measures according to your preferences.Benefits and Use Cases
Shifting from EOAs to smart contract wallets would unlock a variety of benefits and new potential use cases, including:
Abstracting signatures: With account abstraction, the traditional concept of a "signature" is broadened. Instead of only using private keys to sign and authorize transactions, other forms of authentication can be integrated. This could include biometric data like fingerprints, facial recognition, or even more complex forms of identity verification. This abstraction not only improves security but also the user experience by providing a familiar, user-friendly authentication mechanism.
Paymasters: a Paymaster is a digital entity, often a smart contract, that takes on the responsibility of paying for the gas fees. By doing this, it allows users or wallet owners to perform actions without having to own ETH for gas, thereby lowering barriers for newcomers and potentially encouraging the use of decentralized applications (dApps). To prevent misuse, Paymasters employ a staking system where they must lock up some amount of ETH, acting as collateral and a way to maintain a good reputation within the network.
Account abstraction also allows users to pay gas in different currencies than the native network token (ETH). Here is an example of a wallet that allows users to pay gas fees with an ERC-20 token of their choice.
Security policies: Account abstraction allows for more flexible and robust security measures. Users could link multiple devices to their accounts, each with its own security policies. For example, users could set policies to limit the value of transactions authorized from their phone, while larger transactions would require authorization from their computer or hardware wallet. It's also possible to generate ephemeral keys that exist only for a limited period. This reduces risk and provides users with more control over their account security.
Instead of using different wallets on different devices, you can use devices to interact with a single wallet differently.
Users may still choose to have different wallets for different activities – for instance, one for gaming and another for finance.
Social recovery: This is a method of account recovery that relies on a user's social network rather than a traditional password or seed phrase. If a user loses access to their account, a predetermined number of trusted friends or family members could collectively authorize the recovery of the account. This approach provides a potential solution to the problem of lost keys, which can be catastrophic in a blockchain context.
Quantum-proofing: As quantum computing develops, there's a growing need for cryptography that can withstand potential quantum attacks. This is because quantum computing could pose a threat to the cryptographic hash functions at the heart of the blockchain. It could also potentially break the elliptic curve cryptography used in Bitcoin and Ethereum private-public key pairs, allowing a quantum computer to reverse-engineer the private key from a public key. Account abstraction could potentially facilitate the implementation of quantum-resistant algorithms. This would help to 'future-proof' Ethereum accounts against advances in quantum computing.
Batch transactions: Traditional Ethereum transactions require a separate signature for each operation. With account abstraction, users could bundle multiple operations into a single transaction, signing once for all included operations. This not only improves efficiency and user experience but also could potentially reduce transaction costs by enabling more actions within a single transaction. Here is an example of what batch transactions on SushiSwap could look like.
Fraud monitoring: Similar to two-factor authentication in traditional online services, account abstraction could allow users to program a secondary key that co-signs every transaction. This secondary key could be monitored by a trusted third-party service that alerts users to suspicious activity. This additional security layer can help prevent unauthorized transactions, adding another layer of protection for users.
Ultimately, account abstraction is the key to onboarding the next wave of users into Web3. This is because it makes self-custody easier for users, which is crucial in order to curb reliance on centralized services, as mentioned above.
Why Account Abstraction is Crucial for Secure Self-Custody
Expecting individuals to manage private keys, write down seed phrases on paper, and secure these vital pieces of information is daunting. The margin for error is substantial, and the consequences of losing access can be devastating.
Account abstraction shifts the narrative from arcane methods of key management to intuitive, reliable, and secure alternatives. Configuring backup methods with trusted devices or even a network of friends for social recovery transforms the anxiety-ridden task of self-custody into an accessible, user-friendly process.
The Journey Towards Implementation
Transitioning (completely) to account abstraction requires an Ethereum Improvement Proposal (EIP) and a hard fork, meaning that Ethereum will undergo a permanent change. However, there is already an Ethereum Request for Comments (ERC) on account abstraction and discussion in the Ethereum community.
Ethereum co-founder and inventor Vitalik Buterin has publicly stated his support for a permanent shift towards account abstraction, saying he eventually sees EOAs going away forever. For right now, however, that’s still in development.
Layer 2s - The Testing Grounds for Account Abstraction
Account abstraction is likely to have far-reaching effects beyond Ethereum's Layer 1. For now, it’s finding its footing in the rapidly evolving Layer 2 solutions (L2s) — secondary frameworks built on top of Ethereum's base layer to enhance its scalability and efficiency. L2s are often seen as laboratories for innovation, where cutting-edge developments can be put into action with less risk and more flexibility. Because of this, they could potentially implement account abstraction before Ethereum. A few such examples include zkSync, Biconomy and StarkNet, which are currently exploring account abstraction.
zkSync:
Accounts on zkSync have both externally owned accounts (EOAs) and contract account capabilities, enabling them to initiate transactions and implement arbitrary logic, just like a smart contract. ZkSync also supports paymasters, so if an account doesn't have the means to pay for a transaction, a paymaster account can cover these costs. The feature is still in the testing phase, and modifications may occur as they gain feedback and insights from its use.Biconomy:
Biconomy is a developer-focused platform that provides transaction infrastructure for Web3 applications, aiming to streamline user experiences in the blockchain space. Biconomy brings account abstraction to life through the use of ERC-4337, offering an account abstraction SDK that enables developers to easily onboard users with account abstraction features like social logins, fiat on ramps, gasless transactions and much more.StarkNet:
Unlike Ethereum, StarkNet has been designed with account abstraction from the start. Their plan is to combine signature abstraction and payment abstraction by sharing some of the on and off-chain infrastructure. For example, Visa has proposed the idea of using account abstraction for automatic recurring payments on StarkNet. This could pave the way for large subscription platforms like Netflix and Spotify to embrace crypto payments.However, there are also concerns about potential fragmentation in the nascent ecosystem. Different protocols may adopt varied standards and approaches to account abstraction, leading to disparities and compatibility issues. A lack of consensus could stifle interoperability and user experience and, in turn, deter mainstream adoption.
This is why Ethereum's approach to account abstraction is so crucial. As the foundation upon which these L2s are built, Ethereum has the responsibility and opportunity to act as a guiding force, setting clear and efficient standards.
Embracing the Future: How Developers Can Propel Account Abstraction Forward
The successful implementation of account abstraction depends on the combined efforts of developers, service providers, and users. Here are some actions we can collectively take today:
dApp Compatibility: Many protocols in the DeFi space are only configured for EOAs with regard to signatures. Because contract accounts can’t sign or initiate transactions, this is a barrier to adopting account abstraction. These dApps can stop assuming only EOAs are interacting with the protocol and be prepared for contract addresses.
Batch transactions: To reduce friction in how we operate today, dApps can create options for users to define if they are trying to do multiple transactions at once and give EOAs an option to sign multiple at once.
Active Discussion: Foster dialogue and cooperation among wallet developers to align on best practices and strategies for implementing account abstraction changes.
Experimentation on Layer 2: L2 developers should continue to pilot this technology, facilitating innovation and providing valuable insights for its broader adoption.
UX Improvements: Developers should start identifying and workshopping features that can elevate user experience, including gas abstraction and alternative payment methods. Consider how contract wallets can enhance your application and start exploring the new opportunities account abstraction offers.
In conclusion, the advancement of account abstraction is a collective responsibility. Together, we can streamline the user experience, bolster security, and unlock new potential in the Ethereum ecosystem.