project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

RedEnvelope

Onchain chinese culture red envelope that wraps tokens as gift for a selected group of people to redeem

RedEnvelope

Created At

ETHGlobal Sydney

Winner of

trophy

Worldcoin - Pool Prize

Prize Pool

Project Description

In web3, culture an important element. In the chinese culture, gifting friends and family red envelopes with cash symbolises the sharing of good wills and luck. This project brings this idea onchain, where influencers, founders, leaders, or just anyone could create a red envelope and gift tokens to his/her twitter followers. A red envelope will have the specified amount of tokens (eth or erc20) placed in, the choice to distribute token amount equally or randomly to each person. This is a way to increase gamification and bring joy. Only selected twitter followers can redeem them, with verification from Worldcoin, to prevent sybil attacks. It is launched on Base chain as Base has relatively lower fees, and with the farcaster ecosystem, Base is suitable for social apps like Red Envelope.

How it's Made

The frontend is built using Next.js, tailwind, with ether.js, wagmi for smart contract interaction and rainbow-kit for wallet connection. It integrates with the Worldcoin API to verify real person identities, which helps mitigate botting and Sybil attacks. Initially, the Twitter API was considered but was substituted with a simpler demonstration method due to time limitations. Base chain is adopted for seamless, fast and cheap transaction, and the existence of Farcaster social network ecosystem. When one envelope is created, the address and claimable amount of each user are put together into a merkle tree that is generated off chain. The root hash of the tree will be stored on chain. When the target user comes to claim with a valid wallet address, the merkle proof will be generated off chain, and submits to onchain for verification. If the merkle tree verifys the identity is correct, the user will then by able to claim tokens.

background image mobile

Join the mailing list

Get the latest news and updates