An open API service indexing awesome lists of open source software.

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.

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.

![RaceChain Banner](frontend/public/racechain-banner.png)

## ๐Ÿš€ 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.