Web3, Without the Hassle: How Account Abstraction Makes Life Easier

Web3, Without the Hassle: How Account Abstraction Makes Life Easier

Web3, simplified: Because you have better things to do than manage accounts

Introduction

Account Abstraction Is proposed as an upgrade to Ethereum in order to allow for more flexible programming of security and better user experience within Ethereum accounts. It seeks to address limitations such as;

A. Flexible security rules: Account Abstraction enables users to define their own security rules within their accounts.

B. Enhanced recovery: With account Abstraction, backup mechanisms can be put in place to regain access to an account if the private keys get lost.

C. Sharing security: An account's security can be shared with trusted devices or individuals and that would make it harder for hackers to gain full control.

D. Gas flexibility: Users can pay gas fees using tokens other than ETH, simplifying the managements of gas funds.

E. Batch transaction: Account Abstraction makes complex actions like approving and executing swaps in one go become more straightforward.

F. Innovative dAPPs: With Account Abstraction, developers have greater freedom to innovate and create user-friendly dAPPs (Decentralized Applications).

What is Account Abstraction?

Now to understand Account Abstraction and how it can potentially transform individuals experience with Ethereum, it is important to explore the Ethereum basis to see the effects it pulled on it.

1. Account : An account is a record that holds the information of formal contractual relationship established to provide for regular banking or brokerage or bussiness service. In Ethereum, there are two main types of account, which are Externally -Owned Accounts, known as EOAs and contract account.

Externally Owned Accounts are controlled by private keys like a regular cryptocurrency wallet, they send transaction and interact with the blockchain and on the other hand Contract account are controlled by smart contract and can execute code when triggered by transactions.

 (Smart contracts are self executing contracts where the terms of agreements between parties are directly written in codes). 

EOAs can interact with NFTs (Non Fungible Tokens) by buying, selling, and transferring them just like any other digital asset on the blockchain. This interaction allows users to own, trade, and showcase their unique NFTs using their Ethereum account. But in the case of NFT, ERC-4337 ensures that creators get paid when their NFTs are sold.

EOA Flow

EOA (Externally Owned Account) makes use of a wallet that allows the users to use the EOA, to do this, they'll be given a private key that will be used to sign a transaction and submit it to a Blockchain node.

The Blockchain node will take the signature of the transaction and recover it mathematically using the Elliptic Curve recover.

(The Elliptic Curve recover is a security feature that allow users who have lost access to to their private key to recover it using the Elliptic Curve algorithm)

The mathematical linking between the private key and this address is what is going to allow users to make some state changes on behalf of the address on chain.

The smart account can make state changes on chain, it may be talking to a smart contract like sending a call data through to a smart contract, targeting a method, it may also send an ether to an address on chain. This process is know as "transaction".

Account abstraction is more about giving special powers to accounts on the blockchain to control funds in advanced ways. However, EOAs are known for some certain limitations and they are as follows:

(I) Gas payment - Transaction fees must be paid in Ether (ETH), which makes it mandatory to maintain an ETH balance just for gas cost.

(ii) Complex Transactions - It requires several separate transactions which can lead to multiple actions and that can be cumbersome.

(iii) Limited security operations - EOAs rely solely on private keys for security, making them vulnerable if keys are lost or compromised.

2. Gas : Gas is referred to the fee that users pay in order to perform any action on the Ethereum network, like sending Ether or executing smart contract. It is measured in Ether and ensures that the network remains secure and efficient.

Account abstraction is an advanced concept in blockchain technology. It refers to the ability to make an account's address not necessarily tied to an EOA (Externally Owned Account). This means that an account can be controlled by a smart contract instead of a private key. This concept opens up new possibilities for smart contracts to control funds and interact with the blockchain in more complex ways. It can enable features like self-paying contracts, where the contract itself can pay for its own execution, among other innovative functionalities.

Account abstraction is a category of advanced blockchain technology that makes it easier to manage multiple accounts on different platforms. It is like having one master key that opens different lockers. Account Abstraction aims to unify both EOAs and Smart Contract for the benefit of getting full programmability and gain the ability to initiate transactions.

There are several proposals to Account Abstraction to enhance the security and efficiency of transaction, and the proposals are;

EIP 86 : Bare multisig AA

EIP 2938 : Account Abstraction

EIP 3074 : Auth and Authcall

EIP 4337: AA without protocol changes

EIP stands for Ethereum Improvement Proposal.These EIP proposals requires changes to the underlying protocol of Ethereum except EIP 4337, it is an Account Abstraction without protocol changes.

Roles of EIP 4337

The roles of EIP 4337 refers to the cryptography that can be used to determine or verify that a user is allowed to use smart contract and secure information.

They are as follows;

1. UserOperations

2. Bundler

3. Entry point

