Solana Lottery Game

Built smart contract for lottery game and backend and frontend integration. implemented NFT mint and rewards for users who only followed the official twitter by using rapid api. Made ticket purchase system which user buys 6 of ticket number, discord bot service.

Web3 Casino Game Engine
Solana
Provably Fair
Solana Lottery Game - Roswelly Rust / smart contract project screenshot
Status: Active

Project Overview

Built smart contract for lottery game and backend and frontend integration. implemented NFT mint and rewards for users who only followed the official twitter by using rapid api. Made ticket purchase system which user buys 6 of ticket number, discord bot service.

An end-to-end on-chain lottery game on Solana. I wrote the smart contract in Rust with Anchor, implementing ticket issuance (players pick 6 numbers), draw logic, prize distribution and an NFT reward mechanism gated on Twitter follow verification via a Rapid API integration.

The backend is Node.js + MongoDB, with a Discord bot that mirrors game state and notifies winners. The design emphasizes provable fairness: all outcomes are derived from on-chain state so players can independently verify draws.

Technical Implementation

Architecture

A modular architecture cleanly separating on-chain programs, low-latency data ingestion, and the user-facing app. On-chain code is written in Rust or Solidity with strict test coverage; off-chain services run on Node.js / Rust backends with Redis and PostgreSQL for hot and durable state respectively, containerized for reproducible deploys.

Smart Contracts

Programs are implemented in Rust with the Anchor framework on Solana, or in Solidity on EVM chains, with strict access control, exhaustive error handling, and gas / compute-unit optimization. Every state transition is covered by unit and integration tests before mainnet deployment.

Performance & Reliability

Where the project is performance-sensitive, the hot path is optimized end-to-end: zero-copy parsing, connection pooling, Redis-backed caches, Jito / Nozomi inclusion for Solana, and careful batching for EVM. Monitoring and alerts cover latency, inclusion rate, and PnL so regressions surface immediately.

Technologies Used

Rust
Anchor
web3.js
React
Typescript
MongoDB
TailwindCSS
discord.js
Node.js
Rapid API

Project Links