Skip to content

Contract: Implement EVM Paymaster with ERC-4337 Account Abstraction #464

Description

@Smartdevs17

Context

ERC-4337 enables smart contract wallets with gas abstraction, batch transactions, and social recovery. AgenticPay should leverage this for superior user experience.

Current Limitation/Problem

AgenticPay currently uses EOA-based wallets. Users must manage private keys and hold native gas tokens. ERC-4337 is not integrated.

Expected Outcome

An ERC-4337-compatible paymaster contract and bundler integration that sponsors gas for user operations, supports batched transactions, and enables session keys for seamless UX.

Acceptance Criteria

  • Deploy ERC-4337 EntryPoint compatible paymaster contract
  • Implement verification paymaster (pre-signed sponsorship) and deposit paymaster (pre-funded)
  • Integrate with existing bundler infrastructure (Stackup, Pimlico, or custom)
  • Support batched user operations (multiple actions in one tx)
  • Implement session key mechanism for recurring approvals
  • Handle gas estimation with paymaster sponsorship
  • Dashboard for paymaster budget management and usage analytics
  • Fallback to user-paid gas when paymaster unavailable

Technical Scope

  • contracts/evm/paymaster/ - Paymaster contracts
  • backend/src/services/account-abstraction/ - bundler integration service
  • Integration with ethers.js UserOperation handling
  • Prisma: PaymasterBudget, UserOperation models
  • Edge cases: signature validation failure, deposit exhaustion, operation expiry, entry point upgrades

Metadata

Metadata

Assignees

Labels

200-points200 point issueStellar WaveIssues in the Stellar wave programdrips-waveIssues in the Drips Wave programhighHigh complexity issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions