What is account abstraction and how does it work?

B1eK...s3ka
16 Feb 2024
31

Account abstraction increases flexibility in the behavior and management of blockchain user accounts and significantly simplifies the creation of smart contract wallets.


There are generally two types of accounts in blockchain networks: external accounts (EOAs) controlled by users and contract accounts managed by smart contract code. You need an EOA to interact with a blockchain network because they are the only way to initiate transactions and execute smart contracts.



But EOAs are limited to these basic transactions, which can be problematic because it limits your options for interacting with a blockchain network. For example, it makes bulk transactions difficult and requires you to always have sufficient funds from the network's native token to cover the fees.

So how can we deal with these problems?


One of the solutions on everyone's mind right now is account abstraction!

Account abstraction increases flexibility in the behavior and management of blockchain user accounts and significantly simplifies the creation of smart contract wallets. Smart contract wallets are special-purpose smart contracts that define and manage user accounts. Outlining flexible security rules, performing bulk transactions, recovering an account without a seed phrase, etc. It has many benefits such as opening the possibility of

However, from a traditional perspective, smart contract wallets have been difficult to program because their logic must be translated into a series of EOA transactions before the network can process them. To solve this problem, account abstraction enables smart contracts to initiate transactions. This means that any logic you want to implement can be coded into the smart contract wallet itself and executed on that blockchain network.

Ultimately, account abstraction improves support for smart contract wallets and shifts crypto from the current approach of simple EOAs to a future where accounts can be customized to users' needs via smart contracts. This change paves the way for a number of improvements in wallet design and reduces complexity for end users!



Account Abstraction and Ethereum;



Ethereum is currently leading the way when it comes to account abstraction. Therefore, we will use the Ethereum network as an example to explain in more detail what it is and how it works!

Account abstraction in Ethereum can come in many shapes and forms, and various EIPs propose various approaches to facilitate the creation of smart contract wallets. However, among the most important proposals, EIP-4337 is currently active and outlines the approach preferred by the community.

EIP-4337 implements account abstraction using an alternative memory pool and provides EOA features to smart contracts. Moreover, one of the reasons why this proposal stands out and is appreciated by the community is that it does not require any changes to the Ethereum protocol.



So how does this work?


To answer the question above, let's look at five key concepts of account abstraction based on EIP-4337!

User Action;


Instead of sending a normal operation like EOA does, EIP-4337's high-level system is created using a new object type called UserOperations. UserOperation is the so-called operation object that represents operations to be performed on behalf of the user.

UserOperation objects can have data and multiple instructions to execute smart contract calls initiated by the smart contract account. These objects are broadcast to a special memory pool where validators, called “packetizers,” can collect them into a “packaged transaction.”

Packer;


A wrapper is responsible for monitoring a pool of alternative memory specifically created for UserOperation objects. The wrapper “packages” User Transactions into a single transaction and sends it to the Entry Point contract. Packers are paid a portion of the gas fees for this work.

Since EAOs still need to initiate all Ethereum transactions, wrappers are crucial to this account abstraction workflow. Moreover, all bundlers have EOAs and are the only participants in this account abstraction ecosystem that require them. This is how this app can eliminate the need for everyone on Web3 to have their own EOA!

Entry point;


EntryPoint is a smart contract that receives transactions from wrappers. This smart contract is responsible for validating and executing User Transactions. During the verification process, the EntryPoint smart contract ensures that there are sufficient funds in the wallet. Otherwise, it rejects the transaction.

During the execution process, EntryPoint smart contracts execute UserOperations by calling smart contract wallets using the operation's call data. EntryPoint also takes money from the account to reimburse packers.

Payment responsible;


There is also a smart contract called Paymaster, which is responsible for enforcing gas payment policies. These policies provide flexibility in who pays for gas and how. As a result, it eliminates the need for users to hold the native ETH token to interact with the network.

Picker;


The aggregator smart contract implements a signature scheme that supports aggregation. If multiple messages are signed with multiple keys, it is possible to create a single composite signature that verifies all bulk signatures simultaneously. In doing so, an Aggregator contract helps save on call data costs due to validating multiple batch User Transactions in a single step.



