Zyfi
  • Introduction
    • What is Zyfi?
    • Paymaster Flow
  • Gasless Program
    • Gas Grants Program
  • Integration Guide
    • Paymasters Integration
      • ERC20 Paymaster
      • Sponsored Paymaster
      • API Key management
    • API documentation
    • Intent Based
    • Paymaster Sybil Defense
    • Supported Tokens
      • Supported Tokens on ZKsync
      • Supported Tokens on Abstract
    • Case Studies
      • Case Study: SyncSwap
      • Case Study: Venus Protocol
      • Case Study: PancakeSwap
      • Case Study: Koi Finance
      • Case Study: Nodle
      • Case Study: Click
      • Case Study: Ebisu's Bay
      • Case Study: Mithraeum
      • Case Study: Gravita
      • Case Study: Router Nitro
    • UI Ideas
    • Audits
  • Permissionless Multi-signer Paymaster
    • About
    • How to set up?
    • Technical Details
    • Permissionless paymaster contract
    • Audits
  • ZFI & stZFI
    • Tokenomics
    • First Airdrop
  • Governance
    • Zyfi DAO
    • Association
  • Support
    • FAQ
    • Contract Addresses
    • Brand Assets
    • Mobile work-around
  • Socials
    • Twitter
    • Youtube
    • Discord
    • Telegram
    • Mirror
    • Dune Analytics Dashboard
Powered by GitBook
On this page
  • 1. Fetching the transaction data from the front end
  • 2. User signing the reconstructed transaction
  • 3. Transaction Execution
  1. Introduction

Paymaster Flow

Understanding each phase

PreviousWhat is Zyfi?NextGas Grants Program

Last updated 7 months ago

The flow of the paymaster enables a smooth process for users to be able to swap without the need for gas. The following process is completely trustless and can enable a user to pay with any ERC-20 token or get his transaction sponsored. Let's break down in detail the whole process into 3 steps.

1. Fetching the transaction data from the front end

Our API can be integrated into any front-end for whatever type of transactions whether it's a DEX, NFT marketplace, DeFi protocol, or a gaming dApp. When connected to the front-end, the API retrieves user-requested transaction data. Zyfi then estimates the gas fee on zkSync's network and fetches off-chain the ERC-20 token price chosen by the user for gas payment.

The API subsequently completes the transaction data, incorporating the ERC-20 token fee to cover gas costs, and signs a message for the transaction to be accepted by the paymaster. The filled transaction data is sent back to the front-end ready for user approval.

2. User signing the reconstructed transaction

The front-end then submits the transaction as normal to the user. The user then reviews the details and signs an off-chain transaction containing the updated transaction data. This data grants the paymaster the ERC-20 fee allowance and authorization to engage with Zyfi's paymaster. The possibilities for the transaction are virtually limitless, as long as the user possesses enough of the ERC-20 token to cover the gas fees.

3. Transaction Execution

The Zyfi paymaster then receives the transaction data associated with the signature of the user approving the signed transaction data. Zyfi then receives the ERC-20 fee, validates & executes the transaction by paying the gas needed for the transaction. If you have any questions regarding the flow don't hesitate to contact the team on or

If you wish to use the API in your front-end, you can check our documentation:

Telegram
Discord
https://api.zyfi.org/api-doc
Full Paymaster Flow