Skip to content

Account Abstraction Architecture

This page illustrates the transaction flow for SBC's Account Abstraction implementation, covering both ERC-4337 for gasless transactions and EIP-7702 for atomic multi-step operations.

ERC-4337 Transaction Flow

The following diagram illustrates how SBC's Account Abstraction implementation works using ERC-4337:

ERC-4337 Transaction Flow

Flow Explanation

  1. User Submission: The user creates and signs a UserOperation, which is like a transaction but with more flexibility.

  2. Bundler Processing: SBC's bundler service:

    • Validates the UserOperation
    • Bundles it with other operations for efficiency
    • Submits the bundle to the EntryPoint contract
  3. Wallet Validation: The EntryPoint contract validates:

    • The wallet's signature
    • The operation's validity
    • Required permissions
  4. Gas Handling: Instead of users paying gas:

    • The EntryPoint coordinates with the SBC Paymaster
    • Gas costs are covered in SBC tokens
    • Users don't need native tokens (ETH)
  5. Payment Authorization: The Paymaster:

    • Verifies the user has sufficient SBC balance
    • Authorizes the gas payment
    • Manages gas sponsorship rules
  6. Execution: Finally:

    • The EntryPoint executes the validated operation
    • The target contract receives the call
    • The transaction is completed without user gas fees

EIP-7702 Transaction Flow (Upcoming)

EIP-7702 is a new proposal that enables EOAs (regular wallets) to temporarily execute smart contract code during a transaction without permanently converting to a smart account. The key aspects include:

  1. Temporary Smart Contract Execution: EOAs can specify a contract_code field in their transaction that will be executed only during that specific transaction.

  2. No Permanent Changes: Unlike other approaches, the smart contract code is automatically removed after the transaction completes, keeping the EOA's original properties.

  3. Direct Integration: No need for additional contracts or infrastructure - the EOA directly executes the smart contract code, making it simpler and more secure than alternatives like EIP-3074.

  4. ERC-4337 Compatible: The approach aligns with the broader account abstraction roadmap and works seamlessly with existing ERC-4337 infrastructure.

Integration with SBC AppKit

SBC's AppKit abstracts much of this complexity, providing developers with a simple API to interact with both ERC-4337 and EIP-7702 transaction flows. By using the AppKit, developers can:

  • Send gasless UserOperations without managing bundler or paymaster interactions directly.
  • Prepare for atomic transaction bundles with EIP-7702 support once fully integrated.

Next Steps