Zap by Paycrest

Zap by Paycrest

Crypto-to-fiat payments in a zap

382
Built at Onchain Summer Buildathon

The problem Zap by Paycrest solves

Most businesses and trading services still only accept traditional fiat currencies, not cryptocurrencies. This creates a barrier for crypto holders wanting to use their assets for everyday transactions.

Zap by Paycrest is a dApp that solves this problem by enabling instant crypto-to-fiat conversions, focusing on Nigerian Naira (NGN) for this hackathon. Our goal is to simplify the 'off-ramping' process, allowing users to seamlessly convert their stablecoins (USDC) to local currency for common purchases and payments.

What sets Zap apart is its user-friendly approach: recipients need no crypto knowledge or action to receive payments. They simply get local currency directly, bridging the gap between cryptocurrency holders and traditional financial systems.

By leveraging a decentralized liquidity protocol, Zap eliminates the need for manual conversions before spending, making cryptocurrency practical for real-world financial transactions.

Before
image

After
image

Challenges I ran into

One of the most significant hurdles we encountered during the development of our project was the instability of the useWatchContractEvent function from the Wagmi library. This function, which we initially relied on for real-time contract event updates, proved unreliable in our development environment.

The primary issue stemmed from inconsistent behavior when used with RainbowKit's WalletConnect websocket RPC relay. Our team frequently experienced connection failures, especially when working without VPNs. This led to a frustrating development experience where the event watching would work sporadically – sometimes functioning as expected, but more often failing to capture events altogether.

After several attempts to troubleshoot and optimize our setup, we realized we needed a more robust solution. Our breakthrough came when we decided to pivot to using viem's getContractEvents function. This approach allowed us to fetch historical event data via a public client, which proved to be much more stable and consistent.

By implementing this change, we were able to reliably retrieve contract events regardless of VPN usage or not. This not only solved our immediate problem but also improved the overall reliability and user experience of our application.

This challenge taught us the importance of flexibility in our tech stack and the value of exploring alternative solutions when faced with persistent issues. It also highlighted the need for robust error handling and fallback mechanisms when dealing with blockchain interactions, especially in environments where network conditions may be variable or unpredictable.

Tracks Applied (3)

Coinbase Smart Wallet

Zap by Paycrest aligns with the Coinbase Smart Wallet track by: Using Coinbase SDK to create smart wallets that use pas...Read More

Paymaster and Bundler

Zap by Paycrest has two modes of payments: from Smart Wallet or EOA for flexibility. It integrates Biconomy’s SDK to enh...Read More

Payments Track

Zap by Paycrest addresses a critical challenge in the crypto ecosystem: the seamless conversion of crypto to fiat for re...Read More

PAYMENTS with Stripe

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion