Skip to content

Implementing Sponsored Transactions on Taiko #17807

@dantaik

Description

@dantaik

Objective

I aim to enable gasless transactions for users without requiring smart contract modifications, allowing willing parties to sponsor transaction gas fees (base fee and tip) on behalf of users.

Key Benefits

  1. Enhance user adoption by removing gas fee barriers
  2. Provide flexibility for businesses to subsidize specific transaction types
  3. Maintain EVM equivalence while offering a unique feature

Use Cases

  1. Stablecoin issuers can subsidize fees for token transfers, boosting adoption
  2. Game developers can cover fees for in-game transactions, improving user experience

Feature Description

I propose adding a new transaction type called "Sponsored Transaction" that allows a sponsor to pay for an original transaction's gas fees. The sponsored transaction references a pending original transaction from the mempool or received directly from the user.

Key Aspects

  1. Sponsor provides equal or higher base fee and tip values compared to the original transaction
  2. Blockchain executes the original transaction, respecting its gas limit and data
  3. 'msg.sender' remains the original transaction's sender address
  4. Gas fees are deducted from the sponsor's account
  5. Original transaction sender's nonce is incremented; sponsor's nonce is ignored
  6. Additional gas overhead applied to sponsored transactions

Implementation Details

  1. Allow zero-price original transactions in the mempool for a few minutes
  2. Introduce a sequence ID for sponsored transactions to manage replacements
  3. Implement mempool management to prioritize highest-paying sponsored transactions
  4. Ensure proper nonce management to prevent attacks on sponsors

Unrelated to Account Abstraction

This feature focuses on enabling EOAs to sponsor other EOAs' transactions, distinct from smart contract-based account abstraction proposals like EIP 4337 or EIP 7702.

Why Taiko Should Implement This Feature

  1. Differentiation: Offer a unique feature that sets Taiko apart from other L2 solutions
  2. Partnerships: Facilitate collaborations with stablecoin issuers and game developers
  3. User Growth: Lower barriers to entry for new users, driving adoption
  4. EVM Compatibility: Maintain EVM equivalence while adding valuable functionality
  5. Flexibility: Easy to deprecate if needed, minimizing long-term risks

Next Steps

  1. Conduct a security analysis to identify potential vulnerabilities
  2. Develop a detailed technical specification
  3. Implement a prototype for testing and benchmarking
  4. Gather feedback from potential partners and the community
  5. Refine the implementation based on feedback and testing results

By implementing sponsored transactions, I believe Taiko can offer a powerful tool for ecosystem growth while maintaining its core principles of EVM equivalence and scalability.

Spam policy

  • I verify that this issue is NOT SPAM and understand SPAM issues will be closed and reported to GitHub, resulting in ACCOUNT TERMINATION.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions