Skip to content

QuangTQV/YieldPlay

Repository files navigation

YieldPlay - Complete Design & Development Package

📦 Package Contents

This package contains everything you need to start designing and developing YieldPlay:

1. Documentation 📄

  • yieldplay_features_documentation.md - Complete PRD with all features, user flows, and technical specs

2. HTML Prototypes 🎨

  • yieldplay_landing_page.html - Main landing page (fully interactive with navigation)
  • random_draw.html - Random Draw lottery game (interactive tickets, countdown, draw simulation)
  • task_based_game.html - Task-Based game (15 tasks, leaderboard, point tracking)
  • prediction_market.html - Prediction Markets (live charts, betting interface, 4 markets)

🎮 Interactive Features

Landing Page

✅ Animated gradient backgrounds ✅ Stats counter animation ✅ Smooth scroll navigation ✅ Responsive design ✅ Links to all 3 game pages

Random Draw Game

Live Prize Pool Counter - Updates every 5 seconds ✅ Countdown Timer - Real-time countdown to next draw ✅ Ticket Purchase System - Slider + input with odds calculator ✅ Simulate Draw - Demo button that runs lottery animation ✅ Winning Animation - Confetti + success messages ✅ Recent Winners Table - Shows past results ✅ User Stats Tracking - Your tickets, odds, potential win

Key Interactions:

  • Buy tickets (updates your odds in real-time)
  • Simulate lottery draw with spinning ball animation
  • See your stats update immediately

Task-Based Game

15 Real Tasks - Social, On-chain, Community tasks ✅ Task Filters - Filter by category (All/Social/On-chain/Community) ✅ Point Tracking - Live point counter ✅ Dynamic Leaderboard - Updates as you complete tasks ✅ Progress Bar - Visual progress through tasks ✅ Task Modals - Different completion flows per task type:

  • External links (Twitter, Discord, Telegram)
  • On-chain verification
  • URL submission
  • Referral tracking

Task Examples:

  • Social: Follow Twitter, Join Discord, Retweet
  • On-chain: Swap on Raydium, Add liquidity on Orca, Stake on Marinade
  • Community: Refer friends, Write tutorial, Create meme

Key Interactions:

  • Click tasks to open completion modal
  • Complete tasks to earn points
  • Watch your rank climb on leaderboard
  • See estimated rewards update

Prediction Market

4 Live Markets - Different prediction types ✅ Interactive Charts - Chart.js powered price history ✅ Real-time Odds - Distribution bars show betting percentages ✅ Stake Calculator - Automatic potential win calculation ✅ Multiple Market Types:

  • Binary (Yes/No)
  • Multiple Choice (4 options)
  • Range predictions ✅ Your Predictions Tracker - View all active bets ✅ Oracle Badges - Shows which oracle verifies each market

Markets Included:

  1. SOL to $200? - Binary prediction with price chart
  2. Which L1 has most transactions? - 4-way choice
  3. BTC to $100K in 2025? - Long-term binary
  4. DeFi TVL at year-end? - Range prediction

Key Interactions:

  • Select market to see detailed view with chart
  • Choose prediction option
  • Enter stake amount
  • See pool share and potential win
  • Submit prediction

🎨 Design System

Colors

--primary-purple: #9945FF
--primary-green: #14F195
--secondary-teal: #00D4AA
--secondary-yellow: #FFD512
--background-dark: #0F0F23
--background-card: #1A1A2E
--background-elevated: #252541

Typography

  • Headers: Poppins (bold, gradient)
  • Body: Inter (clean, readable)
  • Mono: JetBrains Mono (wallet addresses, code)

Components Used

  • Gradient buttons
  • Glass-morphism cards
  • Animated backgrounds
  • Progress bars
  • Risk tier badges
  • Interactive modals
  • Real-time counters
  • Chart.js graphs

🚀 How to Use

For Designers:

  1. Open the HTML files in a browser

    • All files are standalone and work without a server
    • Use Chrome/Firefox for best experience
  2. Use as reference for:

    • Color schemes and gradients
    • Component layouts
    • Animation patterns
    • User flows
    • Interaction patterns
  3. Extract design tokens:

    • All CSS variables are in :root
    • Copy spacing, sizing, color systems
    • Use as base for Figma design system
  4. Create high-fidelity mockups:

    • Follow the layouts shown
    • Use the same component patterns
    • Maintain the Solana-inspired aesthetic

For Developers:

  1. Use the features doc as PRD:

    • All features prioritized (P0/P1/P2/P3)
    • User stories included
    • Acceptance criteria defined
    • Database schema provided
  2. Extract components from HTML:

    • All components are clearly structured
    • Convert to React/Next.js components
    • Use TailwindCSS for production styling
  3. Implement functionality:

    • JavaScript logic is simplified for demo
    • Replace with real smart contract calls
    • Integrate Solana wallet adapters
    • Connect to DeFi protocol APIs
  4. API Integration:

    • Wallet connection: @solana/wallet-adapter-react
    • DeFi protocols: Kamino SDK, MarginFi SDK
    • Oracles: Pyth Network, Switchboard, Chainlink
    • Charts: Chart.js or Recharts

📊 Feature Comparison with Competitors

