Skip to content

Repository files navigation

Sol Peek Play Protocol

A decentralized gamified staking protocol built on Solana, featuring dynamic timers based on SOL price movements, multi-tier reward distribution, and stakeholder incentives.

Features

Core Mechanics

  • Dynamic Timer System: Game timer extends by up to 30 seconds when SOL hits new price highs
  • Multi-tier Staking: Supports 147+ stakeholders and 25,000+ depositors
  • Progressive Deposits: Minimum deposit starts at 0.01 SOL, increasing by 0.000001 SOL per deposit
  • Chainlink Integration: Real-time SOL price feed for game mechanics

Reward Distribution

  • Stakeholder Rewards:
    • 9% of deposits distributed to stakeholders
    • 2% daily bonus for stakeholders with 30+ deposits
  • Referral System: 48% of deposits allocated to referral pool
  • Daily Rewards: 3% distributed to top 3 depositors
  • Fixed Wallets: 5% to wallet_1, 9% each to wallet_2 and wallet_3
  • Game Pot: 20% contributed to the game pot

Technical Features

  • Pull-based Claims: Individual claim mechanism for scalability
  • Secure Fund Management: Protected fund distribution with error handling
  • Event Tracking: Comprehensive event emission system
  • Automated Tests: Extensive test suite for both local and devnet environments

Prerequisites

  • Rust 1.69.0 or higher
  • Solana Tool Suite 1.16.0 or higher
  • Node.js 18.0.0 or higher
  • Anchor Framework 0.28.0 or higher

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/sol-peek-play-protocol.git
cd sol-peek-play-protocol
  1. Install dependencies:
yarn install
  1. Build the program:
anchor build

Testing

Run the test suite:

# Local validator tests
anchor test

# Devnet tests
anchor test --provider.cluster devnet

Deployment

  1. Update program ID in Anchor.toml and lib.rs

  2. Deploy to devnet:

anchor deploy --provider.cluster devnet
  1. Deploy to mainnet:
anchor deploy --provider.cluster mainnet

Program Architecture

graph TD
    A[Deposit Instruction] --> B[Master PDA]
    B --> C[Game State]
    B --> D[User PDA]
    B --> E[Stakeholder PDAs]
    C --> F[SOL Price High]
    D --> G[User Deposits]
    E --> H[Stakeholder Claims]
Loading

Account Structure

  • Master: Global game state and fund tracking
  • GameState: SOL price highs and timer management
  • User: Individual deposit and claim records
  • Addresses: Stakeholder registry and allocation tracking

Security Considerations

  • Protected fund distribution with PDA checks
  • Secure timer extensions with Chainlink oracle
  • Pull-based claim pattern for large-scale operations
  • Individual stakeholder authorization

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For questions and support, please open an issue in the GitHub repository.

About

A decentralized gamified staking protocol built on Solana, featuring dynamic timers based on SOL price movements, multi-tier reward distribution, and stakeholder incentives.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages