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
  • Flow 1: User pays with an ERC20
  • Selection next to the wallet connection
  • Selection from the widget
  • Flow 2: The transaction is sponsored
  1. Integration Guide

UI Ideas

In this section, we will present different UI ideas we've already explored with our integration partners.

PreviousCase Study: Router NitroNextAudits

Last updated 9 months ago

Flow 1: User pays with an ERC20

Having an user pay with an ERC20 token instead of ETH requires implementing an additional dropdown to select which token the user wants to use

Selection next to the wallet connection

The user selects globally the token he desires to use for his transactions.

On clicking, a selection of tokens is presented, which the Dapp can expand overtime.

It's also possible to propose different discounts for specific tokens (e.g. below the protocol's token has a higher discount)

See below the examples from , and .

Selection from the widget

The input token of the swap is automatically pre-selected, but the user can choose another one if so desired.

Flow 2: The transaction is sponsored

By setting the sponsorshipRatio parameter when calling our API on each transaction, any off-chain business logic is possible. You can offer free transactions to users based on their NFT holdings, the amount of tokens they want to swap, or even a specific pool you want to incentivize with no fees for providing liquidity.

Koi Finance: During a special event, Koi Finance decided to offer free transactions on all actions, including:

  • Swap

  • Add/remove LP

  • Collect LP rewards

  • Add/remove LP v3

  • Collect LP V3 rewards

  • Add/remove farm

  • Collect farm rewards

  • Lock/unlock Koi

  • Collect locked Koi rewards

PancakeSwap: As one of the eligible native projects on ZKsync Era, PancakeSwap decided to distribute all its allocations to ZKsync users. They opted to airdrop users and sponsor the claiming process, so users didn’t pay any fees for claiming.

Zyfi Front-End: In this example, the swap is fully sponsored if the user is purchasing over $100 of a token.

We can also allow other parties to sponsor transactions through our API. For instance, an NFT project can sponsor transactions for their holders.

zkMarket: There is a CheckNFT:True function in the API call, allowing you, as a Dapp, to offer free transactions to NFT partners' holders, sponsored by their vault contract (assuming they agree to sponsor the fees). An example is the zkMarket NFT marketplace, which enables free transactions for Frenzy Frog NFT holders.

At , we propose the feeToken selection directly into the widget.

Our allows you to provide free or discounted transactions to your users.

Below are examples with , , and .

Zyfi
sponsored paymaster
Koi Finance
PancakeSwap
Zyfi front-end
zkMarket
Koi Finance
PancakeSwap
Gravita
Example from KOI. The user selects the desired feeToken he desires to use for all his transactions.
Example with PancakeSwap. The user select the desired feeToken he want to pay the gas with.
Example from Gravita Protocol
Example from Zyfi: the user can select a different feeToken on each swap
A user pays no gas fee to enter and deposit liquidity in their pool
Free Airdrop claiming
Gas is covered if the user purchases over $100
Free gas for zkSloth NFT holders
A Frenzy Frog holder accesses the zkMarket front-end