Cover photo

Basics of ERC-4337

ERC-4337 went live on the Ethereum network — the most significant milestone in Web3 since the merge! This article will provide a brief overview of the important of ERC-4337 and its importance!

First, what is an account?

  • An account is a unique identity on the network that can send and receive transactions from, aka your wallet address.

Types of Accounts — EOAs & it’s disadvantage

  • EOA(Externally owned accounts) that is controlled by 1 simple private key, aka Metamask

Metamask mobile (Credit: consensys)
Metamask mobile (Credit: consensys)
  • Risky — because losing your private keys means you lose your access to the fund and assets in your account!

  • +Risky — Users are getting scammed by signing malicious smart contracts

  • Limits — Creating an EOA is certainly not easy, with the need of recording the private keys and their wallet address. Also, the user experience is horrible such as fund transfer with other blockchains, initiate transactions, pay gas fees, for which requires extensive learning and knowledge on the dApp to operate (shown below)

new user onboarding flow with EOAs (Credit: jarrodwatts.eth)
new user onboarding flow with EOAs (Credit: jarrodwatts.eth)
  • Limits — Cannot execute complex logic based transactions (can only perform simple transactions & store data/assets/funds)

Types of Accounts — Smart accounts & it’s advantage > EOA

  • Smart accounts that is controlled by code and has code-defined behaviors, in which is represented by a smart contract.

  • Essentially smart accounts are codes. Anything that can be written on a smart contract to execute could be done in smart accounts, making it more applicable for future applications vs limited function’s EOA.

Small tech sharing behind the scenes of Smart Accounts

  • I will not diving in tech in the article but in simple terms, it uses alternate mempool, bundler, and a singleton smart contract to execute and perform the contract code:

simplified flow of EIP-4337 (Credit: jarrodwatts.eth)
simplified flow of EIP-4337 (Credit: jarrodwatts.eth)

So why is Smart Accounts > EOA?

It will improve the user experience of web3, increasing web3 adoption

Credit (academy.binance.com)
Credit (academy.binance.com)
  • Daily Usage: Let non-crypto native people to perform actions without having to sign an transaction, could be based on specific actions instead!

  • dApp Usage: Ability to create wallets for new users behind the scenes for dApps without concern about custodial or not.

  • Game Usage: Allow multiple transactions within game sessions, so user doesnt need to approve transaction every time in blockchain games.

example use cases of smart contract wallets (Credit: jarrodwatts.eth)
example use cases of smart contract wallets (Credit: jarrodwatts.eth)

ERC-4337 could really enable the vision that most people are discussing and aiming at, where:

Users can use applications just like web2, but they are operated by web3/blockchain technology!

References:

https://mirror.xyz/jarrodwatts.eth/aSM5AV5s0p-9_8N0pksXi64ysFni8SHTuRsaStCt2ZU?source=post_page-----e4983e3eb675--------------------------------

https://eips.ethereum.org/EIPS/eip-4337?source=post_page-----e4983e3eb675--------------------------------

https://academy.binance.com/en/articles/what-is-erc-4337-or-account-abstraction-for-ethereum?source=post_page-----e4983e3eb675--------------------------------