[deBetting - work for Chainlink Hackaton Fall 2022]
The project to be sent as hackaton work is a football betting app. Betting is performed fully on blockchain and Chainlink Oracle is used for feeding smartcontracts with match results. Moreover, the pool of tokens sent by user to bet is sent to Yearn protocol, which makes tokens ‘work’ additionally, generating more income for players. For additional revenue of using the app, is dedicated “BET” token for those who win the game. The application consists from components:
- Smartcontracts - deployed to Goerli Ethereum testnet. They are divided by: betting app logic, integration with Chainlink Oracle, ERC20 “BET” token and integration with Yearn protocol
- Frontend - connects to backed for cached data and with blockchain to allow users interact with the application
- Backend - caches necessary information to guarantee app performance and reduce usage costs and takes role of External API Adapter for feeding the Chainlink node
- Chainlink node - the Chainlink module that processes requests from smartcontracts, connects with external API and feeds smartcontracts back with match results
- Seweryn Kras, Frontend, Backend (sewerynkras@gmail.com)
- Jan Kwiatkowski, Blockchain, Chainlink Node Jobs (jan.kwiatkowski.web3@gmail.com)
- Przemyslaw Welenc, Frontend, Backend, Design (przemo246@gmail.com)
- Kamil Piekos, Frontend, Design (kamcio190@gmail.com)
- Dawid Walas, Blockchain, Chainlink Node Jobs (silverowiec@gmail.com)
Getting information about upcoming matches Betting for match results: Team A wins, Team B wins, Draw Depositing and withdrawal of DAI token (to bet/to get prize) Buying and minting BET tokens to boost your vote
Users can bet only once for a single match, depositing DAI tokens Betting app does not store any tokens, it sends them directly to Yearn protocol Total amount of tokens for a particular match is divided by winners, directly from Yearn protocol Each winner gets 1 BET token. After collecting 1000+ BET tokens, they can count on increased prize
- Create a
.env.prodfile in thebackend_serverdirectory according to the structure of./backend_server/.env.example(backend variables). NOTE: database hostname should bedatabase_prodand notlocalhost- example DATABASE_URL would bepostgresql://user:pass@database_prod:5432/db_name?schema=public - Create a
.env.prodfile in thefrontend_clientdirectory according to the structure of./frontend_client/.env.example(frontend variables) - Run
docker-compose up
- install dependencies
$ cd backend_server $ npm install - Create a
.envfile in the backend directory. You can provide your own values or copy./backend_server/.env.example - Setup prisma
$ npx prisma generate $ npx prisma migrate deploy $ npx prisma db seed
- Start the dev server
$ npm run dev