🌱
Dev Compendium
  • Ethereum
    • Solidity
      • EVM
      • Architecture
      • Execution Context
      • Transactions
      • Gas
      • Calldata, Memory & Storage
      • Gas Optimisation
      • Function Declarations
      • receive() & fallback()
      • CALL vs. DELEGATE CALL
    • Yul
      • Introduction
      • Types
      • Basic Operations
      • Storage
      • Memory
        • Arrays
        • Structs
        • Tuples, revert, keccak256
        • Logs and Events
        • Gotchas
        • abi.encode
      • Calldata
        • External Calls
        • Dynamic Length Inputs
        • Transferring Value
        • Receiving Contract Calls
      • Contracts in Yul
      • Other Yul Functions
    • Foundry
    • Security
      • Common Vulnerabilities
      • Best Practices
      • Development Workflow
      • Contract Migration
    • Auditing Tools
      • Slither
      • Mythril
      • Fuzzing
    • Upgradable Contracts
      • Upgrade Patterns
      • ERC-1967 Implementation
      • Deployment
    • MEV
    • Tooling
      • Chainlink
      • IPFS
      • Radicle
    • Frontend
      • Contract Hooks
      • Wallet Connection
        • wagmi.sh
        • Rainbow Kit
      • thirdweb
    • Protocol Research
      • Uniswap v2
      • Uniswap v3
      • Curve
      • GMX
  • Starkware
    • Fundamentals
    • Account Abstraction
    • Universal Deployer
    • Cairo 1.0
    • starknet.js
    • Security Model
  • Zero Knowledge
    • Group Theory
    • ECDSA
  • Rust
    • Basic Operations
    • Set up
    • Primitives
    • Control Flow
    • Mutability & Shadowing
    • Adding Behavior
    • Lifetimes
    • Std Library
  • SUI
    • Architecture
    • Consensus Mechanism
    • Local Node Setup
    • Sui Client CLI
    • Move Contracts
      • Move
      • Move.toml
      • Move.lock
      • Accessing Time in Sui Move
      • Set up Development Framework
      • Debug & Publish
      • Package Upgrades
      • Sui Move Library
      • Difference from Core Move
    • Object Programming
      • Object Basics
      • Using Objects
      • Immutable Objects
      • Object Wrapping
      • Dynamic Fields
      • Collections
      • Unit Testing
      • Deployment with CLI
  • NEAR
    • Architecture
    • Contract Standards
      • Fungible Token (NEP-141)
      • Non-Fungible Token (NEP-171)
      • Storage Management (NEP-145)
      • Events (NEP-297)
      • Meta-Transactions
    • Rust Contracts
      • Development Workflow
      • Smart Contract Layout
      • Storage Management
      • Events & Meta-transactions
      • Method Types
      • Upgrading Contracts
      • Unit Testing
    • NEAR Libraries
    • Environment Variables
    • Serialisation
    • Security Concepts
    • Collections
    • JS SDK
Powered by GitBook
On this page
  1. Starkware

Account Abstraction

Why Account Abstraction

  • limtations of EOAs

    • can only sign txns

    • only support one elliptic curve (secp256k1)

    • difficult seed phrase management

    • no txn batching - gas is expensive

  • multi-sigs on L1

    • e.g. gnosis safe

    • cant start or sign txns

    • second class citizen on ethereum

    • limited support and flexibility

  • goal of account abstraction (4337) is to make smart contract wallets first class citizens

    • customized signature verification (can use different elliptic curves)

    • transaction bundling (multicall)

    • paying fees with non-native tokens

    • payment delegation

  • differences between AA on Ethereum and Starknet

    • ethereum: application layer, starknet: protocol layer

    • both support custom signatures

    • fee delegation: ethereum has paymaster smart contract, starknet has metatransactions

  • signature verification and tx execution logic defined as a smart contract

  • process of having to sign multiple transactions to conduct a single function (e.g. swap) exposes user to potential MEV attacks & other inefficiencies

  • multicall on starknet

    • multiple steps (user operations) as a single transaction

    • create a bundle with all req. txns, and execute entire bundle at the same time in one block

  • with AA, user accounts are smart contracts

  • to deploy a smart contract, you need to pay gas fees

  • but to pay gas fees you need a user account

  • how does one deploy a user account if you dont have a user account to pay gas fees?

  • solution: counterfactual deployments

    1. calculate the address off-chain

    2. send funds to the address

    3. deploy your user account

    4. starknet OS deducts gas fees

PreviousFundamentalsNextUniversal Deployer

Last updated 1 year ago