The Shutterized Hongbao DApp is a decentralized application for secure cryptocurrency gifting on the Gnosis Chain. The DApp leverages Shutter encryption for time-locked transfers and offers features like password protection and a non-custodial, in-browser passkey wallet for enhanced security and user control.
A hongbao is a traditional red envelope commonly used in Chinese culture to gift money during special occasions like Lunar New Year, symbolizing good luck and prosperity.
Important: This is extremely early alpha software using a centralized version of Shutter. Use at your own risk—assume potential loss of all connected funds.
- Secure Gifting: Send cryptocurrency with a time-locked mechanism.
- Shutter Encryption: Ensures private keys remain protected until the specified unlock time.
- Password Protection: Optionally secure Hongbao with an additional password for recipient decryption.
- Non-Custodial Passkey Wallet: Fully in-browser wallet without custodial dependency.
- One-Time Private Keys: Each Hongbao is tied to a unique private key.
- User-Friendly Interface: Simple workflows for both senders and recipients.
- You can now protect the Hongbao with a password, adding another layer of security.
- The recipient must enter the password to decrypt the private key before claiming funds.
- A fully non-custodial wallet created in-browser for secure fund management.
- Operates independently of MetaMask or other external wallets.
- Funds are swept directly into this wallet if selected during redemption.
-
Create a One-Time Private Key:
- Generate a unique Ethereum account with a private key.
- Encrypt the private key using Shutter's service, locking it until a specified timestamp.
-
Encrypt the Private Key:
- Use Shutter encryption for time-locking.
- Optionally, encrypt the result with a user-defined password.
-
Fund the Hongbao:
- Transfer xDai to the newly generated account.
-
Generate a Redemption Link:
- Share a link containing the encrypted private key, timestamp, and amount with the recipient.
-
Verify the Hongbao:
- Open the redemption link and check Hongbao status.
- If password-protected, enter the password to decrypt the key.
-
Request Decryption:
- After the unlock time, request the final decryption key from Shutter.
-
Sweep Funds:
- Use MetaMask or the in-browser passkey wallet to sweep funds to the recipient's wallet.
- Decentralized: Fully non-custodial and managed directly in the browser.
- Secure: Private keys are only accessible locally, within the user's browser session.
- Independent: Operates without reliance on MetaMask or other external wallets.
- Recipients can use the passkey wallet to redeem Hongbao and sweep funds securely into their locally stored wallet.
- The wallet is ephemeral—created and managed entirely in-browser, enhancing privacy.
- When creating a Hongbao, senders can set an optional password.
- Recipients must provide this password during redemption to decrypt the intermediate private key before requesting the final decryption from Shutter.
- Enhances security by ensuring only intended recipients can access the private key.
- Combines with time-lock encryption for double-layer protection.
- Generate Private Key: A one-time-use private key is generated.
- Encrypt with Shutter: The key is encrypted for time-lock protection.
- Optionally Encrypt with Password: The Shutter-encrypted key is wrapped with an additional password encryption.
- Fund and Share: Funds are transferred, and a redemption link is generated.
- Decrypt with Password (if applicable): The recipient decrypts the key with the password.
- Decrypt with Shutter: The final key is retrieved from Shutter after the unlock time.
- Sweep Funds: Use the fully decrypted key to transfer funds to a MetaMask account or passkey wallet.
-
Choose Wallet:
- Use MetaMask or the passkey wallet for funding.
-
Set Amount and Lock Time:
- Specify the amount and unlock timestamp.
-
Add Password (Optional):
- Enhance security with password protection.
-
Create and Share:
- Generate the Hongbao and share the link with the recipient.
-
Verify Details:
- Open the Hongbao link and check its status.
-
Provide Password (if required):
- Enter the password to decrypt the key.
-
Sweep Funds:
- Use MetaMask or the passkey wallet to claim funds.
Funds cannot be accessed before the unlock time.
If password-protected, losing the password makes decryption impossible.
The link contains critical information. Losing it means the Hongbao cannot be redeemed.
- Web3.js: Blockchain interactions.
- Ethers.js: Ethereum wallet integration for the passkey wallet.
- CryptoJS & Web Crypto API: Encryption and decryption utilities.
- Shutter Network: Encryption and decryption services.