4. Paymaster

5. Smart Contract Account

Before EIP 4337 was proposed, users make use of their own private key which is going to submit a transaction unto the chain and interact with the main smart contract and connect with several smart contract potentially.

Some examples of main smart contract account are; Uniswap, Ethereum, Tezos and cardano. This main smart contract will call out to other ERC 20 contract and then once the transaction is successful, there will be state changes.

Also before EIP 4337 was proposed, moving accounts on chain or the funds, token and traits inside the EOA into an account using the smart contract requires gas fee and smart contract that needs to be funded but with the proposal of EIP 4337, instead of the user paying for gas, the pay master and the smart contract will pay for the gas fee on behalf of the user.

1. UserOperations: These are transaction objects created to execute transactions on behalf of the user. Execution occurs after the sender is confirmed. These operations are generated by dApp.

2. BUNDLER : The bundler fetches user operations from the memory pool and packages them together to send them to the entry point for execution. in order words the Bundler will sign the transaction initiated by the user and submit it on chain to the smart contract account.

3. ENTRY POINT : The entry point contract handles the execution and validation of the transaction operations passed to it. The global entry point contract receives packaged transactions from each bundler and runs the validation and execution loop through each user operation. The Entry point is also introduced in order to officiate and calculate the gas that is spent during a particular transaction and ensure that the smart contract pay for the gas.

4. PAYMASTER : The pay master oversees the payment processes within the Dapp, paymaster is the optional contract that pays gas for transactions on behalf of the user; instead of relying on their wallet, the user can get a transaction fee sponsored by the cashier and it play a vital role in handling financial and maintaining records related to payment.

5. SMART CONTRACT ACCOUNT : The smart contract account execute and make state changes.

6. Aggregator: Aggregators are wallet-trusted helper contracts that verify aggregated signatures.

The logic of the entire ERC-4337 standard operation consists of two loops: the validation loop and the execution loop, which together complete the account abstraction logic.

Validation loop: The entry point contract passes each user operation and invokes the check function in the sender. The sender runs this function to check the signature of the user operation and compensate the bundler.

Execution Loop: This loop sends the invocation data from each user operation to the sender. The wallet runs the execution operations for the transactions specified in the operation. The sender will refund the remaining gas after the operation is executed.

Verification loop and execution loop Source: EIP-4337

The introduced Paymaster role allows app developers to subsidize fees for their users. When the Paymaster is not equal to the zero address, the EntryPoint contract performs a different flow:

Features of Account Abstraction

1. It uses a single set of credentials, i.e one username and one password to access multiple accounts.

2. It manages all your account from one place without having to memorize different usernames and passwords.

3. It can also switch between accounts without logging in and logging out of each of them.

Benefits of Account Abstraction

1. Simplified log in : Account Abstraction makes use of one set of credentials to access multiple accounts, thereby eliminating the stress of cramming passwords.

2. Reduced password fatigue: There's no need to remember multiple usernames and passwords.

3. Streamlined accounts managements: Account Abstraction easily switch between accounts and manage them from one place.

4. Improved Security: It uses stronger passwords and two-factor authentication which is used for several accounts.

5. Increased productivity: it's saves time by avoiding multiple log ins.

6. New validation rules : A passkey is issued to each users using cryptography .

Disadvantages of Account Abstraction

1. Security risk : once one account has been compromised, all other connected accounts becomes vulnerable.

2. Dependence on a single account: if a master account is locked or unavailable then all other connected accounts may lose access too.

3. Limited flexibility: it is limited,some account abstraction may not support all types of account or service.

4. Limited control : individual's access to account setting and security is limited.

5. Privacy concerns: some individuals may be uncomfortable linking multiple accounts to a single set of credentials.

6. Technical issues : integration issues or technical glitches can occur when linking multiple accounts.

7. Additional complexity: setting up and managing account abstraction can add complexity especially for non- technical users.

8. Vendor lock - in : it may be difficult to switch to a different provider once an individual becomes reliant on a specific account abstraction solution.

9. Support limitations: support for account may be limited depending on the solutions and provider involved.

10. Potential for errors : Errors can occur when updating or syncing information across multiple accounts.

Conclusion

Account abstraction is like giving EOAs (Externally Owned Accounts) special powers in blockchain to allow smart contracts to control funds in a more advanced way, making transactions and financial arrangements more automated. It enables developers to create multiple accounts using one credentials and manage it effectively. Just as EOAs use private keys to perform transactions, smart contracts with account abstraction combined also enhance financial arrangements on the blockchain. It allows developers to make transaction beyond EOA with the help of EIP 4337 which enables more flexibility and advanced functionalities for developers.

References

SevenX Ventures:The Transformation of Ethereum Wallet: The Potential and Challenges of Account Abstraction and ERC-4337