Introducing Particle Network’s Omnichain Paymaster: Cross-Chain Gas Sponsorships

Introducing Particle Network’s Omnichain Paymaster: Cross-Chain Gas Sponsorships

Table of Contents:

As we progress through the simultaneous development of the many upgrades coming to Particle Network, we have successfully concluded the release of our Omnichain Paymaster.

This service, directly integrated into Particle Network's Modular Smart WaaS stack, constitutes a part of our Omnichan Account Abstraction stack for AA interoperability. In its first version, our Paymaster allows developers to recharge USDT on one chain (Ethereum and BNB Chain initially) to sponsor users’ gas on any EVM chain. Particle's Paymaster automatically calculates the exchange rate for the chain's native token and deducts it in the background.

Let's take a deeper look at this release and its inner workings:

What is Particle's Omnichain Paymaster

Particle Network’s Paymaster is a specialized tool designed to make gas payments easier and friendlier for end users across chains, leveraging Particle Network's Omnichain AA design. This service, which has helped us sponsor over 500k UserOperations across different networks in the previous month, is already fully integrated with Particle’s Modular Smart WaaS (Wallet-as-a-Service).

For those unfamiliar with both of these concepts, let’s quickly revisit them.

The opBNB chain alone has seen over 250k UserOps sponsored by our Paymaster. Other networks involved in this program have been Scroll, Viction, and Combo.

Omnichain Account Abstraction

Omnichain Account Abstraction is Particle Network's approach to address several user experience and robustness issues with ERC-4337 AA infrastructure and its design. It reduces AA's focus on transaction flow and puts the spotlight back on user accounts and their programmability. Omnichain AA also represents a solution for different cross-chain and interoperability pain points the industry has long been facing. 

Paymaster

Paymasters, in the context of ERC-4337, play a critical role in enhancing the user experience by abstracting gas payments. Paymasters act as financial guarantors, covering transaction fees for users or allowing them to pay for gas using tokens different from the native chain's native coin. This setup allows users to, e.g., perform transactions on Ethereum without needing Ether as gas. This feature simplifies the user experience and makes dApp usage friendlier, particularly when dApps pay for gas on behalf of users.

In its first implementation, Particle's Omnichain Paymaster enables developers to sponsor gas for users through USDT on multiple chains. To do this, they recharge USDT on either the Ethereum Mainnet or BNB Chain and are able to use it on different chains. By integrating the Particle Network Paymaster, developers using Particle Network’s Smart Wallet-as-a-Service can begin leveraging Omnichain Paymaster while seamlessly onboarding users into Web3 dApps via social logins. In the future, the Paymaster will be updated to support more origin chains and additional tokens for gas payments.

Advantages of the Particle Paymaster

Particle's Paymaster offers several compelling advantages, making it an powerful component of the Omnichain AA ecosystem:

  1. Multi-chain usage: Once developers deposit USDT, they can sponsor UserOps on every EVM-compatible chain.
  2. Adaptable sponsorship logic using Webhooks: Configuring webhooks allows developers to accurately control which UserOP can be accepted by the cross-chain Paymaster
  3. Monitoring: Developers are able to monitor every UserOp they sponsored.
  4. Expiration times: Developers can define an expiration time for the Paymaster signature. Once the UserOperation reaches its expiration, the Paymaster signature will automatically lapse.

Webhooks

Configuring webhooks allows developers to accurately control which UserOP can be accepted by the Paymaster. We use two types of webhooks:

  • Before the Paymaster signs (before_paymaster_sign).
  • After the Paymaster signs (after_paymaster_sign).

Every time a Webhook request is made, a signature for the body is generated, which developers can verify to determine whether the request was sent by Particle Network. A unique public and private key (RSA-2048) is generated for each project. This key can be downloaded from the users’ Particle dashboard page for verification.

Paymaster dashboard page.

Webhook: before_paymaster_sign

This hook will be triggered before the Paymaster signs. The Paymaster will determine whether to sign the UserOP based on the status code returned by the Hook. It includes:

  • Body
    • chainId
    • userOp - UserOperation struct.
    • entryPoint - The entryPoint address.
    • parsed - Transaction struct. The Paymaster will attempt to parse the calldata of the UserOP. If it cannot be parsed, this field may not exist.
  • Response
    • If the status code of the response returned is 200, then the Paymaster will accept the UserOP and sign it.

Webhook: after_paymaster_sign

This hook will trigger after the Paymaster signs. It includes:

  • Body
  • chainId
  • userOp - UserOperation struct.
  • entryPoint - The entryPoint address.
  • parsed - Transaction struct. The Paymaster will attempt to parse the calldata of the UserOP. If it cannot be parsed, this field may not exist.

Using Webhooks for your sponsorship policy within the cross-chain Paymaster

Developers can use Webhooks to implement any sponsorship logic they wish in conjunction with the Paymaster.

For the before_paymaster_sign webhook, we return all the data necessary:

  1. projectUuid
  2. chainId
  3. userOp
  4. and parsed data:
    1. accountType: BICONOMY, CYBERCONNECT, SIMPLE
    2. txs
  5. Any policy
    1. You can use chainId to decide which chains you want to sponsor.
    2. You can use userOp to decide which user address(sender) you want to sponsor.
    3. You can use userOp to calculate the gas fee and decide whether to sponsor or not.
    4. You can use the accountType and txs to use them as a smart contract whitelist or blacklist.

This allows, for example, for the following business scenarios:

  • A GameFi project to allow every new user to gaslessly mint a game NFT. 
  • A financial platform can sponsor gas for every deposit, so their users don't need to learn the concept of gas.
  • An NFT platform can enable users to trade NFTs without gas, using their own fees to cover gas.

In many cases, programmatic sponsorship policies can be used and adapted towards creating a friendly experience and simplifying experiences where it matters most.

Wrapping up

Particle Network's Omnichain Paymaster is a practical and useful tool for developers to simplify gas payments across networks. We have battle-tested it by sponsoring over 500k UserOperations across different chains in the last month and, as such, are proud to integrate it into our Modular Smart WaaS stack.

With this first stepping stone, we aim to address a common challenge in the blockchain space, making it easier for developers to manage transaction costs and improve the user experience of their dApps across chains.

We encourage developers to explore the potential of Particle Network’s Omnichain Paymaster. For more information, visit our documentation. Remember that all of our services are now 100% to use for developers!


Particle Network's Modular Smart Wallet-as-a-Service solutions are 100% free for developers and teams. If you have any inquiries about integrating with us, feel free to book a meeting with one of our agents!


About Particle Network

Particle Network Logo

Particle Network is a Layer-1 blockchain built with the Cosmos SDK, equipped with a high-performance EVM execution environment. It serves as chain abstraction infrastructure for the multi-chain ecosystem, featuring Universal Accounts, Universal Gas, and Universal Liquidity. Through these core functionalities, Particle Network addresses the fragmentation of users and liquidity caused by a growing number of blockchains, coordinating operations across networks and empowering all other chains with enhanced interoperability.

Website | Docs | Discord | Twitter

Share this article

About the author(s)

Peter Pan

Peter Pan

CTO at Particle Network.
Carlos Maximiliano Cano

Carlos Maximiliano Cano

Particle's Content Manager. He's been in Web3 since 2017, collaborating with technical and marketing teams in crowdfunding, research, DeFi, privacy, and zero-knowledge proofs.