Overview

ZyFi - Zyfi is a Paymaster-as-a-Service that focuses on flexibility and ease of integration. It was created as a way to accelerate the adoption of paymasters in the zkSync ecosystem. DApps can either propose to their users to pay with any ERC-20 traded on zkSync (currently more than 80), or decide to sponsor part or all of the transaction gas cost with their own custom logic. All is powered by an API that abstracts complexities away from protocols, so that they can focus on building their product. Zyfi is integrated by many dApps in the ecosystem, e.g. ZeroLend (Supply & Borrow), Gravita (CDP), Increment Fi (Perp) and zkMarkets ( NFT marketplace) - with more in the pipeline. Zyfi has also partnered with major NFT collections on zkSync, offering a gasless experience and utility for their holders. On top of the paymaster service, Zyfi offers a gasless portal to the ecosystem, where users can experience the power of native AA: they can swap at the best rates, send tokens without having ETH, or submit custom paymaster transaction to interact with protocols that don't offer a paymaster solution yet.

Problem with Gas

Managing gas has always been a challenge for users, especially when you're about to execute a complex transaction, and you find out that you have no gas tokens left. New users get confused and don't quite understand why you need native gas tokens, and how to get them. This wastes time and leads to scattered funds across multiple wallets.

Smart Wallets Drawbacks

Smart Wallets are a way of solving this. These advanced smart contracts facilitate user interaction with the UserOp Mempool, a distinct transaction pool explicitly devised for smart contract wallets outlined in EIP-4337. The UserOp Mempool enables users to execute transactions with paymasters directly, empowering them with gasless transactions. However, a notable limitation exists: Externally Owned Accounts (EOAs) cannot interact with paymasters. This is due to the fact that Account Abstraction was never implemented at the core protocol layer of existing chains. The introduction of native AA at this fundamental level would necessitate substantial modifications to these chains and is not currently planned.

Moreover, Smart Wallets have their inconveniences:

  • They require gas to be deployed, resulting in costs for the user or the app

  • They tend to be app-specific and are often not interoperable with other dApps

  • Users are more used to utilizing EOAs

zkSync's native Account Abstraction

zkSync is the first EVM-compatible layer 2 that supports account abstraction at the core protocol level. This enables EOAs to send transactions gaslessly on zkSync through any wallet (Metamask, TrustWallet, Rabby, etc.).

“Accounts in zkSync Era can initiate transactions, like an EOA, but can also have arbitrary logic implemented in them, like a smart contract. This feature, called "account abstraction" (AA), aims to resolve the issues described above.” - zkSync documentation

This is why at Zyfi, we have developed a zkSync Era native solution, which enables you to perform any type of transaction while paying with any ERC-20 token.

Zyfi - Generalized Gasless Transactions

Below is how Zyfi's tools enable an EOA to perform transactions gaslessly.

Zyfi paymaster API enables any dApp to offer gasless transactions. A user can execute a transaction by paying with any ERC-20 token they hold. The whole process is built with 3 major steps:

  1. The paymaster API interacts directly with any front end. It receives the transaction data and adds the paymaster parameters including the fee taken on the ERC-20 that will be used to pay for the gas costs.

  2. User signing transaction data. The user then signs a gasless transaction and gives the allowance to the paymaster for the ERC-20 fee.

  3. Paymaster execution. The Zyfi Paymaster then receives the ERC-20 fee to validate and execute the transaction while paying the ETH gas fees for the end user.

To learn more read check out the paymaster flow below👇

Last updated