Author: Victor-Cristian Florea, Outlier Ventures; Translation: 0xjs@金财经
Introduction
Although blockchain technology has been around for some time and the market has grown in the past ten years There was sharp growth mid-year, but solving the current high-friction onboarding process is key to market expansion that turns native crypto trading into a mainstream idea. Fortunately, new paradigms such as account abstraction can encourage mass adoption of cryptocurrencies by simplifying the process of onboarding and using blockchain technology for casual users.
The ERC-4337 account abstraction implementation targets EVM developers, allowing the creation of non-custodial wallets as smart contracts, unlocking features such as easy wallet recovery, signatureless transactions, and team wallets. The key innovation of the standard is the ability to independently create smart accounts, which do not require a separate externally owned account (EOA) or contract account to conduct transactions. Smart accounts use UserOperations, which represent operations performed by the user. These user actions are bundled, verified, and executed through a single entry point, allowing for a variety of customizations in managing accounts and funds.
Innovators such as Safe, NEAR Wallet, Argent, and Blocto are already taking advantage of this new smart contract functionality. ERC-4337 is an endpoint for standardization, but there is still work to be done. The major players in the space have designed variations of the account abstraction suited to specific needs and different blockchain ecosystems, resulting in a large selection of SDKs and libraries to choose from.
Account Abstraction Use Cases
Before getting into the technical aspects, let us outline the most interesting use cases where Account Abstraction has brought significant improvements, all These will help improve the web3 entry experience, especially for non-local users.
1. Wallet Recovery
One of the biggest challenges in the crypto industry is security. Users must either rely on a custodian or protect their own keys. In the world of smart accounts, security differs from traditional models by avoiding reliance on mnemonic phrases or private keys. Smart Account owners can designate multiple entities (devices, individuals, or third-party services) as wallet guardians.
This innovative feature ensures a strong safety net for users facing lost credentials, with guardians able to sign transactions to allocate new access credentials. Importantly, this recovery process prioritizes user control and ownership of assets, striking a delicate balance between security and accessibility. This sophisticated framework heralds a new era of digital asset management with greatly increased resiliency and user control.
2. Batch transactions
In decentralized exchanges, token exchanges usually involve two separate transactions, each of which requires user approval via a private key signature. And complex Web3 transactions may require three or more approvals. Smart Accounts introduces a groundbreaking solution that allows users to batch multiple transactions, reducing costs for users and simplifying DeFi trading in the way we expect in web2 applications. A good example of this specific use case is Ambire Wallet, which leverages AA to enable batch transactions for its users. Although the cost of performing one operation is higher compared to using an Externally Owned Account (EOA), when multiple trades are made, the price per trade is significantly reduced.
3. Sponsored user transactions
The account abstraction also introduces the concept of Paymasters, which are smart contracts specifically designed for gas fees for sponsored transactions. This brings a new level of customization to dApps, which can now accept any token in a user’s wallet as transaction fees, use bank cards for fiat payments, or even subsidize the entire amount, creating a seamless and improved user experience. and eliminate unnecessary friction points. A great example is SendIt from Arcana Network, a small protocol that allows sending cryptocurrencies via email to anyone, even if they don’t have a wallet, and utilizes ERC4337 to sponsor transaction fees and create a new smart contract for them account. Another important use case for this particular use case is Visa’s proposal to allow users to pay for on-chain gas fees using fiat cards, as shown in the image below.
Rethinking digital transactions through account abstraction
Rethinking numbers through account abstraction Transactions
4. Automated transactions
Unlike EOA, where every transaction on a dApp requires manual initiation or signature, smart accounts introduce the possibility of automation. Through Smart Accounts, users can set various parameters including access to specific tokens, spending limits, duration, gas limits, and predefined triggers for specific actions. Say, for example, a user wants to allow the DEX to perform a swap on their behalf every 15 minutes for the next hour: sign once and the transaction will happen automatically thereafter. This execution can be seen on CowSwap, a decentralized exchange that offers TWAP trading, spreading the required user actions into parts that are executed over a period of time. The potential for smart account automation is nearly limitless, providing users with levels of customization and efficiency beyond the limitations of traditional EOA.
Technology Components
There are many ways to leverage this technology, either by launching your own in-house components (Figure 1), or by using an SDK or library and leveraging other players in the field existing infrastructure maintained by the operator. We outline various options for getting started, and we'll further explore the use cases and benefits of using specific solutions.
No matter which implementation method you choose when leveraging account abstraction, it is important to understand its key elements. UserOperations is a transaction-like object that represents the user's transaction intention for the smart contract account. Unlike traditional transactions, UserOperations introduce additional fields such as EntryPoint, Bundler, Paymaster, and Aggregator, and are directed to a separate memory pool. Notably, UserOperations are intent-based, allowing users to include metadata for outcome-focused transactions, which deviates from the specificity of traditional inputs.
The key component below is called a Bundler, a special type of Ethereum node that plays a key role in supporting UserOperations. User actions are directed to the Bundler network, which actively monitors alternative memory pools. These Bundlers combine multiple UserOperations into a single transaction, which is then packaged and submitted to the blockchain on behalf of the user. In return for this service, they receive compensation. Their significance lies in abstracting the necessity for each participant in web3 to have their own Externally Owned Account (EOA), which is a key component to enable ERC-4337 functionality.
UserOperations are then sent to the EntryPoint Contract, which is a singleton smart contract that performs the validation and execution of UserOperations. The verification process involves evaluating whether the wallet has sufficient funds to cover the potential maximum gas usage, which is determined by the Gas field in the UserOp. Transactions lacking sufficient funds will be rejected. To execute, the smart contract executes the transaction, debiting funds from the smart contract account (SCA), repaying Bundler's gas fees with the appropriate native token amount.
In some cases, developers wish to sponsor gas fees on behalf of users, or allow them to pay for these fees using various tokens in addition to the native token. To do this, they can leverage a contract called Paymaster, which is designed to manage gas payment policies. This effectively removes the requirement for users to own native blockchain tokens to interact with the blockchain.
< /p>
Drills on different AA tools
1. No SDK solution
As above As mentioned above, some key elements are required to take advantage of the account abstraction feature, while others remain optional. If you don't want to rely on a third-party AA solution, you can run your own setup and have full control and hosting of the smart contracts and processes involved. For Ethereum, there are multiple proposed solutions, with eth-infinitism having the most popular solutions in terms of Smart Account Contracts, Entry Point Contracts, and Paymasters. In addition to deploying these contracts and funding them correctly, you also need to run a Bundler that will receive user actions and redirect them to the Entry Point contract. To help developers, community members have developed solutions to set up account abstractions natively in the Hardhat environment by leveraging simple npm packages.
Due to the heavy lifting required to set up all the infrastructure on their own, most people choose to rely on various libraries and companies that provide ready-made solutions and abstract all the complexity away from the developers.
2.Pimlico and permissionless.js
If you want to leverage a JavaScript library to add account abstraction functionality to your application, the most effective solution is permissionless.js. It is built on viem and allows developers to build highly customizable and modular applications leveraging the AA suite, Bundler and Paymaster APIs provided by Pimlico, all of which support more than 20 EVM-compatible chains. Assuming the smart account and transaction data have been created, here's how to send a transaction using Permissionless.js and Pimlico's Account Abstraction SDK:
const txHash = await smartAccountClient.sendTransaction({
p>to: "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
value: parseEther("0.1"),
maxFeePerGas: gasPrices.fast.maxFeePerGas,
maxPriorityFeePerGas: gasPrices.fast.maxPriorityFeePerGas,
});
3. Alchemy Account Suite
Alchemy’s Account Tool Packages are one of the most developer-friendly account abstraction tools. Similar to other solutions, in addition to aa-sdk, Alchemy also provides the Light Account solution, which is a simple smart account interface, a Bundler API, a Gas Manager solution that utilizes its own Paymaster smart contract, allowing development Personnel sponsor user actions or allow users to use ERC-20 tokens when paying for gas fees. Assuming the smart account and transaction data have been created, here's how you use Achemy's Account Toolkit to send a transaction and retrieve the transaction hash:
const userOperation = await smartAccountClient.sendUserOperation({
p> uo: {
target: "0xTARGET_ADDRESS",
data: uoCallData,
},
});
const txHash = await smartAccountClient.waitForUserOperationTransaction(uo);
4.Biconomy SDK
The Biconomy SDK provides the most functionality when built with account abstractions. They allow developers to customize various features, set up multi-signature configurations for smart contract accounts, and provide Bundler and Paymaster services. Its functionality is highly modular and offers unique features compared to its competitors. It allows developers to create gateways backed by a set of constraints that enable specific SCA transactions to occur without the signer having to sign each transaction. This special functionality enhances the user experience and lays the foundation for applications that operate on the blockchain in the background while users are experiencing a full web2 journey. Biconomy's AA solution is one of the most popular in the space, with its SDK processing 25 million meta transactions and helping the Web3 space reach 2.8 million users. Assuming the smart account and transaction data have been created, here's how you use the Biconomy SDK to send a transaction and retrieve the transaction hash:
const userOpResponse = await smartWallet.sendTransaction({
< p> to: toAddress, data: transactionData,
});
const { transactionHash } = await userOpResponse. waitForTxHash();
Conclusion
In summary, although the idea of account abstraction has been around for a while, the documentation and tools to help developers adopt it at scale are still limited . Nonetheless, it remains one of the biggest milestones in Web3 development and provides the basis for new and exciting use cases.
While currently relying primarily on third parties to use account abstraction features, the modular paradigm and decentralization of the ecosystem encourage more and more developers to integrate some of these tools into their applications program, and even build your own tools - building smart contracts and off-chain utilities to take advantage of this exciting new technology. There is still a great need to simplify user onboarding and contribute to the mass adoption of cryptocurrencies, and account abstraction is currently the best tool to meet this need, allowing projects to leverage blockchain technology without the user’s knowledge.