A decentralized lottery protocol with verifiable randomness and sustainable tokenomics.
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
-
LuxeWinToken (LUX)
- ERC20 governance token
- Used for ticket purchases at a discount
- Staking rewards
- Initial supply: 100M tokens
-
LuxeWinLottery
- Manages lottery rounds
- Handles ticket purchases
- Integrates Chainlink VRF
- Distributes prizes
- Collects protocol fees
-
LuxeWinStaking
- Manages LUX token staking
- Distributes protocol fees to stakers
- Time-lock mechanisms
- APY rewards
- Node.js v16+
- npm or yarn
- Hardhat
# 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
npm run compile
# Run all tests
npm test
# Run specific test file
npx hardhat test test/LuxeWinLottery.test.js
# Run with coverage
npm run coverage
# Deploy to testnet (Sepolia)
npm run deploy:testnet
# Deploy to mainnet
npm run deploy:mainnet
- 24-hour rounds
- Base ticket price: 0.01 ETH
- 10% discount when using LUX tokens
- Verifiable random winner selection
- Automatic round creation
- 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
- Minimum 24-hour lock period
- Protocol fee distribution
- No maximum lock duration
- APY based on protocol volume
- Chainlink VRF for randomness
- Role-based access control
- Emergency pause mechanism
- Reentrancy protection
- Comprehensive test suite
The protocol is pending audit. Use at your own risk.
- Fork the repository
- Create feature branch
- Commit changes
- Create pull request
MIT License - see LICENSE for details
- Discord: Join our community
- Twitter: @LuxeWinProtocol
- Website: https://luxewin.io