Now this gives you an overview of how account abstraction works based on EIP-4337. However, as we mentioned before, this is not the only suggestion for account abstraction. So, let's look at some additional EIPs in the next section!

Account Abstraction EIP Offers;


As we mentioned before, there are multiple EIPs in addition to EIP-4337. In this section we will look at the others in a little more depth, starting with EIP-2771!

EIP-2771: EIP-2771 introduces meta transactions that allow third-party actors to pay users' gas costs without making any changes to the Ethereum protocol. The idea is that signed transactions are sent to a Forwarder contract. The forwarder contract then verifies the transaction and sends it to a gas relay. The gas relay then forwards the transaction to a Receiver contract and pays the gas to make the transaction executable.


EIP-2938: Unlike previous proposals, EIP-2938 aims to update the Ethereum protocol by adding a new transaction type called AA_TX_TYPE. This transaction type contains three fields: one-time, target, and data. The nonce is a transaction counter, the target is the entry point address, and the data is the EVM bytecode.


To perform these operations, we need to add two additional instructions to the EVM: NONCE and PAYGAS. These features allow Ethereum to natively support smart contract wallets.


EIP-3074: EIP-3074 aims to update Ethereum's EOAs so that they can delegate control to smart contracts. This will allow smart contracts to confirm transactions originating from user accounts. However, for this to work, we need to add two EVM “transaction codes”: AUTH and AUTHCALL.




With this application, smart contract wallets will be available without requiring a contract. Instead, a trustless, stateless, non-upgradable contract called an “Invoker” will handle transactions.
However, among the four proposals (EIP-4337, EIP-2771, EIP-2938, and EIP-3074), the community currently prefers EIP-4337. This is mostly due to the fact that EIP-4337 does not require any changes to the Ethereum protocol!

Usage Examples for Account Abstraction;


Account abstraction is a relatively new concept and developers are still exploring the many possibilities it brings to Web3. But to give you some examples, in the following four sections we will examine some of the key use cases that account abstraction unlocks!

Wallet Recovery;


Unlike traditional EOAs, the security of a smart contract wallet does not depend on a private key or seed phrase. Smart contract wallets are more dynamic and allow you to appoint multiple people, devices, and even third-party services as wallet custodians. If you lose your credentials, a custodian can sign a transaction that will give you access to your wallet again.

Bulk Transactions;


To make simple swaps from one token to another on a decentralized exchange (DEX) using EOA, you need two separate transactions. One to confirm the dapp to use the token you want to exchange, and another to sign and execute the swap.

With a smart contract account, it is possible to group multiple transactions together and confirm them simultaneously. This could make DeFi as seamless and simple as traditional finance by enabling transactions such as one-click transactions.

Automated Transactions;


With EOAs you always have to manually initiate and sign each transaction. There is no way to automate this process for transactions you trust. However, with a smart contract account, you can define a set of parameters to automate transactions seamlessly. This allows you to set up monthly payments for subscription services, for example.

Shared Accounts;


You can access traditional EOAs with a single seed phrase, so you can share all or no access to your wallet. There is no in between.

Account abstraction allows you to share varying levels of access to your wallet with as many users as you want. For example, you can set up a multi-signature system where two or more users must sign for a transaction to go through. Or add users to your account for a limited time.

As a result, account abstraction opens up many opportunities, allowing users to get creative with how they use their Ethereum accounts!



Summary: What is Account Abstraction?


In today's article, we examined the concept of account abstraction. In doing so, we learned that account abstraction aims to move crypto from the simple EOA approach to a future where accounts can be customized to users' needs through smart contracts. This paves the way for many improvements in wallet design and can significantly reduce complexity for end users, providing a more seamless user experience!

There are many use cases for account abstraction, and some examples include shared accounts, automated transactions, bulk transactions, etc. takes place. As a result, account abstraction opens u
p a number of opportunities, allowing users and developers to be creative and innovative in how they use accounts.

Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to kripto7o

0 Comments