Skip to content

Sheshiyer/luxewin-protocol

Repository files navigation

LuxeWin Protocol

A decentralized lottery protocol with verifiable randomness and sustainable tokenomics.

Overview

LuxeWin is a fair and transparent lottery protocol built on Ethereum that leverages Chainlink VRF for verifiable randomness. The protocol features:

  • Automated and transparent prize distribution
  • Verifiable random number generation
  • Token-based governance
  • Staking rewards
  • Protocol-owned liquidity

Architecture

Smart Contracts

  1. LuxeWinToken (LUX)

    • ERC20 governance token
    • Used for ticket purchases at a discount
    • Staking rewards
    • Initial supply: 100M tokens
  2. LuxeWinLottery

    • Manages lottery rounds
    • Handles ticket purchases
    • Integrates Chainlink VRF
    • Distributes prizes
    • Collects protocol fees
  3. LuxeWinStaking

    • Manages LUX token staking
    • Distributes protocol fees to stakers
    • Time-lock mechanisms
    • APY rewards

Setup

Prerequisites

  • Node.js v16+
  • npm or yarn
  • Hardhat

Installation

# Clone the repository
git clone https://github.com/your-repo/luxewin-protocol
cd luxewin-protocol

# Install dependencies
npm install

# Create .env file
cp .env.example .env

Edit .env file with your configuration:

PRIVATE_KEY=your_private_key
INFURA_KEY=your_infura_key
ETHERSCAN_API_KEY=your_etherscan_key
VRF_COORDINATOR=network_specific_coordinator
VRF_SUBSCRIPTION_ID=your_subscription_id
VRF_KEY_HASH=network_specific_keyhash

Compile Contracts

npm run compile

Run Tests

# Run all tests
npm test

# Run specific test file
npx hardhat test test/LuxeWinLottery.test.js

# Run with coverage
npm run coverage

Deployment

# Deploy to testnet (Sepolia)
npm run deploy:testnet

# Deploy to mainnet
npm run deploy:mainnet

Protocol Mechanics

Lottery

  • 24-hour rounds
  • Base ticket price: 0.01 ETH
  • 10% discount when using LUX tokens
  • Verifiable random winner selection
  • Automatic round creation

Token Economics

  • 5% protocol fee on ticket sales
    • 3% to LUX stakers
    • 2% to protocol treasury
  • Token utility:
    • Governance voting
    • Ticket purchase discount
    • Staking rewards
    • DAO participation

Staking

  • Minimum 24-hour lock period
  • Protocol fee distribution
  • No maximum lock duration
  • APY based on protocol volume

Security

Features

  • Chainlink VRF for randomness
  • Role-based access control
  • Emergency pause mechanism
  • Reentrancy protection
  • Comprehensive test suite

Audits

The protocol is pending audit. Use at your own risk.

Documentation

Contributing

  1. Fork the repository
  2. Create feature branch
  3. Commit changes
  4. Create pull request

License

MIT License - see LICENSE for details

Contact

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published