https://github.com/tinodcodes/simuka-drace-blockdag-hackathon-dapp
RaceChain is a decentralized horse racing protocol that brings transparency, automation, and accessibility to global horse race betting. Built using Solidity, NextJS, C#, and PostgreSQL, RaceChain delivers a trustless, fast, and globally accessible betting experience.
https://github.com/tinodcodes/simuka-drace-blockdag-hackathon-dapp
blockchain blockdag ethereum hardhat heroui nextjs solidity tailwindcss tanstack-react-query web3-dapp
Last synced: 3 months ago
JSON representation
RaceChain is a decentralized horse racing protocol that brings transparency, automation, and accessibility to global horse race betting. Built using Solidity, NextJS, C#, and PostgreSQL, RaceChain delivers a trustless, fast, and globally accessible betting experience.
- Host: GitHub
- URL: https://github.com/tinodcodes/simuka-drace-blockdag-hackathon-dapp
- Owner: TinoDCodes
- License: mit
- Created: 2025-07-05T09:33:56.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-25T10:45:47.000Z (11 months ago)
- Last Synced: 2025-10-05T15:00:04.540Z (9 months ago)
- Topics: blockchain, blockdag, ethereum, hardhat, heroui, nextjs, solidity, tailwindcss, tanstack-react-query, web3-dapp
- Language: TypeScript
- Homepage: https://simuka-race-chain.vercel.app
- Size: 4.47 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RaceChain
RaceChain is a decentralized horse racing protocol that brings transparency, automation, and accessibility to global horse race betting. Built using Solidity, NextJS, C#, and PostgreSQL, RaceChain delivers a trustless, fast, and globally accessible betting experience.

## ๐ Features
- ๐ On-chain horse race betting (fixed odds and tote liquidity options)
- ๐ธ Only 1% platform fees (vs traditional 10-15%)
- ๐ Smart contract-based payouts and liquidity management
- โก Block DAG infrastructure for high scalability
- ๐ Immutable race history and odds transparency
- ๐ฅ DAO and AI-driven odds engine
- ๐ Global access to horse racing markets
- ๐ก Real-time racing data ingestion
- ๐ฐ Decentralized liquidity pools
## Table of Contents
- [Installation](#-local-setup)
- [Usage](#-usage)
- [Technology Stack](#%EF%B8%8F-technology-stack)
- [Project Structure](#-project-structure)
- [License](#license)
---
## ๐งช Local Setup
### Prerequisites
- Node.js (v18+)
- npm (v9+)
- Hardhat
- Git
### Setup Instructions
1. **Clone the repository**:
```bash
git clone [https://github.com/your-username/RaceChain.git](https://github.com/TinoDCodes/Simuka-DRace-BlockDAG-Hackathon-dApp.git)
cd Simuka-DRace-BlockDAG-Hackathon-dApp
```
2. **Set up the smart contract environment (dApp folder)**:
```bash
cd dApp
npm install
```
3. **Set up the frontend (frontend folder)**:
```bash
cd ../frontend
npm install
```
4. **Configure environment variables**:
- Create `.env` files in both `dApp` and `frontend` directories based on the provided `.env.example` files
- Add your Infura/Alchemy API keys, wallet private key (for deployment), and other required secrets
## ๐ง Usage
### Compile & Deploy Smart Contracts
1. Set up `parameters.json` in the `ignition` folder with relevant contract deployment params.
2. **Compile the smart contracts**:
```bash
cd dApp
npx hardhat compile
```
3. **Deploy contracts**:
```bash
npx hardhat ignition deploy .\ignition\modules\ --network --parameters .\ignition\
```
(See the Hardhat and Hardhat Ignition documentations for more information.)
### Run Frontend (Next.js)
1. Navigate to `frontend/`
2. Install and run:
```bash
npm run dev
```
---
## โ๏ธ Technology Stack
### Smart Contracts (dApp folder)
- **Solidity**: For writing smart contracts
- **Hardhat**: Development environment for Ethereum
- **Ethers.js & Hardhat Ignition**: Interacting with Ethereum blockchain
- **Mocha**: Smart contract testing
- **OpenZeppelin**: Secure smart contract libraries
### Frontend (frontend folder)
- **Next.js**: React framework for server-rendered applications
- **Tailwind CSS**: Utility-first CSS framework
- **Wagmi**: React hooks for Ethereum
- **Hero UI**: Component library
- **Recharts**: Data visualization library
- **Framer Motion**: Animation library
- **RainbowKit**: Wallet adapter library
### Backend (Hosted Privately)
- ASP.NET Core (C#) + EF Core
- PostgreSQL
- Nethereum
- Chainlink Oracle (planned)
- Docker + Azure App Services (deployment)
- Serilog + Application Insights (monitoring)
## ๐ Project Structure
```
RaceChain/
โโโ dApp/ # Smart contract project
โ โโโ contracts/ # Solidity smart contracts
โ โโโ scripts/ # Custom scripts
โ โโโ ignition/ # Ignition modules
โ โโโ typechain-types/ # Typescript factories and helpers
โ โโโ test/ # Smart contract tests
โ โโโ hardhat.config.js # Hardhat configuration
โ โโโ package.json
โ
โโโ frontend/ # Next.js application
โ โโโ public/ # Static assets
โ โโโ app/ # Next.js pages, layouts & api routes
โ โโโ components/ # React components
โ โโโ hooks/ # Custom hooks
โ โโโ utils/ # Utility functions & files
โ โ โโโ ...
โ โโโ next.config.js # Next.js configuration
โ โโโ package.json
โ
โโโ LICENSE
โโโ README.md # This file
```
## ๐ฐ Revenue Model
- ๐๏ธ DAO collects a small settlement fee on liquidity pool settlements.
- ๐ค Stakers co-own the AI model that generates odds and trading signals.
- ๐ A tiny fee is applied to peer-to-peer betswaps.
- ๐ธ Revenue is distributed between the DAO treasury and staking participants.
---
## ๐ง About
RaceChain is developed by **Simuka Solutions**, a blockchain innovation firm focused on real-world decentralized applications in sports, finance, and governance.
๐ Visit us: [simukasolutions.com](https://simukasolutions.com)
---
## ๐ชช License
MIT License. See [LICENSE](./LICENSE) for details.