Let’s Understand EIP-4337

6 min read

Learn how EIP-4337, Account abstraction improves DeFi user experience and adoption.

Introduction#

Changpeng Zhao, CEO of Binance, mentioned in one of his tweets that sending $200 via cryptocurrency would be significantly cheaper than transferring the same amount using standard payment methods. Unfortunately, cryptocurrency applications have lacked easy-to-use User Interface (UI) design along with a number of capabilities that online banking offers. Until now.

Ethereum EIP-4337 is a new and recently announced standard that defines what is called account abstraction or perhaps better described as “smart accounts”. The implications of this are huge.

Firstly, it means that onboarding the next billion users will be a lot more straightforward because newcomers won't have to learn about seed phrases or wallet setup. Learning about cryptographic keys and the extensive security measures needed to protect them has been a constraint to mainstream adoption of crypto projects. The new EIP-4337 standard underpinning smart accounts enables users to sign blockchain transactions with 2FA (two factor authentication) using a mobile phone fingerprint or face-scan.

It also allows rules based transaction security such as monthly spending restrictions and utilizing session keys to play blockchain games without approving transactions. Lost phone or device users can employ time-locked social recovery via trusted friends or a commercial solution.

Features and Benefits#

The majority of existing Ethereum-based wallets are externally owned accounts (EOA), using software systems like MetaMask and Coinbase Wallet or hardware systems such as Ledger. Both systems use keys or mnemonic to control one or more Ethereum accounts. As a result, if the keys associated with an account are compromised or lost, any digital assets contained within the wallet are also lost.

The purpose of account abstraction is to make accounts adaptable to user requirements. This comes with a handful of new features, as listed below. 

  • Bundle Transactions

    By bundling transactions into User Operations, users can now perform multiple operations with a single click. This eliminates the need to request a signature for each individual action on the blockchain, instead substituting one for the entire batch.

    This would bring blockchain transactions inline with what individuals are more commonly used to in fiat transactions where a group of items bought together from a shop are paid for in one transaction, and not in payments for each and every product.

  • Sponsor Transactions

    It also minimizes the need for Ether. Users will now be able to pay gas fees with stablecoins. or sponsor their transactions when using a client-hosted service.

  • Authentication

    A user specifies how their account should approve transactions. This enables session keys, BLS signaturesJWT authentication, multi-signature, account recovery, and other features. A user can also delegate signature logic to an aggregator.

    Hence, if a consumer wishes to make a standard purchase, they can do so via a mobile device. For transactions with a bigger transaction amount, customers can use their hardware wallet instead. All of these procedures are scriptable within the account.

  • Security

    Account security models can now be customized to establish and improve security. This includes the ability to enable spending limits on specific devices, multi-signature for specific transaction types, and any other arbitrary logic that can be baked into a smart contract.

    If a user loses their phone, time-locked social recovery allows a group of trusted friends or even a commercial business to assist them in retrieving it without putting the funds at risk.

Potential Use Case#

Account Abstraction will transform how Ethereum interacts with smart contracts by giving access to numerous contract types from a single address. This allows for greater flexibility by separating the control of an Ethereum account from its address. Hence, the previous approach to wallets, which required users to keep track of many contract addresses, is simplified, allowing for an improved user experience and streamlining wallet functionality for flexible smart contract interactions.

By removing the complexity of engaging with smart contracts everyone may now profit from decentralized applications. It will also make ETH more accessible to the general public by lowering the requirement for technical expertise.

Multi-signature wallets are a common approach to securely storing cryptocurrency. With account abstraction, it is possible to establish multi signature wallets with many owners and more sophisticated access control measures. Moreover, account abstraction could be utilized to develop more secure and efficient Decentralized Exchange (DEXs) that cut gas costs and enhance privacy.

Account abstraction will also enable the development of smart contracts with multiple owners or more sophisticated access control measures. This enables the creation of more secure and sophisticated contracts that may be used for a larger variety of purposes.

Account Abstraction#

Yoav Weiss, the security researcher at The Ethereum Foundation, announced at WalletCon that the core-contracts for "ERC-4337: Account Abstraction Using Alt Mempool" have passed an audit by Open Zeppelin and will be made available on Ethereum and every other chain compatible with the Ethereum Virtual Machine, including BNB Smart Chain, Polygon, Arbitrum, Optimism, Gnosis Chain, and Avalanche.

This standard has been implemented using the EntryPoint smart contract, which can be observed on multiple chains.

Account abstraction is a way to separate an Ethereum address from an Ethereum contract. Up until now, when a smart contract was created, it was associated with an Ethereum address. This means that any interaction with the contract must go through that address. Account abstraction, on the other hand, allows for the creation of contracts that are not tied to a specific address, making it easier to develop more complex contracts and reducing gas costs.

According to the EIP-4337 specification, account abstraction entirely eliminates the need for consensus-layer protocol changes. This update adds a pseudo-transaction object at a higher level called a UserOperation instead of adding new protocol features and changing the type of transaction at the bottom-layer.

A UserOperation is not a transaction; it is a structure that describes a transaction that a user wants to be sent on their behalf. Users send UserOperation objects into a dedicated user operations mempool. There exists a special category of actors called a Bundler, also termed a node or a block builder, who listens in on the user operation mempool, and bundles multiple UserOperations into a transaction. A bundle transaction packs up multiple UserOperation objects into a single handleOps, and creates an EntryPoint call to the contract, before the transaction is included in a block.

In order to prevent a possible replay attack, the signature should also depend on two parameters, the chainId and EntryPoint address. Prior to this, a smart contract included a nonce in the signed data. The nonce is a unique sequential number that is part of the signed message, and it ensured that the signatures required for each successful call were distinct.

However, this new practice of using a chain-specific signature scheme which includes the chainId in the signed message will be beneficial for both cross-chain as well as multiple EntryPoint implementations. By doing so, transactions signed on one chain will not be recognized as valid on another chain with a different ID. This ensures that a transaction signature is only valid on the intended chain and cannot be replicated on another chain.

Stackup was the first company to develop a fully compliant bundler. Alchemy also revealed their first two products in the space, Bundler Services and Paymaster Services, as well as plans to roll out additional infrastructure later this year. Candide, Etherspot, Blocknative, and Biconomy also developed and deployed bundler clients, which are critical for the robustness of the protocol.

Conclusion#

Account Abstraction and EIP-4437 is a huge step towards onboarding the next generation of blockchain users and will greatly enhance user experience for existing users. These newly released and proposed features provide a new door to a vast array of opportunities.

In order to promote EIP-4337 development and research, the Ethereum Foundation has also announced a grant of $300,000. This will enable newer innovation and platform innovation surrounding this release.

If you have suggestions as to how Neptune Mutual could integrate smart accounts to improve UI/UX please send us your suggestions in our Discord channel.

Reference Sources John RisingCoinTelegraph

By

Tags