Account Abstraction
Account abstraction is like allowing users to define their own bank account rules (e.g., daily limits, multi‑approval) instead of fixed bank policies.
Account abstraction improves wallet flexibility through:
Smart‑contract accounts: EOAs replaced by contracts with custom `validateUserOp`.
Meta‑transactions: Third‑party pays gas on behalf of user.
Custom verification: Multi‑factor, social recovery built‑in.
Unified UX: Abstracts gas tokens, enables pay‑masters.
An ERC‑4337 wallet contract lets a user submit a signed payload; a bundler executes it and receives payment in stablecoin via a paymaster contract.
ERC‑4337 defines `UserOperation` struct processed by EntryPoint contract. Wallet implements `validateUserOp` to check signatures or social recovery. Bundlers aggregate ops, call `handleOps`, and distribute gas fees per paymaster logic.
Complex validation logic expands attack surface; ensure thorough testing of `validateUserOp`.
Requires supporting infrastructure (bundlers, entry point) not yet universal.