Skip to content

Futurecast is a decentralized market where users can stake on a question and get exciting and high returns. We can provide you more returns with the help of external network staking clients. What are you waiting for? Let's stake some Matic with a minimal gas fee!

Notifications You must be signed in to change notification settings

codeDcode-2021/futurecast-contracts

Repository files navigation

Maintenance Website monip.org made-for-VSCode PRs Welcome Open Source Love png1

Improvised Decentralized prediction market smart contracts

Introduction

FutureCast is a decentralized market where users can stake on a question and get exciting and high returns. We can provide you more returns with the help of external network staking clients. What are you waiting for? Lets stake some Matic with minimal gas fee!🥳

Type of users

  • An owner:
    • can post a new question
    • can set start time & end time
    • will get the rewards at the end
  • A user:
    • can stake on an option
      • Pay some validation+platform fee, which increases as we reach closer to the end time
      • Can change their option at any time
      • Get reward after resolution phase
    • can change their option by paying a small amount of fee
  • Validators:
    • Can validate on an option
    • Get rewards if their option turns out to be correct

Features

  • Right users will always get profit
  • Right validators will always get profit
  • Owner will get their benefit
  • Contract states: Betting, inactive, reporting, resolved
  • External staking through smart contract, ps: more profit to everyone
  • Deployment on matic
  • Compatible with metamask and portis

Platform fee for stakers over time

The platform fee increases with degree 5 polynomial function as the number of days increases, explained by the given formula y = k*x^5, where x is the number of days and k is a normalizing constant.

Rewards vs. stake over time

Technology used:

Files

.
├── contracts
│   ├── Factory
│   │   └── EIP1167_Factory.sol
│   ├── Question
│   │   └── EIP1167_Question.sol
│   └── Utils
│       ├── CloneFactory.sol
│       ├── console.sol
│       ├── Formulas.sol
│       └── SafeMath.sol
├── hardhat.config.js
├── helper
│   ├── components-ganache.js
│   └── components-hre.js
├── integ
│   └── info.json
├── migrations
│   ├── 1_local_node.js
│   └── 2_any.js
├── package.json
├── README.md
└── test
    ├── 1_EIP1167_Tests.js
    ├── 2_Require_Tests.js
    └── 3_Random_market_Simulation.js

How to run?

  • npm i: Installation
  • npm run compile: Compile the contracts
  • npm run test: Run the tests
  • npm run node: Run the local hardhat node
  • npm run hh: Deploy on local hardhat node
  • npm run any: Deploy on custom specified network

VS Code Extensions

Contributors

anupam
Anupam Kumar
anupam
Chinmay Sai Vemuri
anupam
Saurabh Kumar Suryan
anupam
Tushar Rohilla
anupam
VIPIN K P

ForTheBadge built-with-swag ForTheBadge uses-git ForTheBadge uses-js

About

Futurecast is a decentralized market where users can stake on a question and get exciting and high returns. We can provide you more returns with the help of external network staking clients. What are you waiting for? Let's stake some Matic with a minimal gas fee!

Topics

Resources

Stars

Watchers

Forks