A decentralized prediction market platform built on Hyperliquid, allowing users to create and trade binary outcome markets.
- Create and manage prediction markets
- Trade YES/NO tokens
- Integration with Hyperliquid's order book
- Oracle system for market resolution
- Collateral management
- Real-time market data and trading interface
hypermarket/
├── contracts/ # Rust smart contracts
│ └── src/
│ ├── market.rs # Market contract implementation
│ ├── oracle.rs # Oracle system
│ └── events.rs # Event handling
├── backend/ # Backend API server
│ └── src/
│ └── schema.rs # Database schema
└── frontend/ # Next.js frontend application
└── src/
├── components/ # React components
├── hooks/ # Custom React hooks
└── types/ # TypeScript types
- Node.js (v16 or later)
- Rust (latest stable)
- PostgreSQL
- Git
-
Clone the repository:
git clone https://github.com/yourusername/hypermarket.git cd hypermarket -
Install frontend dependencies:
cd frontend npm install -
Install Rust dependencies:
cd ../contracts cargo build -
Set up environment variables:
cp .env.example .env # Edit .env with your configuration -
Start the development servers:
# Terminal 1: Frontend cd frontend npm run dev # Terminal 2: Backend cd backend cargo run # Terminal 3: Contracts (if needed) cd contracts cargo run
- Frontend runs on: http://localhost:3000
- Backend API runs on: http://localhost:8000
- Contracts interact with Hyperliquid testnet
# Run frontend tests
cd frontend
npm test
# Run contract tests
cd contracts
cargo test
# Run backend tests
cd backend
cargo test- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.