Skip to content

Add an ERC20gatedPaymaster contract #12

Open
@dutterbutter

Description

@dutterbutter

Paymaster Description

Objective: Implement an ERC20GatedPaymaster that covers gas fees for users based on their possession of a specific ERC20 token.

Functionality:

  • Before agreeing to pay the gas fee, the ERC20GatedPaymaster will verify if the user holds a certain ERC20 token in their account.
  • The user must have a balance greater than 0 of the specified ERC20 token to be eligible.
  • If eligible, the paymaster will cover the corresponding gas fees for the user's transaction.

Rationale

  1. Extended Utility for Tokens: This paymaster concept augments the utility of governance tokens and other ERC20 tokens. Token holders can engage in platform activities without the concern of gas fees.
  2. Innovative Use Cases: Projects can incentivize their communities to hold onto their tokens by offering gas-free transactions.
  3. Ease of Adoption: With the proliferation of ERC20 tokens in various projects, a ready-to-use ERC20GatedPaymaster can easily be adopted and integrated, making it a valuable tool for numerous projects.

Additional Information

  • Extending Considerations: While the primary check is for a non-zero balance, the contract can potentially be extended to require minimum token thresholds for different tiers of gas fee coverage.

Task deliverable

  • Adds ERC20GatedPaymaster contract
  • Add to the UI integration
  • Add unit tests
  • Updates readmes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions