Giter Site home page Giter Site logo

stox-core's Introduction

Stox Smart Contracts v0.1 (alpha)

Stox is a blockchain prediction markets platform. To learn more about Stox please visit the Stox website and read the Stox whitepaper (https://www.stox.com/assets/pdf/stox-whitepaper.pdf/)

Contracts Overview

Our first smart contracts are being released with a Pool Prediction. A Pool Prediction distributes tokens between all winners according to their proportional investment in the winning outcome. The prediction winning outcome is decided by an oracle contract.

Pool Prediction

Pool Prediction Example

A prediction has 3 different outcomes:

  1. Outcome 1
  2. Outcome 2
  3. Outcome 3
  • User A placed 100 tokens on Outcome 1
  • User B placed 300 tokens on Outcome 1
  • User C placed 100 tokens on Outcome 2
  • User D placed 100 tokens on Outcome 3

Total token pool: 600

For example, after the prediction ends, the oracle decides the winning outcome is Outcome 1. Users can now withdraw the following token amount from their predictions:

  • User A -> 150 tokens (100 / (100 + 300) * 600)
  • User B -> 450 tokens (300 / (100 + 300) * 600)
  • User C -> 0 tokens
  • User D -> 0 tokens

Pool Prediction Lifecycle

  • Initializing - The status when the prediction is first created. During this stage we define the prediction outcomes.
  • Published - The prediction is published and users can now predict on the different outcomes.
  • Resolved - The prediction is resolved and users can withdraw their winnings.
  • Paused - The prediction is paused and users can no longer make predictions until the prediction is published again.
  • Canceled - The prediction is canceled. Users can get their STX refunded to them.

stox-core's People

Contributors

dannystox avatar

Watchers

James Cloos avatar zwhinmedia 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.