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
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
Technical Scope
contracts/evm/paymaster/- Paymaster contractsbackend/src/services/account-abstraction/- bundler integration servicePaymasterBudget,UserOperationmodels