ZKoupon: NFT coupon platform with Self.xyz verification for secure digital coupon management on ETH.
ZKoupon is a payments App with an integrated loyalty program built on Polygon.
Using self.xyz, the merchant also has the option to limit sales of certain goods to customers > 20 yrs of age. If this limit is set, before payment, the customer must go through Self.xyz's passport scanning process to verify their age.
The payment flow is the merchant uses the App to display a QR Code. The customer scans it using their MetaMask app. After a successful payment, the merchant has the option to mint an NFT and then transfer the NFT to the customer. The NFT represents a discount / loyalty reward, which can be 10% off, $5 off $25, etc. To use the NFT, on the next purchase, the customer can show the NFT to the merchant and click "Burn" to prove to the merchant that it was used.
ZKoupon is built using modern web and blockchain technologies. The project has three main parts: smart contracts, frontend, and user verification.
For the smart contracts, we used Solidity and OpenZeppelin's secure contracts. These contracts run on the Ethereum Sepolia testnet and handle important functions like creating NFTs and managing coupon ownership.
The frontend is built with Next.js and Chakra UI, making it fast and easy to use. We used ethers.js to connect with the blockchain, allowing users to interact with their wallets and the smart contracts.
We added extra security by integrating Self.xyz for user verification. This helps ensure that only verified users can use the platform.
The project uses a smart way to store data. Important information is kept on the blockchain, while additional details are stored off-chain to save costs. We also made sure the platform works well on different devices and provides clear feedback to users.
For development, we used tools like Hardhat for testing and Vercel for deployment. The code is well-organized and follows best practices for both web and blockchain development.
The platform is designed to be easy to update and improve in the future. It includes features like real-time updates and secure wallet connections, making it a reliable solution for digital coupon management.