project screenshot 1
project screenshot 2
project screenshot 3

Battle Arena

Battle Arena allows gaming enthusiasts (and even non gaming enthusiasts) to bet on their favorite professional teams participating in E-Games World Tournaments in a single button!

Battle Arena

Created At

BuildQuest

Project Description

Most of us have played an online game may be in our college or school. It can be PUBG, Counter-Strike, Valorant and the list goes on. With the advent of Metaverse, we have already seen a boom in the gaming area and it will move forward in the near future. As the gaming industry grows the number of professional gaming tournaments also increases. Battle Arena provides users with a platform to place bets on their favourite teams. It provides an easy and secure way to do it. I will also extend our platform to provide rare match NFTs for which a user is betting on.

How it's Made

We're using React, with Moralis and Chainlink on the Ethereum Kovan blockchain, to create the project. All the smart contracts are written in Solidity. Most of the match data is stored on a chain as currently, it is only text data. I have created a token ‘SATTA’ for our Dapp which is a native ERC20 token for ‘Battle Arena’ used for betting on different matches. (In future we are planning to introduce Liquidity Pools for our token in Uniswap from where a user can swap MATIC token for SATTA). The front of the Dapp is built using React and Moralis helped us so much with communicating with our smart contract through their SDK. As I am a backend developer, I have worked with react for the first time so I had a hard time introducing new features in the front-end. But working with Moralis was a delight as it takes care of the nitty gritties of many things and I was mainly focused on smart contract development.

I have used chain link for leveraging off-chain computation offered by it. The Chainlink oracle calls the API of ‘pandascore.co’ to retrieve the live matches of all the supported eGames. The API is called everytime a new Game is clicked by the user for getting the live matches of that game. When the user places a bet on a game he needs to sign two transactions (first for providing the allowance to contract to take SAT tokens from his wallet and the next for signing the transaction of transfer of SAT tokens). The amount of bet is fixed currently (10 SAT tokens) but in future I will provide the functionality to provide the place custom bets. (In future we will build our own chain link oracle)

The user cannot place bets after the match has started and after the match ends the rewards will be distributed to all the winners. The amount he will get depends on the number of people betting on the opponent's side. In future I will be extending the platform where the user can also place bets on matches which are hosted in Metaverse platforms like Decentraland and Sandox

Apart from above mentioned tools I have also used Remix IDE, Truffle, Ganache and Metamask.

Code for full Dapp: https://github.com/rishotics/battle-arena

background image mobile

Join the mailing list

Get the latest news and updates