Prediction Market utilising Ethereum, Truffle, and ReactJS
A Platform for users to create and participate in prediction markets.
Ensure npm is installed
Run npm install truffle
to install truffle
Solidity 0.8.17
is used.
To compile contracts, run truffle compile
To deploy, run
truffle develop
> migrate --reset
> deploy
To launch website, in another shell run the commands cd frontend
, npm install
, npm start
Users can open new topic (a new prediction market) with
- Topic Name
- Description
- Outcome options to bet on (2 or More)
- Deadline for betting to close (resolution deadline is default 30 days after betting closes)
- Arbitrator identity (can be default oracle, or topic owner)
- Commision to Topic Owner (max Commission is 20%)
- Minimum bet value (> 100 Wei, as Fixed Commission to contract owner is 100 Wei)
Minimum bet value is 100 Wei or as specified by Topic Owner, whichever is higher
- Bet on a topic and a side for each bet
- Bet value is message value - fixed comission of 100 Wei
- Only the specified arbitrator identity (the trusted judge after the event occurs) can report the results
- Specified arbitrator can only resolve after betting closes and before the arbitrator resolution deadline
- Winners will claim winnings - corressponding commission to topic owner
- User will not be able to claim if lost
- If no one won, then all bets are refunded
- Users can see all past bets made on the various topics
- Users will be able to see if their bets have been claimed