Account abstraction explained: from EOAs to ERC-4337 and zk-rollups
Thread936 words
Full explainer on Ethereum account types, how signing works, and how account abstraction enables sponsored and recurring transactions, multisig by default, social recovery and multicall. Covers native AA on zkSync and Starknet and the ERC-4337 route for L1.
Key claims
zk-rollups like zkSync and Starknet ship native account abstraction
ERC-4337 introduces AA through a separate UserOperation mempool and EntryPoint contract without a protocol fork
Full AA is not yet implemented on Ethereum L1
0/ a key issue hindering blockchain adoption is user experience. The primary interface to web3 for the user is the wallet, so improving wallet UI/UX is essential 馃弳
a GAME-CHANGER for wallet UX pioneered by @zksync & @StarkWareLtd is account abstraction
WTF is it? 馃
馃У (0/27)
1/ #Ethereum has two types of accounts:
馃敻 Externally Owned Accounts (EOA)
馃敻 Contract Accounts (CA)
2/ EOAs are accounts owned by something external to the #blockchain, namely users
they have three properties:
馃敻 a balance
馃敻 a nonce
馃敻 an address
the state of the blockchain and an account can only be modified through transactions initiated from an EOA
3/ to prove account ownership, every account on #Ethereum is associated with a cryptographic object called a signer, also known as a keypair
it's made of two keys:
馃敻 a private key
馃敻 a public key
4/ the private key, also known as the secret, can be used to sign digital messages (transactions & smart contract interactions) and the public key can be used to verify that a given signature was signed by its corresponding private key
5/ for a refresher on public key cryptography check the below thread 馃憞
x.com/expctchaos/status/1606802933257240578
6/ #Ethereum uses a specific signature scheme called ECDSA on a specific elliptic curve called Secp256k1
the address of an EOA is derived from the public key of the signer and is the last 20 bytes of the keccak-256 hash of the public key
7/ for a refresher on ECDSA check the below thread 馃憞
x.com/expctchaos/status/1607043514717835266
8/ the owner of the account can authorize a tx by signing the transaction with the corresponding private key
the EVM will then verify that the signature is valid, execute the transaction (with another EOA or a smart contract) & deduct the transaction fee from the account balance
9/ if you want to know what the EVM is, have a look here 馃憞
x.com/expctchaos/status/1569717621284806656
10/ however, while these user-controlled accounts have pioneered self-custody, they only have very limited functionality
11/ that's where account abstraction (AA) comes to the rescue
AA is the process of turning accounts into smart contracts with their own logic to define what a valid tx is
this allows for flexibility in defining
馃敻 different signing schemes
馃敻 multiple keys
馃敻 & more
12/ this powerful feature allows for customizing accounts to fit specific needs & basically creates endless possibilities for new use cases on chains that support account abstraction
13/ a few examples include:
馃敻 sponsored transactions
馃敻 recurring transactions
馃敻 multi-sig wallets
馃敻 social recovery
馃敻 multi-call
14/ let's explore in a bit more detail
馃捀 sponsored transactions
dApp developers could choose to subsidize the transaction fees as part of their onboarding process, removing one of the biggest friction points for new crypto users
15/
馃攧 recurring transactions
currently, all txs on a self-custodial wallet (EOA) have to be approved synchronously. With AA, txs could be scheduled with a time delay, or according to event-driven flows. This would allow for something like automated, recurring payments
16/
馃攽 multi-sig wallets
now, multi-sig wallets require EOAs to initiate a tx, pay the gas & call the multi-sig smart contract. With AA, accounts can be programmed to require multiple signatures before a tx can be executed, making every account a multisig wallet by default
17/
馃懃 social recovery
traditional wallet recovery relies on a seed phrase. This can be problematic if a user loses access to the seed phrase or if it's stolen. AA enables social recovery where users designate multiple trusted individuals as recovery agents
18/
馃攢 multi-call
currently, LPing on a DEX like @uniswap requires three txs:
馃敻 approving token A
馃敻 approving token B
馃敻 depositing into the pool
With AA-enabled multi-call, users can do all of this in one atomic transaction, making it easier, safer & faster (image @hasufl)
19/ while AA has been discussed since 2016 and an Ethereum Improvement Proposal (EIP) was initially proposed in 2017, full AA is still not yet implemented on Ethereum today
20/ luckily, #zk-rollup L2s like @StarkNet and @zkSync come to the rescue with native AA support right out of the gates and finally bringing the possibilities of AA to the Ethereum ecosystem
21/ two leading projects working on smart contract wallets, thereby enabling AA use cases are
馃敻 @argentHQ
馃敻 @myBraavos
make sure to check them out!
22/ but will AA never make it to #Ethereum L1?
it likely will. In 2021, Vitalik & others submitted #EIP4337, which aims to introduce AA without altering core #Ethereum or requiring a fork. Instead, it proposes the creation of a higher-level system, a separate mempool
23/ under #EIP4337, users send UserOperations to the new mempool, which bundles them and submits to Ethereum as a single transaction
24/ the bundle is sent to the EntryPoint contract for execution, which ensures the correct execution of the operations and takes care of compensating the miner/bundler for the transaction fee
25/ #EIP4337 decouples parts of EOAs' actions (e.g. transactions) from core #Ethereum, moving them to the Ethereum Virtual Machine (EVM) for increased flexibility, upgradability & interoperability
26/ since the #EVM is separate from core #Ethereum, modifications can be made more quickly
27/ by enabling this wide array of new use cases and massively improving UX, account abstraction will be a game-changer for the adoption of #crypto & #blockchain technology as a whole 馃殌
a few $ETH & L2 chads that might like this 馃
@ukolodny
@EliBenSasson
@odin_free
@StarkNetGod
@daddysether
@kunalgoel
@redvelvetzip
@hmalviya9
@thesaint_
@StarkNet_Aficio
@AlphaInsiders
@0xDinoEggs
@0xbilly
@0xFlips
@Starknet_OG
@StarkNetEco
1/2
@crypto_condom
@0xNurstar
@ShivanshuMadan
@Slappjakke
@3house_io
@Layer2NewsDAO
@0xgoku_
@bkiepuszewski
@zkSync_daily
@Layer2_Master
@StarknetDaily
@StarknetHouse
@CryptoMaestro
2/2

5 more images on X
What came next 路 since 03 Apr 2023
Since then
Zero has written 4 more pieces on zkSync since this one.
- Make ICOs Great Again: how VC-dominated token launches broke crypto marketsOn zkSync
- The ZK trademark saga: Matter Labs, zkSync and the community backlashOn zkSync
- zkSync Era as a volition: zkPorter accounts and Guardian-secured off-chain DAOn zkSync
- zkSync ZK Stack explained: hyperchains, L3 recursion and hyperbridgesOn zkSync