ERC-4337 Verifying Paymaster(Beta)

1. Introduction

ERC-4337 provides an excellent approach to account abstraction. Based on ERC-4337, Zan offers bundler services on multiple blockchain networks like Ethereum, Polygon, Optimism, etc. Users can send a higher-layer pseudo-transaction object called a UserOperation to the bundler service, enabling them to utilize smart contract accounts(SCA) on the blockchain for transferring funds or interacting with contracts, without the involvement of an EOA (Externally Owned Account).

Nevertheless, to ensure transaction success, users' SCA must possess sufficient tokens to compensate the bundler, who advances the gas fees. This presents confusion for a Web3 newcomer: How do I transfer funds to a smart contract account? Do I need to own an EOA to hold tokens? How do I acquire tokens? Answering these questions can be challenging for someone new to blockchain but eager to experience Dapp capabilities.

For mass adoption of Web3, user-friendly interactions for newcomers are essential. The ideal scenario is one where users can engage with Web3 as effortlessly as they do with Web2 services, experiencing the benefits of Web3 and avoiding technical complexities. Fortunately, the role "Paymaster" was introduced in ERC-4337. When users send a UserOperation attached with a Paymaster voucher (also known as paymasterAndData), the on-chain Paymaster contract can cover token payments to the bundler, eliminating the need for the SCA address to hold initial tokens.

Zan is introducing the Account Abstraction (AA) Paymaster service to advance account abstraction and improve Web3 usability. Users can easily create a sponsorship policy using the Node Service's API key and obtain a paymaster voucher using the policy ID.


2. Who benefits from our AA Paymaster service?

For Dapp developers, attracting new users to try out Dapp functionalities is crucial. Besides good promotion, Dapps need to facilitate low-barrier trials for users. By integrating ERC-4337's account abstraction capabilities into Dapps, users can perform social logins and social recovery without the stress of managing mnemonic phrases. Furthermore, with Paymaster services covering transaction gas, newcomers won't have to worry about acquiring tokens and can effortlessly experience Dapps. Dapp developers can utilize the ZAN AA Paymaster API to manage policies and set transaction payment limits for user's SCA (e.g., spending caps specific to SCA addresses), then distribute the sponsorship policies' IDs to Dapp users. If you need more customized user address verification capabilities, we are also set to release the ZAN AA Paymaster webhook—stay tuned for updates!

For individual Web3 users, account abstraction is also a very appealing feature. If you're wary of storing funds in SCA due to risks but still want to enjoy the convenience of account abstraction, you can also swiftly experience SCA with the help of ZAN AA Paymaster.


3. How to use ZAN Paymaster service?

There are two ways to experience ZAN paymaster service as follows:

  1. Read the API tutorial to learn how to call Paymaster API to construct your UserOperation.
  2. Read the SDK tutorial to experience Bundler and Paymaster service with Account Kit SDK.

The former helps you understand the process and details of paymaster's work, and the latter helps you quickly experience account abstraction. Please choose to read one or all of them according to your own situation.


What’s Next

Further Reading:

  • API Tutorial
  • SDK Tutorial