Code Monkey home page Code Monkey logo

codedcode-2021 / futurecast-contracts Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 4.0 948 KB

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!

Home Page: https://futureforecast.netlify.app/

Solidity 77.12% JavaScript 21.77% Python 1.12%
solidity solidity-contracts solidity-dapps open-zeppelin ganache-cli matic web3js web3 metamask portis

futurecast-contracts's Introduction

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

futurecast-contracts's People

Contributors

anupam-io avatar capten101 avatar rashtrakoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.