
Author: Zeqing Guo & AMP; Jinming NEO, Hashkey Capital; Translation: Bit Chain Vision Xiaozou
1, Why do we need account abstraction (AA)?
At present, there are still many unexplained problems in the blockchain field.Among them, the difficulty of using the blockchain, that is, the user experience (UX) that interacts with the blockchain, must be the most public spit.
For example, many people think that the use of keys is more complicated than using an e -mail management account, the key management is difficult and it is not safe. Each transfer (such as USDC) also needs to use native currency (such as Ether and SOL).Essence
In this context, more and more people will turn attention to the abstract field of accounts to improve the user experience of interactive interaction and promote large -scale adoption.
During the exploration process, Ethereum proposed an abstract solution for ERC-4337, EIP-3074, EIP-7702 and other accounts.Other L1 (such as Solana) has the function of supporting agreement -level account abstraction (such as program derived address PDA), and COSMOS also has similar designs (such as X/Authz and cost abstract module Fee Abstraction Module).In this article, we will introduce and compare the above solutions to understand the subtle features of different solutions, and demonstrate the weighing and precautions of the advantages and disadvantages of different solutions.
2Background introduction
(1.EoaHarmony account account
External accounts (EOS) and contract accounts are two types of accounts defined in the white paper in Ethereum.The EOA account is controlled by the private key. Users can sign various transactions through the private key to control the assets in the account.The contract account is controlled by the code of the contract account itself. Other accounts can make the contract account execute specific logic by calling the code of the contract account.
(2) Account abstract
The concept of abstract accounts can be traced back to 2016.The account abstraction is based on the current two types of accounts in Ethereum, namely the EOA account and contract account.This will improve the interactive experience of Ethereum users through the following ways:
· Allow users to use multiple signatures, such as Schnorr, BLS, post -quantum signatures, etc.;
· Allow users to use ERC20 tokens or custom payment logic payment GAS fees;
· Allow users to use email, social media, etc. to retrieve their accounts;
· Allows users to manage funds in their accounts with fine -grained permissions, such as setting up daily withdrawal limit;
· Allow to perform multiple chains in a atomic transaction.For example, users can use a signature to complete the approval and exchange operation in DEX transactions.
(3) Ethereum route map
The Ethereum route map emphasizes Ethereum’s future upgrade route.At present, most studies in the Ethereum community are revolved around the Ethereum route map.Account abstract is an essential part of it:
>
Taking the Ethereum community hopes to use EIP-3074 or EIP-7702 such as EIP-3074 or EIP-7702 based on ERC-4337, to realize the account abstract solution in the agreement, and finally implement the ENDGAME account abstraction.
Although the user experience is enhanced, the end of the account abstraction is also vital to the anti -quantum computing of Ethereum, because the ECDSA algorithm used in the current EOA account is not safe in the era of quantum computing.Using account abstraction to support the quantum signatures, protecting user accounts from continuous evolutionary threats caused by quantum computing.
3As well asEIP-3074andERC-4337
To understand account abstract accounts, we need to understand how EOA works.The figure below shows the most common tokens on the chain:
>
Generally speaking, users need to issue two transactions when buying tokens: first authorize Uniswap to transfer their USDC to exchange, and then send another transaction request Uniswap to perform the operation.UNISWAP transferred the USDC of the user account and sent the corresponding amount of ETH to the user at the current price.
ERC-4337 merged the above two transactions into one transaction:
>
As can be seen from the figure above, users need to sign twice to authorize Bundler to operate the user’s assets in the 4337 account, which is different from the user’s EOA account.After the Bundler is authorized, the authorized content is merged into a trading package and the transaction is completed into a transaction.At the same time, if the user is not used to pay the Ethereum to the GAS fee, you can also introduce the Paymaster role to allow Paymaster to pay the GAS fee and get an equal value ERC20 token from the user.
EIP-3074 and ERC-4337 have some similarities, but the implementation of the EIP-3074 is in the Ethereum Agreement:
>
In ERC-4337, we authorize Bundler to handle the assets in the smart contract wallet on the smart contract wallet on the chain.In EIP-3074, the Bundler is authorized to directly handle the assets in our EOA wallet via signature.To do this, the Ethereum community needs to add two new operating codes to the Ethereum protocol: Auth and AuthCall.
Auth is used to verify whether the behavior of Bundler’s processing of user EOA account assets is authorized, and AUTHCALL is used to “deceive” user interaction smart contracts (in our examples for USDC and Uniswap), so that smart contracts believe that transactions come from the user’s EOA account.The advantage of this is that the maintenance personnel of Uniswap and USDC do not need to upgrade the deployment smart contracts. At the same time, the EOA account can also have an account abstraction function.
(1.EIP-3074andERC-4337Comparison
In the Ethereum community, EIP usually refers to a proposal that requires Ethereum upgrades, and ERC refers to the specifications that can be supported without Ethereum upgrade.
Therefore, from the naming of the two account abstraction schemes, it can be seen that ERC-4337 is easier to achieve than the EIP-3074, because ERC-4337 does not require the Ethereum network for hard fork.This is also one of the reasons why ERC-4337 has been released and is increasingly applied to Polygon and Base, but the EIP-3074 has just been accepted by the 183rd Ethereum Full Core Developer Executive Meeting (ACDE).
>
In addition, ERC-4337 requires users to migrate their current account to a new contract account, and DAPP is required to support the function of EIP-1271.EIP-3074 does not require these additional support.This is the main reason for the low adoption rate of ERC-4337.At the same time, ERC-4337 cannot support one signature to authorize multiple chains without introducing a multi-calling contract, but EIP-3074 can, which also causes the limitations of ERC-4337.
However, EIP-3074 also has its own problem.The most important problem is that the authority of the operation code is too high, which may allow the attacker to fully control the user’s EOA account.After all, as long as the hacker deceives you to sign the auth signature, you can handle the assets in your EOA wallet.Considering that online fishing attacks are very rampant, and most of the attacks are to deceive users’ signatures. Once EIP-3074 is implemented, this will become a more serious problem.
In this regard, LightClient, one of the authors of EIP-3074, proposed a relief method for intercepting malicious signatures at the wallet level.ERC-4337 does not have this problem, although hackers can still deceive users to sign malicious UserOps.This is because it is difficult to obtain the disposal authority to all assets in the user account.When writing this article, ACDE developers have agreed to delete EIP-3704 from PECTRA DEVNET 0, and include EIP-7702 in the next Pectra DEVNet 1.
(2.EIP-7702What changes?
EIP-7702 tries to integrate the advantages of EIP-3074 and ERC-4337 to take a middle road.The user sends the signed operation to the Bundler.When Bundler sends the transaction to the chain, the user’s EOA account will temporarily become a smart contract account like a 4337 account.Next, similar to the Auth process in EIP-3074, the smart contract account will verify the Bundler operation authorized by the user.Then, like AuthCall, perform the operation of user authorization.After the transaction is executed, the user account will roll back to the ordinary EOA account.
The advantages of EIP-7702 are as follows:
· All the advantages of inheriting the EIP-3074: Do not require users to switch from the EOA account to a smart contract account with a new address, you can perform multiple operations in one atomic transaction;
· ERC-4337’s smart contract account code and infrastructure can be used again;
· The abstraction of the smart contract account represented by ERC-4337 and the EOA account abstraction solution represented by EIP-3074 can be merged to prevent Ethereum from splitting into two different account abstract systems.Pay the road in the end;
· Auth and Authcall’s two operating codes will not be added to EVM of Ethereum: given the Ethereum route map, the EOA account will be converted into account abstract accounts in the future, and these two operating codes will become redundant.
In addition, EIP-7702 also inherits all the security risks of EIP-3074.
The community decided to include EIP-7702 in the PECTRA upgrade in 2025.If it is implemented, it will greatly change the Ethereum ecosystem and gradually improve the current ERC-4337 account abstract infrastructure.
4As well asSolanaProgram derived address (PDA.
(1.SolanaAccount abstraction
Solana’s account abstraction is similar to Ethereum ERC-4337.They are derived from the original account (similar to the EOA account), similar to the 4337 contract account.Before understanding Solana’s account abstraction, it is necessary to first understand the account model used by Solana.
In a broad sense, accounts can be divided into executable accounts that can execute code and cannot execute accounts that cannot execute code.Further view, there are three types of accounts on Solana: native programs, program accounts, and data accounts.
Native programs are part of the validator implementation, providing core functions for Solana networks, such as creating new data accounts and custom programs.The program account is a custom program that contains executable code.Data accounts can store data and manage program status in accordance with the definition of their owner’s program account.
This account model enables program accounts to create and manage specific accounts, providing developers with the ability to define custom rules and logic to manage accounts.With the support of this account model, the program derived address (PDA) (a data account) expands the possibility of the abstract function of the account on the account on the account.Essence
>
(2) Program sent address
For the context, all accounts are located on the ED25519 curve and have a public and private key pair.PDA is located outside the ED25519 curve. It is a 32 -byte string with a certain derived derived. It looks like a public key, but there is no corresponding private key.PDA allows developers to create custom rules and trading signature mechanisms, allowing PDA program account owners to perform transactions on behalf of PDA, which is fully recognized and supported by Solana networks.
>
(3.PDAAnd account abstraction
Now we know how PDA is derived, and you may also want to know how these concepts are associated with account abstraction.The account abstraction is implemented through the underlying layer by the performance of a function called a cross -sequence call (CPI).
CPI is a function that enables one program to call the instruction of another program, thereby achieving a combination of the Solana program.When the program starts the CPI through Invoke_signed, the program can sign a signature on behalf of the derivative PDA.
>
In order to verify the legitimacy of PDA -related transactions, Solana Runtime (runtime) uses the SIGNEEEDS and Program_id of the call program to call Create_program_address internally.If you find effective PDA, Runtime will associate PDA with the call program and identify the program as an authorized signature.
At present, Squads is developing an abstract solution for PDA -based Solana accounts.However, the products provided by Squads are currently more similar to the smart contract account solution of the GNOSIS SAFE, which has not fully developed its account abstraction function.
(4.PDAAdvantage
· Automatic execution of smart contracts: PDA supports more complex smart contract design. You can call the user independently perform multiple operations by cross -sequence.
· Enhanced user experience: Users do not need to manage multiple transactions or face technical complexity.
· Enhanced security and flexibility: No private key, which reduces the risk of key leakage.PDA can be used to sign more wallets or other flexible governance models. These models can reduce single -point risks, and are particularly easy to use organizations that manage large shared resources.
(5.PDALimitations
Although the PDA helps to lay the foundation for the abstract function of the account, it may be more complicated than the key to the account.
Like ERC-4337, it requires users to execute accounts to a new account, which may inhibit the abstract adoption rate of the Solana account.
5As well asCosmosAbstract account (AuthzandFee Grant.
(1.Cosmos x/authz
As the account abstraction is increasingly occupying the attention of the developers, AUTHZ (part of the core COSMOS SDK) is launched, allowing one account to perform certain operations on behalf of another account by authorization, which is with EIP-3074 and EIP-7702 similar.
There are several predefined authorization types of Authz. These authorized types entrust the performance of certain operations (such as pledge) to the authorized person, thereby enhancing the user experience.
Through Authz, 3 types of authorization can be given:
InGeneicautHorization: This authorization gives unlimited permissions to the authorized person’s authorized person.
InSndauthorization: Like the approval in ERC20, the authorization aims to provide a positive expenditure limit for the authorized person, which can represent the maximum amount of the authorized by the authorized person.
InStakeauthorization: This authorization allows the authorized person to manage pledge operations, such as representatives entrusted to pledge, revoked commission or re -commission.
The authorization is composed of the author’s address byte, the address byte by the authorized person, and the type of authorization.You can also define the time period to limit the permissions within a certain time period.At the end of each block, the network will delete expired authorization through a process called Pruning.
Understand the operation framework
Authz can be used to provide authorization for various operations, but for simplicity, we will study how Authz is operating to enable common voting transactions.
· Implement the authorization interface before executing any authorization.At this stage, the type of message will be defined, which is MSGVote in this example.Here, we see Alice awarded the governance voting operation.
· Bob generates an unsigned vote transaction.
· Bob generates a signature and executed voting transaction from the authorized person.The transaction is completed, and the expired transactions will be deleted.
>
authzWhat are the benefits?
· Operation security: Verifications and other users can authorize to independent accounts in order to vote or perform certain operations on governance suggestions, thereby enhancing account security and reducing security burden.
· Simplified operation: The transaction can be executed without the key to the verification of the verification. The more wallet transactions can also simplify the operation by using a single transaction for the authorized account to be authorized by the authorized account.
· No need to migrate: Similar to EIP-3074 and EIP-7702, the authorization operation is performed in the user’s original account.Users do not need to transfer their assets from the original account to the new account to enable the account abstraction.
InDAOOperation efficiency and flexibility: You can give some DAO members to perform specific operations.
· Pledge reward synthesis: Authz promotes the use of re -pledge and equivalent services to automatically synthesize pledge rewards.
AuthzLimitations and risks:
Pay attention to the type of transaction authorized by Authz.Malicious authorization can execute various types of authorization that may be harmful to users.
InGeneicautHorization: Given unrestricted permissions to represent multiple signatures on behalf of the authorized persons.Unless you fully understand the content to be signed, it is strongly recommended to avoid signing such authorized types.Some wallets may not provide warnings when signing Authz transactions.
InSndauthorization: Allow the authorized person to send the maximum amount of tokens that the authorized person can spend, if the authorized person does not specify the specific amount.Verify AllowList is also very important.
(2.Fee Grant Module(Expense authorization module)
Another obstacle to the user experience is that blockchain users need to hold various original currencies in order to interact with different ecosystems.This damages the overall user experience, especially for non -encrypted native users who first contact countless chains in the COSMOS ecosystem.
However, with the integration of the Fee Grant module, this problem has made a breakthrough.Similar to the Paymaster contract that implements an account abstraction on Ethereum, the Fee Grant module on the COSMOS allows the authorized to grant the fee allowance to the authorized person, and pay the part or all transaction fees.The funds are still under the control of the authorized person, and the authorization allowance can be revoked at any time.
Cost authorization classification
The cost allowance can be divided into two categories:Basicallowance(Basic allowances) andPeriodicallowance(Regular allowance).
Basicallowance allows the authorized person to use the cost of the author’s account until it reaches the expenditure limit or due time, and then the authorization is terminated in the state.It should be noted that BasicalLowance is performed at one time.If the expenditure limit and time are set to empty, the cost allowance is not valid and the upper limit of consumption.
PeriodicalLowance allows regularly updating cost authorization after each specified period of time.Period_spend_limit specifies the maximum token number that can be spent in a certain period of time.PERIOD_RESET tracks the time of the next time during the next time period.
Understand the operation framework
Create an ALLOWANCE subsidy with AllowEdmsgallowance for the specified message type.Allowers can be BasicalLowance basic allowances or regular allowances of Periodicallowance.If the expiration expiration time is set, Feeallowance will be lined up in the state with the Expiration prefix, and EndBlocker will check the FEEALLOWANCEKUEUE status to check the expiration and delete any expiration authorization.In addition to MSGGRANTALLOWANCE, you can also use MSGREVOKEALLOWANCE to revoke the cost allowance.
In short, Authz and Fee Grant modules have unlocked various innovative cases, which will eventually build a better user experience on the COSMOS ecosystem.
6Conclusion
As of May 27, 2024, the account abstract estimation data is as follows:
>
With the approval of the spot BTC ETF and ETH ETF, the demand for institutions and retail has increased significantly, and it is expected to usher in a new wave of users who want to contact the encryption industry.As each agreement and DAPP seek to create a seamless experience to expand its community scale, account abstraction will become an important narrative this year.