Case Study: PancakeSwap

The integration of Zyfi with PancakeSwap simplifies users' experiences by offering seamless swaps on ZKsync and specific gasless events (e.g., airdrops).

PancakeSwap, one of the largest decentralized exchange (DEX) platforms, has always sought to improve user experience and push the boundaries of decentralized finance (DeFi). Since its launch on the ZKsync Era blockchain in July 2023, PancakeSwap has capitalized on the benefits of Zero-Knowledge (ZK) technology, providing fast and low-cost trading on a Layer 2 infrastructure. However, despite these advantages, a key issue remains: gas fees.

Complex Gas Management

In the DeFi ecosystem, users often have to pay gas fees in the network’s native tokens (like ETH on Ethereum), creating significant friction. This complicates wallet management and adds a constraint for users who must hold these specific tokens. Moreover, gas fees cannot be sponsored on all types of EVM accounts, whether Smart Wallet or EOA, which can disrupt the on-chain experience.

Implementation of Zyfi, native Account Abstraction provider

To address these challenges, PancakeSwap has integrated Zyfi, an innovative gas abstraction provider leveraging native AA on ZKsync Era to facilitate and optimize gas fee management. Through this collaboration, Zyfi introduced several key improvements:

  • Paying gas fees with ERC-20 tokens: PancakeSwap users can pay gas fees with over 10 ERC-20 tokens, enhancing flexibility and accessibility.

  • Gas fee sponsorship: PancakeSwap decided to integrate the sponsored paymaster to cover transaction fees for users, allowing gas-free swaps on their DEX up to a limit of $5,000, equating to nearly 150,000 free transactions. This enables users to conduct swaps without worrying about gas costs until the sponsorship cap is reached.

  • Gasless airdrop claiming: During the Token Generation Event of ZKsync, PancakeSwap offered its native allocation to users, and each token claim was fully gasless thanks to Zyfi's integration.

Thanks to Zyfi's integration, PancakeSwap has significantly enhanced user experience. Users can now avoid the complexity of managing native network tokens for each transaction while enjoying gas-free transactions.

Additionally, the gas fee sponsorship model has also attracted new users to PancakeSwap, encouraging them to try a system where transaction fees are sponsored, further boosting the platform's popularity on ZKsync Era.

UX/UI Implementation

To summarize the points mentioned above, the UX/UI implementation followed a structured process.

1/ The first step was for them to determine which types of on-chain actions and UI improvements they wanted to display. In this case, they aimed to allow users to pay gas fees with any token, offer sponsored transactions, and facilitate a gasless minting event.

2/ The second step involved integrating the API into their front-end, which took about 0.5 days, while ensuring the correct on-chain actions were triggered to sponsor activities like swaps and claims, as well as displaying all the tokens available for gas payments.

3/ The final step was to implement changes on the UI side. They decided to create a simple box that listed all ERC-20 tokens for gas payments, with a “Free” label next to each token indicating where the gas was sponsored. This took 0.5 days of development time. In their specific case, all tokens were eligible for free transactions.

And that’s it! 🎉

In total, PancakeSwap needed 1 development day to integrate the entire product into their front-end, providing an exceptional on-chain experience for users on both mobile and desktop.

Results

In terms of results, PancakeSwap attracted many users during the release of the Zyfi integration and has sponsored over 140,000 transactions as of September 2024.

In the screen below, you can see PancakeSwap transactions after the Zyfi integration (11 June 2024) and the gasless claiming transactions for their airdrop.

Conclusion

The integration of Zyfi with PancakeSwap represents not just a technological breakthrough but also a revolution in user experience within the DeFi space. By removing the constraints related to gas fees and offering innovative, transparent solutions, Zyfi has enabled PancakeSwap to position itself as a leader on the ZKsync Era blockchain while providing users with a smoother, more affordable, and accessible experience.

Last updated