This demo project is a decentralized soccer prediction market platform built on the Avalanche Fuji Testnet. This monorepo contains all core components needed to operate the system, including smart contracts, a web frontend, a backend server, and a subgraph.
A Mock USDC faucet and a testnet AVAX faucet are provided ensuring you can seamlessly test the prediction markets without it being a hassle.
- Solidity – Core logic for the prediction markets via smart contracts.
- Chainlink Functions – Acts as an Oracle for match result and tournament round retrieval from API Football.
- Chainlink Automation – Executes smart contract actions (e.g., match resolution) automatically.
- Gnosis Conditional Tokens Framework (CTF) – Enables conditional payouts based on match outcomes.
- Logarithmic Market Scoring Rule (LMSR) – Dynamically calculates odds and manages liquidity.
- The Graph Protocol – Indexes on-chain events and provides efficient querying.
- React + RainbowKit – Delivers a user-friendly web interface and WalletConnect integration.
- Express.js + WebSockets – Handles backend data aggregation and enables real-time odds updates.
- Privy - Enables wallet abstraction login methods like google or email.
- Contracts: Deployed on Avalanche Fuji Testnet
- Frontend: Hosted on Vercel
- Backend: Hosted on AWS EC2
- Subgraph: Deployed to a self-hosted Graph Node running on AWS EC2.
- Live Demo: Accessible at liveduel-demo-2.app
├── contracts # Solidity smart contracts
├── frontend # React web interface
├── backend # Express.js server aggregating data from The Graph & API Football
└── subgraph # The Graph Protocol subgraph for event indexing
Each module has its own README.md with setup and deployment instructions.
For module-specific setup instructions, refer to:
This project is licensed under the MIT License.
