From facilitating a secure exchange of crypto assets to providing entry to web3 dApps and achieving a lot of other blockchain-level objectives, the role of crypto wallets remains integral in the decentralized space. However, the user experience on current web3 wallets is challenging for most users. Anyone willing to use a Web wallet like Metamask or Coinbase wallet has to go through the hassle of creating an account, setting up the self-custodial wallet through a complex approach, storing the secret seed phrase, ensuring the safety and security of private keys against hacks, and most importantly, traditional web3 wallets require users to sign each transaction manually.
Such an approach impacts user experience, meanwhile it creates obstacles for the mass adoption of crypto and blockchain technologies. Hence, the wallet users often seek for a more simplified way of maintaining their wallet’s security instead of relying on private keys and unrecoverable seed phrases. That’s where ERC-4337 with Account Abstraction features becomes useful. ERC-4337 enables the creation of smart contracts or smart accounts on the Ethereum blockchain and all the EVM-compatible blockchain networks like Polygon, Optimism, Arbitrum, BNB Smart Chain, Avalanche and Gnosis Chain.
With no seed phrase and private key, ERC-4337 also significantly decreases the chances of crypto hacks happening in the crypto, DeFi, and overall blockchain realm. For example, in 2021, the Poly Network got hacked from a Chinese platform for $610m coins. The same year, Ronin Network revealed that a random attacker stole the network’s private key and transferred 173,600 Ethereum and 25.5m USDC to their wallets. With all these abilities, ERC-4337 and account abstraction is considered as a game changer for the entire web3 industry. Let’s dive deeper to find out how.
Understanding ‘Account Abstraction’ ERC-4337: The smart accounts enabler for web3 wallets
Account abstraction means that every Ethereum account is a smart contract that can contain logic and implement flow. The flow can be everything— a specific fraud monitoring, wallet recovery feature, social recovery, multi calls, second ownership, the type of account you want, etc. Essentially, AA makes the user wallet account more programmable. Abstraction means abstracting an account from the blockchain without changing the underlying blockchain infrastructure.
ERC-4337 is an Ethereum Improvement Proposal that brings along the ‘Account Abstraction’ feature, allowing non-custodial wallets to work as programmable smart contracts and contain logic. Account Abstraction is a technical term for supercharging regular user wallets into ‘smart accounts’. This means that new wallet users do not need to learn to manage the complicated cryptographic keys and seed phrases to onboard into the web3 ecosystem. Instead, account abstraction enables unique EVM code to implement wallet-specific logic to quickly verify individual wallets.
Thereby, ERC-4337 provides traditional web3 wallets with innovative features such as Multisigs, two-factor authentication with efficient and simpler signature algorithms, social recovery, and upgradeability.
To better understand the role of ERC-4337 in web3, let’s first understand “Ethereum accounts” and their working mechanism. Ethereum accounts refer to unique digital addresses that allow account owners to own digital assets/crypto assets. Following are the two main types of Ethereum accounts currently in use:
EOAs: Externally-owned accounts
Externally-owned accounts (EOAs) are the regular web3 wallet, such as Metamask wallet, owned and managed externally– outside the Ethereum blockchain ecosystem. These types of wallets are self-custodial based on public or private keys, and an account owner having access to the private key becomes the owner of the assets linked with the EOAs.
Further, account owners in EOAs are responsible for storing the seed phrase offline and protecting it against potential hacks. Meanwhile, they have to ensure that they do not lose private keys. This is a complex situation for most wallet owners.
On top of all these, EOAs are limited in terms of functionality. As such, they can only support token transfers to other EOAs and initiate transactions for smart contract transactions. With these limitations, EOAs create challenges such as lack of customization, security issues, frequent gas fee payment, and unsatisfactory overall user experience. Account abstraction wallets tackle all these issues. Let’s understand the ‘Contract’ account’.
Contract account
A contract account refers to a smart contract-enabled wallet that allows developers to code and implement feature-specific logic and parameters into the smart contract powering the wallet. Smart contract wallet works similarly to externally-owned accounts or EOAs, but it is unique because it doesn’t need a private key to execute transactions. Instead, whenever a transaction is initiated within EOAs, the code in the contract account gets triggered automatically; thereby the contract account executes transactions and a range of advanced operations on its own.
However, to initiate smart contract transactions, wallet users must maintain their EOAs with sufficient ETH (or any native token) balance so that the underlying smart contract can execute transactions. Contract accounts come with innovative features such as muti-sig capability, customizable transaction controls, and next-level security measures. Therefore, these wallets are easier to use and more secure than EOAs.
Despite such benefits and features, smart contract accounts make user experience difficult with its dependency on EOAs to initiate transactions via smart contracts. Also, the users in contract accounts use third-party relayers, which are centralized entities. Plus, as we discussed, the need to maintain gas fee balance is another pain point. To remove all these obstacles, ERC-4337 with Account Abstraction account has been launched.
The need for ERC-4337 in the web3 realm
Ethereum ERC-4337 is introduced to replace the “wallet” terminology with “smart accounts,” thereby enabling the core smart contract functionality into the existing user accounts or wallet accounts. Enterprises looking to offer account abstraction wallets to their users can utilize ERC-4337 to make the existing wallets synonymous by integrating customizable smart contracts with innovative features like multi-factor authentication, gasless transactions, a sustainable crypto subscription model, and a lot more– all via coding. As discussed, account abstraction eliminates the need to manage complicated wallet keyphrases, private keys, and individual signing of transactions.
With all these benefits, ERC-4337 could bring the same kind of experience as a digital wallet, taking digital assets to the mainstream and making wallets more accessible for everyone, including web3 startups and crypto wallet users. Talking about the account recovery options, abstraction wallet accounts contain encoded smart contract logic to enable effortless account recovery. For example, you can code the contract in a way that makes account recovery as simple as recovering email accounts through OTP and passwords.
How does ‘Account abstraction’ work in ERC-4337?
Account Abstraction enables creation of independent, custom smart contracts that can seamlessly initiate and execute transactions without needing EOAs. Corresponding to the requirements, developers can define any custom operation in the form of customizable code and implement the logic into smart contracts. For example, if you want to add second ownership to your account abstraction wallet so that the transactions are verified twice before execution. You can do so by implementing custom code into smart contracts that power your account.
ERC-4337 is not Ethereum’s first attempt to achieve the account abstraction feature. Earlier, Vitalik Butrein proposed EIP-86 and EIP-2928. The former talked about implementing changes through the abstraction of signature authentication and the nonce scheme. While the latter proposed the changes on the consensus layer. The problem with both these EIPs (Ethereum improvement plans) is that they talked about implementing change on the core Ethereum protocol itself, which is a complex deal for Ethereum developers as they keep their main focus on improving the network’s scalability.
Account Abstraction in EIP-4337 circumvents all the challenges with EIP-86 and EIP 2928 by introducing a higher-layer object called UserOperation. This pseudo-transaction object represents a method in which operations are conducted on users’ behalf, which is closely similar to that of zkEVM Rollups as both include different methods of bundling the transactions.
With ERC-4337, users can send UserOperation objects into a separate UserOperation Mempool (also known as Alt-Mempool). The batch transactions are then bundled by bundlers, which work like the validators that verify nodes and transactions on a Proof-of-stake blockchain network. Bundlers prioritize the transaction with the highest value based on a gas fee-prioritization concept. These bundlers receive fee/incentive by execution of individual UserOperation executions.
The bundled and validated transactions are then sent to a whitelisted “Global Entry Point,” which acts as a central coordinator for managing all the UserOperations across the ERC-4337 or account abstraction transaction flow. Upon successful transaction verification, the Entry point transmits UserOperation data to the Users’ Contract Accounts for execution through different functions. The UserOperation object contains various data elements that can describe the transaction type, the token, gas fee limits, the signature for validation, and other relevant metadata.
As discussed, Account Abstraction wallets can implement any logic. Therefore, users can perform various customizations to make their accounts work how they want. For example, as you can see in the given image, an ERC-4337 account can include a Paymaster contract that sponsors transaction/ gas fees on contract accounts and also helps validate individual UserOperation signatures.
Use cases and benefits of ERC-4337 for the web3 industry.
ERC-4337 enables the creation of programmable smart contracts for Account Abstraction wallets, which means that wallet developers can customize their accounts to offer the desired features. For example, users can leverage AA’s innovative features such as transaction simulation, FIAT on and off-ramp integrations, withdrawal/spending limit management, social recovery, gas fee abstraction mechanism, and more. Following are the main ERC-4337 use cases that wallet users should consider:
Multi-signature authentication
ERC-4337 enables the developers to create multisig wallets using its sophisticated Multi-signature authentication. This is similar to EOAs in which multiple parties are accountable for controlling a single account. Each time a transaction has to be verified, each party must sign the transactions and confirm their approval. However, the multisig concept in Account Abstraction wallet is different as it simplifies the account recovery process in case any party loses account access. This use case of account abstraction (ERC-4337) is very useful for organizations like DAOs where collective decision is required on making significant decisions like investment or modifications to the existing organization-level rules, consensus, and tokenomics.
Transaction bundling
Transaction bundling or batch transactions in Account Abstraction refers to a concept in which only a single approval is required to execute multiple transactions at once. ERC-4337 allows various transactions to be bundled into a single UserOperation so that it can quickly be verified and executed on the network level. Imagine you want to use your wallet account to interact with multiple dApps. For such instances, you generally have to initiate separate transactions for each interaction. Now with the Account Abstraction feature, you can bundle all the transactions into single operations and get instant approval.
Two-factor Authentication Security Model
Two-factor authentication is a standard security model in the digital world. Account Abstraction in ERC-4337 supports the implementation of 2FA on the Ethereum and other blockchain accounts to add an extra layer of security, which can be a code, or OTP sent to the smartphone, ensuring that the funds and users’ digital assets like crypto tokens and Non-fungible tokens are always safe even when somehow the private key is compromised.
Seedless accounts & wallet recovery
The most promising feature of account abstraction (ERC-4337) is its ability to support the creation of seedless accounts. The legacy method of managing web3 wallets with seed phrases and private keys was a major hurdle for users as they failed to store the mnemonic phrase and kept forgetting it. And, since crypto wallets do not allow for seed phrase recovery, the ease of eliminating the need for seed phrase itself is a boon for account owners. Now, they can program and enable a suitable account recovery method into their smart wallet itself, e.g., two-factor authentication.
Automated payments & operations
Automated payments are another astonishing feature that Account Abstraction offers. It allows wallet users to schedule and complete payments automatically, exactly what happens with the traditional banking system. With presetting of payments, ERC-4337 provides Web3 UX with a Web2-level ease, helping users save significant time and effort while remaining independent in terms of giving wallet/account custody to a centralized institution.
Various web3 projects spanning DeFi, Cryptos, and NFTs have implemented account abstraction services and solutions. Some of the most popular projects include Biconomy, Etherspot, Safe (formerly known as Gnosis Safe), Argent, and Blocto.
Further, talking about a real-world implementation of the Account Abstraction wallet, Visa- a globally–renowned payment technology company, has successfully implemented Account Abstraction to enable auto payments on their self-custodial wallets. The company leverages the ERC-4337’s concept of public blockchains, thereby offering creative Ethereum solutions for the users. For example, the users can make payments in stablecoins and other ERC-20 tokens. Visa will continue to make changes with AA implementation for an enhanced user experience.
Final words: A look into the future of ERC-4337
ERC-4337; Account Abstraction wallets are officially deployed on the Ethereum Mainnet and are available for various web3 projects to use. However, many changes are yet to occur in the existing ERC-4337 model. With that, Account Abstraction will evolve over time, and we can see more exhilarating features in the future. Fortunately, forthcoming changes are focused on improving the existing user experience; hence they are expected to happen on the account level instead of the core protocol level. That’s why Enterprises that have adopted ERC-4337 wallets can seamlessly include the changes in the future to make their project relevant to the ERC-4337 token standard.
If you are a web3 enterprise, blockchain startup, or an individual wallet developer interested in launching Account Abstraction enabled wallets— Zeeve helps you get started. We provide a reliable, secure, and rigorously tested infrastructure to deploy non-custodial wallets that utilize ERC-4337 standard. Further, if you need support on setting up the wallet infrastructure, integrating RPC nodes, or any other aspects of wallet development, you can contact the web3 experts at Zeeve through one-to-one call to understand how we simplify your web3 journey.