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:
Flow Explanation
-
User Submission: The user creates and signs a UserOperation, which is like a transaction but with more flexibility.
-
Bundler Processing: SBC's bundler service:
- Validates the UserOperation
- Bundles it with other operations for efficiency
- Submits the bundle to the EntryPoint contract
-
Wallet Validation: The EntryPoint contract validates:
- The wallet's signature
- The operation's validity
- Required permissions
-
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)
-
Payment Authorization: The Paymaster:
- Verifies the user has sufficient SBC balance
- Authorizes the gas payment
- Manages gas sponsorship rules
-
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:
-
Temporary Smart Contract Execution: EOAs can specify a
contract_code
field in their transaction that will be executed only during that specific transaction. -
No Permanent Changes: Unlike other approaches, the smart contract code is automatically removed after the transaction completes, keeping the EOA's original properties.
-
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.
-
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
- Learn how to integrate using the SBC AppKit.
- Explore supported Smart Account Implementations.