Betting dapp using ChakraUI
- 🐣 Project being developed by Newbie's Lounge
- 👷♀️ To view current development tasks, check the Issues on the Github repo.
- 🧰 To chat with other buidlers about this project, join Newbies Lounge Telegram group
- 🛠️ To submit a PR (Pull Request), fork and pull a request to this repo.
- 🐣 Make sure you know the ETH Tech Stack and understand how to make a dApp using Scaffold-ETH 2.
- An address challenges another address and specifies a referee address and optionally a bet amount
- Challenged address accepts the challenge and bets the same amount as the proposer address
- Referee sets the game as started and challenge can't be canceled no more (suposedly, this coincides with a real life sports match)
- Referee sets the score and prize gets distributed accordingly (and then all to winner, or split if tie)
- (still not implemented) After results are in, a SVG NFT with the results of the match in the image can be claimed by all parts involved
Before you begin, you need to install the following tools:
- Node (v18 LTS)
- Yarn (v1 or v2+)
- Git
To get started with Sportsbook, follow the steps below:
- Open a terminal, clone this repo, and install dependencies
git clone https://github.com/luloxi/sportsbook.git
cd sportsbook
yarn install
- Run a local network in the first terminal:
yarn chain
This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development.
- On a second terminal, deploy the test contract:
yarn deploy
This command deploys a test smart contract to the local network.
- On a third terminal, start your NextJS app:
yarn start
Visit your app on: http://localhost:3000
. You can interact with your smart contract using the Home or debug contracts in the frontend.
- Smart contract
Sportsbook.sol
inpackages/hardhat/contracts
- Deployment scripts in
packages/hardhat/deploy
- Frontend files in
packages/nextjs/pages
- Types files in
packages/nextjs/types
- Offer multiple ways of betting
- Have a social network that allows you to find and challenge other teams on the same geographic zone
- Generate an income for verified referees that help keep the platform fair
For everyone:
- Showcase past matches on your profile as NFTs
- Showcase stats and other information on profiles
- Allow communication and coordination between users, teams and referees with the social part
For users:
- Social media app to find a team for the sport you select
- Find a team on your geographic zone
For teams:
- Find and challenge other teams on the same geographic zone
- Pay to location providers for matches against other teams (half each team)
- Bet between teams on the outcome of a given match
For referees:
- Act a trusted third party in exchange for payment
- Get instant payment after setting the score of a match
You can check current development notes here