Feature YieldPlay PoolTogether Zelo Hedgehog
Random Draw
Task-Based
Predictions
Multiple Risk Tiers
Solana Native
Social Tasks
On-chain Tasks
Live Charts
Multi-Protocol Limited Limited

Your Competitive Advantages:

  1. 3 game modes vs competitors' 1-2
  2. Task integration for community growth
  3. Flexible yield strategies (user chooses risk)
  4. Engaging UX with animations and charts

🔧 Technical Stack (Recommended)

Frontend

# Initialize Next.js
npx create-next-app@latest yieldplay --typescript --tailwind --app

# Install dependencies
npm install @solana/web3.js @solana/wallet-adapter-react @solana/wallet-adapter-wallets
npm install chart.js react-chartjs-2
npm install zustand # state management
npm install framer-motion # animations

Smart Contracts

# Initialize Anchor project
anchor init yieldplay

# Key programs needed:
- YieldAggregator
- GameSession
- RandomDraw
- TaskGame
- PredictionMarket

Integrations

  • Kamino Finance: @kamino-finance/klend-sdk
  • MarginFi: @mrgnlabs/marginfi-client-v2
  • Pyth Network: @pythnetwork/client
  • Switchboard: @switchboard-xyz/on-demand

🎯 MVP Development Roadmap

Week 1-2: Foundation

  • Set up Next.js project
  • Implement wallet connection
  • Design system & component library
  • Basic routing

Week 3-4: Core Features

  • Yield Aggregator (Standard staking)
  • Risk tier selection
  • Kamino/MarginFi integration
  • Dashboard

Week 5-6: Random Draw

  • Session management
  • Ticket purchase
  • Chainlink VRF integration
  • Prize distribution

Week 7-8: Testing & Polish

  • Smart contract audits
  • UI/UX refinements
  • Mobile optimization
  • Beta testing

Post-MVP:

  • Task-Based game (Week 9-10)
  • Prediction Markets (Week 11-12)
  • Advanced features (referrals, governance)

📈 Success Metrics

Launch Goals (Month 1):

  • TVL: $500K
  • Users: 100 active
  • Sessions: 10+ completed
  • Win Rate: 5% users win prizes

Growth Goals (Month 3):

  • TVL: $5M
  • Users: 1,000 active
  • Retention: 40% monthly active
  • Revenue: $10K in fees

🎨 Design Handoff Checklist

For design team to create Figma files:

  • Review all 4 HTML files
  • Extract color palette to Figma
  • Create typography styles
  • Build component library:
    • Buttons (primary, secondary, ghost)
    • Input fields
    • Cards (elevated, flat)
    • Modals
    • Progress bars
    • Badges & tags
    • Tables
    • Charts
  • Design mobile layouts
  • Create user flow diagrams
  • Design empty states
  • Design error states
  • Create loading states
  • Design success animations

💡 Implementation Tips

Wallet Integration

import { useWallet } from '@solana/wallet-adapter-react';

const { connected, publicKey, signTransaction } = useWallet();

// Check if wallet connected
if (connected) {
  console.log('Wallet:', publicKey.toString());
}

Smart Contract Calls

import * as anchor from '@project-serum/anchor';

// Initialize program
const program = new anchor.Program(IDL, programId, provider);

// Call instruction
const tx = await program.methods
  .joinSession(amount)
  .accounts({
    user: wallet.publicKey,
    session: sessionPda,
    // ...
  })
  .rpc();

State Management

import create from 'zustand';

const useStore = create((set) => ({
  userPoints: 0,
  completedTasks: [],
  addPoints: (points) => set((state) => ({ 
    userPoints: state.userPoints + points 
  })),
}));

🐛 Known Limitations (Demo)

These HTML files are prototypes. In production:

  1. Replace mock data with real blockchain data
  2. Add real wallet integration (currently just alerts)
  3. Implement smart contracts (currently simulated)
  4. Add error handling (network failures, insufficient funds)
  5. Add loading states (transaction pending)
  6. Optimize performance (lazy loading, code splitting)
  7. Add security (input validation, rate limiting)
  8. Mobile optimization (touch events, responsive charts)

📞 Next Steps

Immediate Actions:

  1. Share with design team - Review HTML prototypes
  2. Share with dev team - Review features documentation
  3. Set up meetings - Walkthrough of prototypes
  4. Create Figma - Design team creates high-fidelity mockups
  5. Initialize repo - Dev team sets up Next.js + Anchor
  6. Sprint planning - Break features into 2-week sprints

Questions to Answer:

  • Which DeFi protocols to integrate first?
  • What's the minimum TVL for launch?
  • Which oracle provider for each game type?
  • What's the fee structure? (5% of yield?)
  • When to launch on devnet vs mainnet?
  • Marketing strategy pre-launch?

🎉 Congratulations!

You now have: ✅ Complete feature documentation (100+ pages) ✅ 4 interactive HTML prototypes ✅ Full competitor analysis ✅ Technical architecture ✅ Development roadmap ✅ Design system ✅ Implementation guides

Everything you need to go from concept to MVP! 🚀


📚 Resources

Solana Development:

DeFi Protocols:

Oracles:

Design:


Built with ❤️ for the YieldPlay team

Last Updated: October 28, 2025

About

YieldPlay: Boost your real DeFi yield — no leverage, no liquidation, just smarter yield games.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages