The Fantasy Trading Arena on Solana
Arbitron transforms crypto trading into a fun, fair, and skill-based competition. Join fast-paced 10-minute contests, strategically draft your virtual portfolio, and compete for prizesโall without liquidation risks.
Crypto trading can feel intimidating, risky, and driven by emotion, leading many potential users to stay away. Arbitron solves this by:
- ๐ฎ Gamifying Trading: Turn crypto speculation into a competitive, strategic game
- ๐ก๏ธ Eliminating Risk: No liquidations, no real tradesโpure skill-based competition
- โก Lightning Fast: 10-minute rounds keep the action intense
- ๐ Provably Fair: Zero-knowledge proofs ensure transparent, tamper-proof results
- ๐ Skill-Based Rewards: Winners determined purely by strategy and market insight
- Browse active contests and pay the entry fee (e.g., 10 USDC)
- Each contest has a fixed duration (typically 10 minutes)
- Select crypto tokens under budget and category constraints
- Choose one "Power Token" for 2x leverage
- Strategic token selection is key to winning
- Watch real-time market prices via Pyth oracles
- Track your P&L and ranking on the live leaderboard
- See how your portfolio performs against competitors
- Highest P&L at contest end wins the prize pool
- Results verified via zero-knowledge proofs for fairness
- Prizes distributed automatically via Solana smart contracts
- Winners earn unique NFT badges as proof of skill
- Solana: Fast, low-cost transactions for seamless gameplay
- Anchor Framework: Type-safe Solana program development
- Bonsol ZK: Zero-knowledge proof verification for fair outcomes
- Pyth Network: Real-time price feeds
- PostgreSQL + Prisma: Contest and user data management
- Redis: Real-time price updates and pub/sub messaging
- WebSocket Server: Live leaderboard updates
- Aggregator Service: P&L calculation engine
- Crank Service: Automated contest lifecycle management
- ZK Data Prep: Proof generation and verification
- Next.js 15: React framework with App Router
- TypeScript: Type-safe development
- TailwindCSS + shadcn/ui: Modern, accessible UI components
- Solana Web3.js 2.0: Blockchain integration
- TanStack Query: Data fetching and caching
graph TB
User[User] --> Frontend[Next.js Frontend]
Frontend --> API[Express API]
Frontend --> Solana[Solana Program]
API --> DB[(PostgreSQL)]
API --> Redis[(Redis)]
Solana --> Contest[Contest Program]
Contest --> Pyth[Pyth Oracles]
Contest --> Bonsol[Bonsol ZK]
Crank[Crank Service] --> Contest
Poller[Price Poller] --> Redis
Aggregator[Aggregator] --> Redis
ZK[ZK Data Prep] --> Bonsol
WS[WebSocket Server] --> Frontend
Redis --> WS
arbitron/
โโโ programs/ # Solana programs (Anchor)
โ โโโ arbitron/ # Main contest program
โ โโโ src/
โ โ โโโ handlers/ # Instruction handlers
โ โ โโโ state/ # Account structures
โ โ โโโ lib.rs # Program entry point
โ โโโ Cargo.toml
โ
โโโ app/ # Monorepo applications
โ โโโ arbriton-frontend/ # Next.js web app
โ โ โโโ app/ # Next.js app router
โ โ โโโ components/ # React components
โ โ โโโ lib/ # Utilities
โ โ
โ โโโ api/ # Express.js backend
โ โโโ aggregator/ # P&L calculation service
โ โโโ crank-service/ # Contest automation
โ โโโ poller/ # Price polling service
โ โโโ ws-server/ # WebSocket server
โ โโโ zk-data-prep/ # ZK proof preparation
โ โโโ zk-tx-submitter/ # ZK result submission
โ
โโโ arbitron-pnl-guest/ # Risc0 ZK guest program
โ โโโ src/main.rs # P&L calculation logic
โ
โโโ packages/ # Shared packages
โ โโโ db/ # Prisma database client
โ โโโ shared-redis/ # Redis utilities
โ
โโโ dist/ # Generated Solana client
โ โโโ js-client/ # TypeScript bindings
โ
โโโ Bonsol-node/ # Bonsol ZK integration
- Node.js 22+ and npm
- Rust 1.75+ with Solana toolchain
- Anchor CLI 0.31+
- Docker (for Redis & PostgreSQL)
- Solana CLI configured for devnet
-
Clone the repository
git clone https://github.com/yourusername/arbitron.git cd arbitron -
Install dependencies
npm install
-
Set up environment variables
# Copy example env files cp .env.example .env cp app/arbriton-frontend/.env.example app/arbriton-frontend/.env.local # Edit with your configuration # - Database URLs # - Solana RPC endpoints # - Redis connection # - Pyth price feed addresses
-
Start infrastructure services
docker-compose up -d
-
Generate Prisma client
cd packages/db npx prisma generate npx prisma migrate dev -
Build Solana programs
anchor build npm run regenerate-client
-
Deploy to Solana devnet
anchor deploy --provider.cluster devnet
-
Start development servers
npm run dev
This starts all services concurrently:
- Frontend: http://localhost:3000
- API: http://localhost:5000
- WebSocket: http://localhost:8080
- Aggregator, Poller, Crank services
# Use the web UI or run the CLI
npm run create-contest --name "Lightning Round" --duration 600 --entry-fee 10- Navigate to
/contestson the web app - Connect your Solana wallet
- Select tokens within budget constraints
- Choose one Power Token for 2x leverage
- Confirm transaction to join
- Real-time leaderboard updates via WebSocket
- Live P&L calculations based on Pyth price feeds
- Track your ranking as the contest progresses
# Run Anchor tests
anchor test
# Run TypeScript tests
npm test
# Run specific service tests
npm --workspace=@arbitron/api test- Smart Contract Audits: Pending (pre-mainnet)
- Zero-Knowledge Proofs: All contest results verified via Bonsol ZK
- Oracle Security: Pyth Network for tamper-proof price data
- Access Control: Role-based permissions on Solana programs
- โ Core contest mechanics
- โ Token selection with Power Tokens
- โ Real-time leaderboards
- โ ZK proof integration
- โ NFT winner badges
- โณ Tournament brackets
- โณ Seasonal leagues
- โณ Team competitions
- โณ Advanced analytics dashboard
- โณ Mobile app
- ๐ฎ Cross-chain support
- ๐ฎ DAO governance
- ๐ฎ Creator tools for custom contests
- ๐ฎ Integration with DeFi protocols
- ๐ฎ Sponsorship & advertising platform
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Solana Foundation - For the lightning-fast blockchain
- Bonsol - For zero-knowledge proof infrastructure
- Pyth Network - For reliable price oracles
- Anchor Lang - For the amazing Solana framework
- Website: arbitron.fun
Transform your trading skills into victory. Join the arena today! โก๐