Generate claimable tickets to send GHO without specifying any wallet address. Simple as using cash.
Inspired by cash, which sidesteps the concept of a predefined recipient, GhoTicket is a protocol that lets you send GHO in the form of claimable tickets, without the need to specify target wallet addresses.
The sender needs no information about the recipient(s) to prepare tickets, and can simply share them as a private link or by generating a QR code. This can be useful for sending funds to someone who doesn't have a wallet yet, or doesn't know their own address, or as a reward for giveaways. To create tickets, the sender must choose the transfer mode (instant or stream) and the number of tickets, which are generated and signed off-chain. After depositing the funds (1 tx), tickets can be transmitted.
Subsequently, by accessing a ticket link, a recipient can securely claim the funds in 2 txs:
Given a wallet address, you can track the status of its created tickets and also see its claim history, on an unified page. Unclaimed funds can be withdrawn after the chosen deadline (when the tickets expired).
This dapp is a decentralized PWA. I used NextJS 14, Hardhat, NextUI as UI library, Family as wallet connector, react-router-dom for hashrouter, Fleek as decentralized frontend hosting provider, and Vercel as centralized backup. I chose this stack because I already know it well (except Family, but I used WalletConnect before), so I could focus more on the smart contract part. I built a simple snackbar system to get in-app notifications. The challenge here is to have a simple clean UI, but more importantly, to design a contract that is secure, taking advantage of hashing and permit functions, and gas efficient.