When it comes to popular blockchain platforms such as Ethereum and the corresponding token standards, there have been various exciting developments in the past that intrigued the interest of Web3 developers and users alike. However, owing to several significant bottlenecks, the mass adoption of the Web3 way of things did not get enough traction. To put things in perspective, to send and receive tokens on the Ethereum platform, users need to have EOAs (Externally Owned Accounts) that are controlled by private keys. These keys are essentially long strings of numbers and letters. This increases the complexity for the users, especially the beginners. Because they need to keep safe and manage their own private keys to access their accounts, posing a considerable security risk. Then there is the issue of fragmentation, wherein different types of Ethereum wallets have different user interfaces and features. This requires the users to switch between the wallets or to find one that specifically meets their needs. Last but not least, users also require to pay high gas fees, especially for complex transactions, making it expensive for them to interact with smart contracts or to send tokens to multiple recipients.
However, Ethereum has come up with its latest upgrade — ERC-4337, which shows a strong promise to solve the above-mentioned bottlenecks and promote mass adoption among the users. In this blog, we will dive deep into the ERC-4337 standard and explore how it aims to revolutionize Web3 wallet development, NFTs, and beyond.
What is ERC-4337?
ERC-4337 or Ethereum Request for Comment — 4337 is an Ethereum standard or protocol deployed on the mainnet in March 2023. The highlight of this standard is that it achieves account abstraction without requiring any changes in the consensus layer, opening the door to more user-friendly decentralized crypto wallet development and designs. It could potentially lead to broader adoption by making it possible to transact and create contracts in a single contract account.
If you’re wondering what is account abstraction, the process separates the transaction from the underlying blockchain mechanics, allowing users to interact with the chain using simple language and relieving them from the hassle of managing cryptographic keys. It accomplishes this by allowing users to use smart contract wallets instead of EOAs as their primary account, offering higher flexibility and customizability.
Speaking of smart contract wallets, these are advanced versions of regular wallets that come with several exciting features. Here are a few noteworthy ones:
- Ability to seamlessly undertake the complex task of performing multiple functions.
- Ability to automatically pay for the transaction fee on users’ behalf
- Ability to use different types of currency (other than Ethereum) to pay the gas fee, along with the ability to set up a system where the fee is paid by a third party.
A few examples of ERC-4337-based smart contract wallets:
- Soul Wallet
- Candide
- UniPass
- Castle
- Openfort
How Does ERC-4337 Work?
With the principle of account abstraction at its base, ERC-4337 works by introducing a new type of object called a ‘UserOperation’. A UserOperation is like a special envelope that contains all the details of the transactions in different fields, such as nonce, gasLimit, gasPrice, feeRecipient, and signatureType. These fields allow the users to define what they’re doing, the gas fee they’re willing to pay, and who’s involved.
These UserOperations or envelopes of transactions are then sent off to ‘mempool’, which is like a mailbox. From here, special nodes called the ‘Bundlers’ pick up UserOperations, bundle them together with others, and submit them to a special contract called an EntryPoint, by creating a valid transaction calling EntryPoint.handleOps() function, and adding it to the block. They can be miners, validators, third-party service providers, DAOs, or other types of block builders. The EntryPoint here is a singleton contract that can execute bundles of UserOperations.
There are several advantages of using Bundlers as they can provide flexible and efficient fee models for users. They include:
- Paying gas fees in any token supported by the EntryPoint
- Utilizing sponsored transactions to pay gas fees on behalf of the users
- Refunding unused gas fees to users or donating them to charities
- Charging dynamic fees depending on demand or network congestion
This way, by using ERC-4337-enabled smart contract wallets, users have better control over their transactions and gas fees. They can even choose which bundler to use, how much to pay them, and what signature to use. Bundlers can also offer different services and prices to compete among themselves for UserOperations. EntryPoints can refer to the user preferences and the wallet’s logic to verify and execute UserOperations.
This way, account abstraction enables the execution of transactions in a user-friendly manner by transferring the validity conditions like signature verification, gas payment, replay protection, etc., out from the core protocol level or consensus layer and into the EVM smart contract level or execution layer.
Noteworthy Features of ERC-4337 Token Standard
As evident from the previous section, account abstraction can provide users with exciting new features that can certainly help break through the prominent bottlenecks in Web3, enhance Web3 development, and boost the mass adoption of decentralized applications. Let’s explore some of the most valuable of these features below:
Recovery of Lost Private Keys
With EOAs, if a user somehow loses their private key, there’s no way to recover it. However, ERC-4337 effectively changes that by enabling a social recovery system. Similar to the two-factor authorization (2FA) prevalent across social media, email, and Web2 applications, the ERC-4337 token standard enables social recovery through two-factor authorization without needing seed phrases. So if a user loses their private key, they can recover access to their Web3 wallet using their phone, email, or even biometrics. This relieves them from one of the most significant fears in the crypto world — the fear and risk of losing their private keys.
Signature Abstraction
Through signature abstraction, ERC-4337 empowers users to set automated limits on certain categories of transactions, such as daily transfers, trades, or budgets. It even takes it a notch further by allowing users to customize their wallets’ authorization schemes, leading to a wide range of possibilities. For instance, the users can set rules to reject transfers of $1000 USDC or mandate multi-party signatures for transactions above $100 USDC. This makes NFT trading much simpler and accessible for users at all levels.
Session Keys
Account abstraction allows users to enable session keys that can remember their wallets. This saves the trouble of needing to sign every little action on Web3 dApps. It is very similar to the ‘Remember Me’ feature that is prevalent in Web2 social applications.
Transaction Batching
ERC-4337 typically processes transactions by batching them together, enhancing efficiency and cost-effectiveness. Imagine being able to swap a token on Uniswap by having to sign the transaction only once. Account abstraction makes it possible by batching the transactions together, freeing you up from needing to sign the transaction multiple times to approve and execute it. Essentially, it drastically improves the dApp user experience by preventing replay attacks.
Gas Delegation
Oftentimes, users need to pay hefty gas fees, especially when the blockchain network is congested. This is especially true for NFTs, where in 2022, the buyers of the Bored Ape Yacht Club’s metaverse NFT had to pay a total of $181 million as gas fees. Account abstraction opens up the door for gas delegation, wherein gas fees can be delegated to others or the application itself can pay the fees on their users’ behalf. This can substantially boost mass adoption in Web3 as it saves them the trouble of having to pay a gas fee every time they perform an action on a dApp. This can further lead to the adoption of new, alternate business models that minimizes the dependency on user transaction as much as possible.
Decentralization & Smart Accounts
ERC-4337 can lead to the decentralization of the entire system, eliminating the need for centralized components such as relays to pay gas fees. Furthermore, as discussed earlier, smart contract accounts are at the heart of the concept of account abstraction and are being increasingly adopted by industry players and community members. For instance, Visa has created a crypto-bill payment system utilizing smart contract accounts. The below image depicts how it has made the process more convenient for the users.
Pros and Cons of ERC-4337
Apparently, ERC-4337 offers some pretty unique features, not available in other token standards. These include built-in access controls, permissions, variable token supply, and custom token metadata. However, there are some challenges and limitations that need to be addressed before its widespread adoption.
Pros:
- ERC-4337 allows developers to define who can access, transfer, or modify their tokens. This significantly enhances security by preventing unauthorized or malicious actions on the tokens and protects the interests of users.
- It even enables developers to create tokens with a variable supply, which they can alter as per the need of the dApp. This increases functionality and allows for more dynamic and flexible token economics as well as incentives.
- It also allows developers to specify custom token metadata, supporting more complex token structures, such as those that use NFTs. This leads to richer and more diverse token representations and interactions.
- Most notably it provides users with more control and transparency over their tokens, improving user experience to a great extent. Furthermore, it enables users to see how their tokens are being used and by whom, and to choose their preferred fee model and payment method.
Cons
- Since it is not yet widely adopted by the Ethereum community, there can be relatively lesser support and compatibility for ERC-4337 tokens among existing dApps, wallets, exchanges, and other platforms.
- Not being fully backward compatible with other token standards, developers may need to make considerable changes to their existing dApps to integrate ERC-4337 tokens, making it costly and time-consuming.
- It adds more complexity to dApp development. This leads to more challenges and difficulties when using the ERC-4337 tokens, especially if they are not familiar with the new standard.
How ERC-4337 Can Transform the Future of Web3
By offering numerous features that traditional banks offer their customers but without needing to trust a financial institution, ERC-4337 token standard offers the best of both worlds. This drastically revolutionizes how NFT development services operate, as it makes it much simpler to buy, store, secure, and recover, NFTs. Alongside NFTs, the disruptive token standard shows enormous potential across diverse use cases in any Web3 sector that depends on tokenized digital assets and on-chain transactions. This way, ERC-4337 enriches Web3 applications with more flexible, approachable, and intuitive features.
Furthermore, account abstraction makes Web3 and crypto applications more user-friendly by merging traditional crypto wallets with smart contracts and making transactions more secure and efficient.
Final Take
While still in the draft stage and subject to changes and improvement, ERC-4337 is a significant step toward achieving account abstraction, tackling obstacles that have hindered widespread Web3 adoption. It simplifies interaction, enhances security, and introduces innovative features, thereby reshaping the landscape of users, developers, and applications alike. While challenges remain, ERC-4337’s user-friendly and efficient approach shows great promise in realizing the full potential of blockchain technology. Its innovative features can potentially redefine how we engage with digital assets and shape the future of Web3.
So if you are curious about how ERC-4337 and other advancements can elevate your blockchain endeavors, our team at Codezeros can assist you with our comprehensive Web3 development and consulting services. Let’s discuss how we can integrate these cutting-edge solutions to uplift your projects and help you grow and succeed in the evolving blockchain ecosystem.
Originally published at https://www.codezeros.com.