### Account abstraction on Ethereum `------` Vid Kersic, Blockchain Lab:UM, Ethereum Protocol Fellow Ethereum Slovenia Meetup Feb 1, 2024 --- ### Goals `------` 1. What is the current status quo of accounts? 1. What's wrong with the current status? 1. What is account abstraction and why do we need it? 1. Future of account abstraction <!-- .element: style="text-align:left" --> --- ### Vitalik's quote `------` *"Account abstraction is something that has for a long time been a dream of the Ethereum developers"* Discussions about **AA** started around **2016/2017** <!-- .element: style="font-size:24px" --> --- ### Status quo of Eth transactions `------` 1. Setup **Web3/crypto wallet** (mobile, browser extension, hardware ...) 2. Create a **seed phrase** (those 12/18/24 words) 3. Generate some **accounts** (seed phrase -> private key -> public key -> address) 4. Send transactions from **address** signed by a **private key** Most adopted Ethereum accounts: **Externally Owned Accounts (EOA)** --- ### What's wrong with EOA? `------` You **mustn't** lose your seed phrase Need some **ETH** to use it Limited to **single cryptographic algorithm** (secp256k1, not quantum secure) **Sequential transactions** - incremental nonce **One account** always used by **one person** <!-- .element: style="text-align:left" --> --- ### But we already have another way... `------` **Contract Accounts (CA)** are already here and in prod! **Account** is a **smart contract** Controlled/governed by **code** You can implement **anything you want**, infinite possibilities - multi-sig (2/3, 3/5, ...), social recovery <!-- .element: style="text-align:left" --> --- ### Examples of Contract Accounts `------` **(Gnosis) Safe** (multi-sig wallet - 2/3, 3/5 ..., from 2019) **Argent** (account abstraction wallet, social recovery, from 2018) <!-- .element: style="text-align:left" --> --- ### What's wrong with Contract Accounts? `------` <img src="https://hackmd.io/_uploads/Bk-v7mV5a.png" alt="meme_ca" width="325"/> https://ambergroup.medium.com/account-abstraction-will-evolve-wallets-69446574e544 <!-- .element: style="font-size:18px" --> --- ### What's wrong with Contract Accounts? `------` **No standardization**, wallets from different vendors not compatible Multi-sig wallets - **still need EOA** **Private/centralized relayers** (not decentralized and fully censorship-resistant) Use of contract account limit to **single use case** <!-- .element: style="text-align:left" --> --- ### EOA vs. Contract Account `------` **EOA** <!-- .element: style="text-align:left;font-size:40px;" --> - Free to create - Controlled by a single private key (derived from seed phrase) - Can initiate transactions <!-- .element: style="font-size:32px" --> **Contract Account** <!-- .element: style="text-align:left;font-size:40px;" --> - Must deploy smart contract - Controlled by logic/code - Cannot initiate transactions, must be done by EOA <!-- .element: style="font-size:38px" --> --- ### Account abstraction `------` *How to abstract all components of accounts while preserving decentralization and censorship restitance of Ethereum?* --- ### Yoav's quote `------` *"Account abstraction is easy… unless you care about censorship resistance"* https://hackmd.io/@timbeiko/censorshipwtf <!-- .element: style="font-size:24px" --> --- ### Account abstraction `------` What are the main components we want to abstract? - how we pay for transactions - **gas abstraction** - how we verify if transaction is correct - **signature/validation abstraction** - which transaction is next - **nonce abstraction** <!-- .element: style="text-align:left" --> --- ### History of AA on Ethereum `------` **EIP-2938**: smart contracts can start transaction execution (new EVM opcodes) **EIP-3074**: delegate control of EOA to a smart contract (new EVM opcodes) **ERC-4337**: account abstraction using alt mempool --- ### ERC-4337 `------` ![Screenshot from 2024-01-27 17-33-38](https://hackmd.io/_uploads/HkU_g2z5T.png) https://eips.ethereum.org/EIPS/eip-4337 <!-- .element: style="font-size:18px" --> --- ### ERC-4337 `------` **The latest proposal** for AA (still Contract Accounts, but more generalized) **ERC**, not EIP!!! (no changes to the core protocol) Covers **all wanted feature**s: <!-- .element: style="text-align:left" --> - **gas abstraction** - pay with any token :heavy_check_mark: - **nonce abstraction** - parallel transactions :heavy_check_mark: - **signautre/validation abstraction** - post-quantum cryptography, passkeys, multi-sig :heavy_check_mark: <!-- .element: style="text-align:left" --> --- ### Architecture `------` Transactions are now **user operations** Centralized relayers replaced with **bundlers** Gas sponsoring enabled by **paymasters** Single point of entry on the Ethereum - **entry point smart contract** <!-- .element: style="text-align:left" --> --- ### User operations workflow `------` 1. Setup **AA wallet** (passkeys, seed phrase, hardware wallet) 2. (Optional) Setup **rules** (over 1k USD Ledger otherwise MetaMask, social recovery) 3. (Optional) Use **paymaster for gas** 4. Send **user operation** to **bundler** 5. Bundlers send **batch of user operations** to **public transaction mempool** --- ### Architecture `------` <img src="https://hackmd.io/_uploads/Bkr_T-79a.png" alt="4337_architecture" width="750"/> https://twitter.com/probablynoam/status/1648080136439488513?s=61&t=tfKGnxF3fow02GH1cn2qLQ <!-- .element: style="font-size:18px" --> --- ### ERC-4337 order flow `------` <img src="https://hackmd.io/_uploads/Bk2JV3McT.png" alt="4337_supply_chain" width="750"/> https://hackmd.io/@dmarz/4337-mev-supply-chain <!-- .element: style="font-size:18px" --> --- ### Use cases `------` - Session keys - Transaction batching - Contract/account whitelisting - Social recovery - Multi-sig wallets - Spending limits - Custom tokens to pay for gas - Anything you can think of :) <!-- .element: style="text-align:left" --> --- ### Projects working on the ERC-4337 `------` **Standard:** Eth Infinitism (or OpenGSN or ERC-4337 core devs) **Paymasters**: Pimlico, Stackup, Circle (USDC) **Bundlers**: Alchemy, Stackup, Pimlico, Etherspot, Silius :) **Wallets**: Candide Wallet, Ambire Wallet, MetaMask **dapps**: Gnosis Safe, CyberConnect <!-- .element: style="text-align:left" --> --- ### What's next? `------` - Bundlers are currently solo -> **public P2P mempool for user operations** - RIP-7560 -> **native account abstraction** (but first on rollups/L2s) - Changes and updates to entry point smart contract -> **gas and other optimizations** <!-- .element: style="text-align:left" --> --- ### What's next? `------` - ERC-6900 & ERC-7579 -> **modular account abstraction** (plugin system for smart accounts) - **Support for AA in existing dapps** and **onboarding million/billion of users** <!-- .element: style="text-align:left" --> --- ### Thank you for your attention `------` <img src="https://hackmd.io/_uploads/BJizx7Eqa.jpg" alt="4337_supply_chain" width="150" style="position:absolute;top:175px; right:150px;border-radius:50%;" /> **Email:** vid.kersic@yahoo.com **Twitter/X:** @vidkersic **Farcaster:** kersic.eth **Lens:** @vidkersic <!-- .element: style="text-align:left" --> Wanna contribute (bundler)? https://github.com/silius-rs
{"title":"Account abstraction - Ethereum Slovenia Meetup (Feb 2024)","description":"asdfasdf","contributors":"[{\"id\":\"8103498f-8143-48d2-bd0e-722916c5884f\",\"add\":11385,\"del\":3953}]","slideOptions":"{\"theme\":\"white\"}"}
    529 views