吃瓜,赚币 | Eat Melon, Earn Crypto
GuaFi is a decentralized protocol for trading and sharing verifiable rumors on the Sui blockchain. It combines encryption (Sui Seal), decentralized storage (Walrus), and smart contract logic to create a trustless marketplace for exclusive information.
- Overview
- Features
- Tech Stack
- Architecture
- Getting Started
- Usage
- Project Structure
- Contributing
- License
- Information Asymmetry: Valuable information is difficult to price and verify
- Instant Devaluation: Once shared, information loses value immediately
- Trust Issues: How to prove authenticity without revealing content?
GuaFi creates a pay-to-reveal mechanism where:
- Creators encrypt and upload exclusive content (PDF files)
- Participants pay SUI to join and unlock secrets once a threshold is met
- Revenue Sharing incentivizes early adoption through profit distribution
The protocol ensures content remains encrypted until the minimum participant threshold is reached, creating game-theoretic incentives for viral growth.
- 🔐 Client-Side Encryption: Content encrypted locally using Sui Seal before upload
- 💰 Pay-to-Reveal Mechanism: Users pay SUI to access encrypted content
- 👥 Threshold-Based Unlocking: Content unlocks when minimum participants join
- 💸 Automated Revenue Distribution:
- Creators earn 50% of entry fees
- Early participants share remaining 48% proportionally
- Protocol fee: 2%
- 🌏 Multi-Language Support: Full English/Chinese (简体中文) localization
- 🎨 "Manga Pop" Design: High-contrast, comic-style UI with bold typography
- 📱 Responsive Layout: Works seamlessly on desktop and mobile
- 🔄 Real-Time Updates: React Query for automatic data synchronization
- 🐦 Social Sharing: One-click share to X (Twitter)
- 📊 User Statistics: Track spent, earned, and participation metrics
- 📋 Created Rumors: View all rumors you've published
- 🎫 Participated Rumors: Manage tickets and claim rewards
- 💰 Reward Tracking: Monitor pending and claimed earnings
- React 18 with TypeScript
- Vite for fast development and builds
- TailwindCSS for styling
- React Router for navigation
- React Query (@tanstack/react-query) for state management
- i18next for internationalization
- Sui Move smart contracts
- @mysten/dapp-kit for wallet integration
- Walrus SDK for decentralized storage
- Sui Seal SDK for encryption and access control
- Bun as package manager and runtime
- ESLint for code quality
- TypeScript for type safety
┌─────────────────────────────────────────────────────────────┐
│ Frontend (React) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ RumorList │ │ RumorDetail │ │ Profile │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ └──────────────────┴──────────────────┘ │
│ │ │
└──────────────────────────┼───────────────────────────────────┘
│
┌──────────┴──────────┐
│ │
┌───────▼────────┐ ┌──────▼───────┐
│ Sui Blockchain │ │ Walrus Store │
│ │ │ │
│ - Rumor Objects │ │ - Encrypted │
│ - Ticket NFTs │ │ Blobs │
│ - Payments │ │ │
│ - Rewards │ │ │
└────────┬────────┘ └──────────────┘
│
┌────────▼────────┐
│ Sui Seal │
│ │
│ - Encryption │
│ - Key Mgmt │
│ - Access Ctrl │
└─────────────────┘
- Create Rumor: User uploads PDF → Seal encrypts → Walrus stores → Sui mints Rumor NFT
- Join Rumor: User pays SUI → Sui mints Ticket NFT → User waits for threshold
- Unlock: Threshold met → Participants can decrypt → Seal verifies Ticket → Walrus serves content
- Claim Rewards: User triggers claim → Sui calculates share → Transfers SUI to user
- Node.js v18+ or Bun v1.0+
- Sui Wallet (browser extension)
- Git
- Clone the repository
git clone https://github.com/EATMove/guafi.git
cd guafi- Install dependencies
cd frontend
bun install- Configure environment variables
Create .env file in frontend/ directory:
# Sui Network Configuration
VITE_SUI_NETWORK=testnet # or mainnet
# GuaFi Protocol Configuration
VITE_PACKAGE_ID=0x... # Your deployed package ID
VITE_CONFIG_ID=0x... # Global config object ID- Start development server
bun run devThe application will be available at http://localhost:5173
bun run buildThe production build will be in the dist/ folder.
- Connect your Sui wallet
- Navigate to "Create Rumor" page
- Fill in:
- Title: Catchy headline
- Description: Preview of what's inside
- PDF File: Your exclusive content (encrypted automatically)
- Price: Entry fee in SUI (e.g., 0.1 SUI)
- Min Participants: Unlock threshold (e.g., 10)
- Click "Create Rumor" and confirm transaction
- Your content is now encrypted and uploaded!
- Browse available rumors on the home page
- Click on a rumor to view details
- Click "Pay & Join" and confirm payment
- Receive a Ticket NFT
- Wait for the participant threshold to be met
- Once unlocked, click "Reveal Content" to decrypt
- Go to your Profile page
- View "Participated Rumors" section
- Rumors with claimable rewards show the amount
- Click "Claim" to receive your share
- Rewards are automatically calculated based on:
- When you joined (earlier = larger share)
- Total reward pool from subsequent entries
- On any rumor detail page, click "Share to X" button
- Customize your message and post to attract more participants
- More participants = larger reward pool for everyone!
guafi/
├── frontend/ # React frontend application
│ ├── public/ # Static assets
│ │ ├── logo.png # GuaFi logo (watermelon)
│ │ ├── yaoming.png # Meme assets
│ │ └── wangnima.png
│ ├── src/
│ │ ├── assets/ # Image assets
│ │ ├── components/ # React components
│ │ │ ├── rumor/ # Rumor-specific components
│ │ │ │ ├── RumorCard.tsx
│ │ │ │ ├── RumorDashboard.tsx
│ │ │ │ ├── JoinPanel.tsx
│ │ │ │ └── SecretContent.tsx
│ │ │ └── ui/ # Reusable UI components
│ │ │ ├── Button.tsx
│ │ │ ├── Card.tsx
│ │ │ └── Input.tsx
│ │ ├── hooks/ # Custom React hooks
│ │ │ ├── useRumors.ts
│ │ │ ├── useRumorDetail.ts
│ │ │ ├── useJoinRumor.ts
│ │ │ └── useDecryptRumor.ts
│ │ ├── lib/ # Utility libraries
│ │ │ ├── config.ts # Environment configuration
│ │ │ ├── format.ts # Formatters (SUI, addresses)
│ │ │ ├── rumorParse.ts # Blockchain data parsers
│ │ │ ├── stats.ts # User statistics calculators
│ │ │ ├── seal/ # Sui Seal integration
│ │ │ │ └── index.ts
│ │ │ └── walrus/ # Walrus storage integration
│ │ │ ├── downloadHTTP.ts
│ │ │ └── uploadHTTP.ts
│ │ ├── pages/ # Page components
│ │ │ ├── RumorList.tsx
│ │ │ ├── RumorDetail.tsx
│ │ │ ├── CreateRumor.tsx
│ │ │ └── Profile.tsx
│ │ ├── i18n.ts # Internationalization config
│ │ ├── App.tsx # Root component
│ │ └── main.tsx # Entry point
│ ├── package.json
│ └── vite.config.ts
├── move/ # Sui Move smart contracts
│ └── sources/
│ └── guafi.move # Main contract
└── README.md # This file
- Content is encrypted client-side using Sui Seal before any upload
- Only users with valid Ticket NFTs can request decryption
- Seal SDK verifies ownership on-chain before releasing keys
- Encrypted blobs on Walrus are inaccessible without proper authorization
- Creator addresses are public (by design) but participants remain pseudonymous
- No personal data is stored or tracked
- Revenue distribution enforced by Move contract logic
- Ticket NFTs are non-transferable to prevent ticket scalping
- Threshold mechanism prevents premature content leakage
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style (ESLint configuration)
- Add TypeScript types for all new code
- Test thoroughly before submitting PR
- Update documentation for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- Sui Foundation for the blockchain infrastructure
- Walrus Team for decentralized storage
- Seal SDK for privacy-preserving encryption
- Mysten Labs for excellent developer tools
- Basic create/join/reveal flow
- Client-side encryption with Seal
- Walrus integration for storage
- Multi-language support (EN/CN)
- Profile and statistics page
- Social sharing features
- Reputation system for creators
- Advanced analytics dashboard
- Mobile-optimized responsive design
- Notification system
- DAO governance for protocol parameters
- Mobile app (iOS/Android)
- Cross-chain bridges
- NFT marketplace for popular rumors
- AI-powered content verification
- Dispute resolution mechanism
- Anonymous creation (ZK proofs)
- Content derivatives and futures trading
Built with ❤️ by the GuaFi team
Let's make gossip profitable. Let's eat melon together. 🍉