Author: Kernel Ventures Jerry Luo
Editor(s): Kernel Ventures Mandy, Joshua
There are two wallet types on Ethereum: EOA and SCW, facing the problems of low execution efficiency and the inability to initiate transactions independently. Ethereum developers have gone through several explorations, and the best solution they have found at this stage is account abstraction implemented through ERC4337.
In general, ERC4337 is still the bset solution for achieving account abstraction at this stage. Through Paymaster's compensation contract, the sill for DeFi can be greatly optimized snice community can provide 0 gas or low gas transactions to attract more users to participate in. Through packaging and batch processing of transactions, users' participation experience in SocialFi and GameFi can be greatly improved, which will provide more diverse interaction options for participants in SocialFi and GameFi.
Trade-off between decentralization and convenience has always been a major dilemma for crypto participants. To embrace decentralization, a series of complex processes should be accepted such as storing mnemonics, private key signatures, and setting nonce values. To pursue convenience, the thunderstorms of a series of centralized institutions such as FTX and JPEX make it impossible for us to ignore the importance of account ownership. Up to now, Ethereum developers have made a series of attempts to achieve accounts with the convenience of Web2 in Web3 - account abstraction. At this year's ETHCC conference, Ethereum founder Vitalik Buterin summarized these attempts. Among them, ERC4337 standard gained the greatest consensus among developers.
ERC4337 mainly involves three objects: UserOperation, Bundler and on-chain contract in the process of separating control and ownership from the account subject. UserOperation is consisted of user input, while Bundler completes the process of packaging and sending transactions. The contract on chain has three parts: Entry Point, Paymaster Contract and Wallet Contract, which mainly implements complex verification and execution logic.
The biggest difference between the two is that the ERC4337 wallet can specify the sender instead of regarding the default ECDSA decryption address in EOA as the transaction initiator. Therefore, the ERC4337 wallet achieves the separation of the account subject and ownership. Secondly, paymasterAndData is also added to ERC4337 to set the payment contract. We will also explain the specific function of the payment contract later.
Overall, in this process, the user first sends a UserOperation containing self-defined parameters to Bundler. If there is a paymasterAndData parameter, the payment contract will be called to pay the gas fee. If there is an initCode parameter, the user will create a new smart contract wallet according to the code logic inside. Finally, in order to reduce the gas consumption in the signature verification process, ERC4337 adopts the method of batch packaging transactions, using Signature Aggregator to package similar UserOperations to generate an aggregate signature, which is verified only once. When both the off-chain Bundler's simulation verification and the on-chain actual verification pass, the smart contract wallet successfully executes the user-defined function in UserOperation and returns the excess gas to Bundler as a reward.
In comparison, using an EOA account to launch a transaction is extremely simple,signing the transaction data and broadcasting it to the entire network are the only processes needed. The broadcast transaction will be packaged after being verified by the node, and finally wrote on chain by the node selected by the POS mechanism. This process is very simple, without middleman Bundler or Entry Point contract, greatly reducing gas consumption. At the same time, security is only related to the ECDSA encryption algorithm, and there are no endogenous security risks caused by complex contract logic. However, in this process, the private key and account control rights are uniquely bound and can not be changed. All transactions must be signed and verified one by one, making the whole process inefficient.
All in all, ERC4337 achieves the separation of private keys and account ownership, reduces the gas consumption of complex transaction processes through batch transactions, eliminates the Ethereum balance access threshold for wallets through payment contracts, and implements signature methods through smart contract wallets. These improvements have made great progress in convenience and practicality of Web3 accounts.
All in all, ERC4337 is not the only choice of account abstraction on Ethereum.
As we can see, due to the introduction of smart contracts, huge gas consumption is generated in the process of executing contract services (unpacking UserOperation, executing condition verification, on-chain hashing, etc.) and triggering events to publish logs on Ethereum. At the same time, batch processing in ERC4337 has been proven to be impractical in real transactions to reduce transaction costs since users seldom need to package a large number of transactions in one call. In addition, once the UserOperation originally designed to share transaction costs fails to be executed on the chain, it will also bring higher losses to the wallet account or Bundler.
ChainCatcher: MetaMask product lead Alex Jupiter said in an interview with Decrypt that although account abstraction, EOA and other technologies to optimize user experience have been mentioned many times during EthCC, MetaMask will adopt these technologies very cautiously.
As a traditional wallet provider, MetaMask can help users easily create EOA accounts and collect handling fees by providing decentralized Swap services. For these traditional wallet giants who have formed a stable profit model, most of them are unwilling to take risks and make changes. By now, they often adopt a wait-and-see approach to account abstraction.
Existing Dapps on Ethereum include Opensea, Uniswap, MetaMask Swap,etc all use EOA accounts as their default service objects. To make Dapps be fully compatible with ERC4337 wallets, you need to change the review mechanism for the interaction between Dapps and wallets and the token pledge mechanism. To complete this change, the smart contract codes of all current mainstream Dapps need to be modified. The security risks and update costs that may arise from this process are immeasurable. In addition, considering the large number of Dapp transaction resistance to contract accounts caused by the previous Tornado contract, the workload of this update will be even greater.
In cross-chain bridges where Ethereum interacts with Layer 2, it is often defaulted that the payment address on the receiving network is the same as the payment address on the sending network. This is no problem at all in traditional EOA accounts, because the same private key can achieve the same control effect on addresses on both networks through signatures. However, in the ERC4337 wallet, the transfer initiation address is the contract address and is not controlled by the private key. Therefore, the receiving address can not be set to the same address as the sending network. Therefore, there are incompatibility issues between ERC4337 wallets and almost all cross-chain bridges between Layer1 and Layer2 of Ethereum today.
Bundler was introduced in ERC4377 to separate the account subject from the account control rights. All you need is an EOA account that stores a certain amount of Ethereum to act as a Bundler. Compared with mining with expensive mining machines in POW mechanism, bundler mining has almost zero investment cost and is not subject to possible restrictions by laws. Compared with staking mining under the POS mechanism, Bundler has an extremely low threshold for participation. There is no need to pledge 32 Ethereums, only the gas that can be used to interact with the Entry Point contract is needed. The reason is that it is much more difficult for Bundler to do evil than for verification nodes and the income generated by doing evil is also much lower than that for verification nodes. Therefore, there is no need to pledge a large amount of Ethereum to ensure the balance of rewards and punishments in the overall operation of the ERC4377 protocol. Finally, compared to the staking income in liquidity pool, it has a shorter lock-up time, which makes the assets more flexible. When Ethereum faces selling pressure, users can withdraw their funds in time to reduce losses. In view of the above advantages, Bundler is likely to become a new investment method on Ethereum in the future, and even derive Bundler pools similar to Bitcoin mining pools and Ethereum pledge pools.
Intent centric is centered on "intent", which means that users do not need to know the specific execution steps when performing operations, but the program automatically designs the modular operations that need to be performed at the bottom based on user needs. For new Web3 investors, the various signatures and gas settings in transactions are very unfriendly, so the one interested in crypto can only invest with the help of CEX without entering the real Web3 world. The essential reason for this phenomenon lies in the difference in operating intentions between DEX and CEX. For example, if someone wants to use DEX to THEUSDT">exchange the USDT for ETH in the most profitable way, he must choose from many trading pools to select the best one, then sign to authorize the Dapp to have certain permissions. Next, sign to confirm that USDT will be pledged into the liquidity pool, and finally sign to confirm that the equivalent amount of ETH will be withdrawn from the liquidity pool. Each of the above operations is a behavior-based operation, and one operation corresponds to an underlying behavior. CEX's operations are intent-based which achieve the most profitable solution to replace the USDT held by the user with ETH only by a market price order, without the need to set a specific order price. Although it has been suggested that completing this series of processes yourself can provide a more transparent understanding of the transaction process and prevent problems that may be inherent in modular processes. But in general, there are still very few people with this ability. Most people just need a modular process that can achieve their intentions, without desire to understand the specific operations behind it. At the same time, manual processes also carry higher risks than modular processes that have been tested for a long time. Before the birth of ERC4337 account abstraction, EOA account execution efficiency was low and transactions needed to be signed and confirmed one by one. Therefore, intent-centric applications that required modular processing of transactions according to user intentions have been developing slowly on Ethereum. In ERC4337, by introducing UserOperation and Bundler, every time a user signs a transaction, it will be put into the main memory pool after verification and wait to be uploaded to the chain. Instead, the transaction (UserOperation in ERC4337) is first sent to the backup memory pool and mixed with the UserOperation of its own or other users, waiting for Bundler to bundle these UserOperations and then submit them to the entry contract for verification and execution. In this process, users only need to declare or sign their preferences, and the specific process is selected and executed by Bundlers according to the existing consensus layer or contract layer logic, without the need to participate in any specific process. In Dapp, we can design intent-centric logic. When users want to accomplish a certain goal, they only need to sign their intentions, instead of choosing their own transaction behavior and signing one by one. It can be expected that with the full promotion of ERC4337, intent-centric Dapps will become popular on Ethereum, thus greatly reducing the entry barrier for Web3.
DeFi was closely integrated with EOA accounts in the last bull market, which greatly improved the diversity of interactive functions on the crypto investor chain and provided a variety of financial methods such as pledges, market makers, and loans, which ultimately led to a round of DeFi Summer. However, DeFi’s complex transaction process and on-chain losses have set a huge threshold for ordinary users to participate, and have also hindered the further promotion of DeFi. However, the ERC4337 wallet combined with DeFi can provide an intent-centric interaction method, allowing users to obtain an experience close to CEX. At the same time, gas-free transactions can also be achieved through Paymaster in ERC4337. Some operators can also attract more people to participate in DeFi through this method. However, unlike verticals such as SocialFi and GameFi, DeFi involves the transfer and pledge of a large number of tokens and has extremely high requirements for security. The contract layer of account abstraction involves relatively high complexity and is prone to security vulnerabilities causing losses to users' encrypted assets. At the same time, since the US government issued a ban on many coin laundering contracts such as tornado, many DeFi contracts will strictly review or even suspend interaction with smart contract addresses. Therefore, there are a lot of incompatibilities between smart contract wallets and the current DeFi system. This will also bring obstacles to the promotion of ERC4337 wallets in DeFi.
Different from the "half-chain" games in early GameFi, only game assets and props are uploaded to the chain to ensure the security of their assets in a decentralized manner. Multi-chain games write the core logic and economic model of the game into smart contracts on the chain, and interact with the game on the chain, achieving decentralization and high security in the entire process. However, Web3 games at this stage also pay a huge price to achieve multi-chain. The first is the surge in gas fees. Every step of the interaction between on-chain games, props, and scenes needs to be recorded on the chain, which has caused a surge in game costs. In order to solve this problem, the interaction logic of multi-chain games at this stage is often extremely simple, but this also limits the user's transaction experience. At the same time, if you use a traditional EOA account, you must endure an extremely cumbersome verification process to confirm each interaction during the entire game interaction process. This process greatly reduces the game experience. The introduction of account abstraction first greatly reduces transaction costs. The transaction confirmation process only requires BLS aggregate signature and one-time signature verification, which greatly saves gas consumption in the cryptographic verification process. In addition, by packaging transactions in batches, the original process of confirmation again and again can be eliminated. At the same time, the introduction of personalized smart contract accounts can facilitate the modular construction of multi-chain games, thereby improving development efficiency. At present, on the Starknet network with native account abstraction, we have seen many successful cases of combining multi-chain games with account abstraction, such as Loot Realms, Cartridges, etc.
Trapped in the bundling mechanism of private key accounts and the limited interactive functions of EOA accounts themselves, SocialFi has long faced the problem of high participation thresholds and difficult account management. Poor user experience has greatly limited the development limit of the SocialFi project. The introduction of account abstraction will completely change this situation. However, the choice between convenience, recoverability and security depends on the importance of the specific Web3 account of SocialFi. sex trade-off. The first is the separation of private keys and account control rights. Users no longer need to keep complex and disordered private keys or mnemonics, and can dynamically adjust account passwords. For example, the ERC4337 project Ambire launched at the end of 2021 enables the creation of Web3 accounts and private key recovery through email. Secondly, the batch transactions provided by ERC4337 solve the Web3 threshold problem raised at the beginning of this article. The problem that can be solved by a button in Web2 can also be solved by a button in Web3. Finally, the introduction of custom code logic in ERC4337 accounts is also closer to the personalized design of accounts in Web2, allowing each SocialFi account to introduce different account functions according to its own preferences, similar to QQ, where users can choose whether to open channel functions or not.
As of press time, the number of Web3 users is about 300 million, accounting for only about 4% of the global population. Compared with the 6 billion Internet users in the world, there is still a big room for development. To catch up with the size of Web2 and cross the 1 billion user mark, lower participation thresholds and more account customization functions are prerequisites for Web3. Of all the current options to achieve this goal, ERC4337 is relatively risk-reduced, has a relatively mature framework, and is recognized by the Ethereum Foundation and major developers. Therefore, since the Entry Point entry contract was deployed on Ethereum, the number of account abstract users has also experienced explosive growth.
Although ERC4337 has been widely recognized and promoted by Ethereum community, it still faces many problems during its actual implementation. The first is its own pending standards. Since many supplementary proposals for ERC4377 are still under review, the final form can not be determined yet, which has brought great obstacles to the development of ERC4377 ecological projects. The second is the update cost of ERC4377. Once the entry point contract is deployed, most wallets in the entire network need to cover the original address to complete the update, which is extremely diffficult. Finally, there is the issue of incompatibility with existing Dapps and cross-chain bridges. If ERC4337 is to be fully implemented, Ethereum’s existing Dapps will need to be extensively upgraded, facing security risks and costs.
However, ERC4377 has also made positive responses to the above problems, such as improving Bundler's packaging efficiency by adding external smart contracts, adding opcodes to improve smart contract account permissions, and supplementing EIP proposals to solve the problem of difficulty in upgrading Entry Point. At the same time, faced with the incompatibility issues of traditional Dapps, ERC4337 actively builds its own ecosystem to promote the application of account abstract wallets on Ethereum. The full implementation of the ERC4337 wallet can realize EVM intent-centric at the Ethereum Virtual Machine level, and further abstraction of EVM intent-centric in Dapp can make operations in Web3 reach the level of user-intent-centric simplicity in Web2. If intent centric can be fully realized in Ethereum Dapp, DeFi, GameFi and almost all verticals that require ease of operation and automation will greatly optimize the user experience, thereby attracting more outsiders to participate. However, DeFi, a trace that directly involves token transfer, will be relatively conservative because its stringent requirements for security. Vertical such as SocialFi and GameFi which pay more attention to user experience and relatively weaken security,unabling to carry out complex interaction design due to the limitations of the EOA account. Through ERC4337, these verticals can solve the original two major problems of high user threshold and poor user experience, thereby ushering in a large-scale growth in user volume, and may even serve as a major flash point in the next round of bull market.
References