---
# System prepended metadata

title: Subreddit Prediction Market

---

# Subreddit Prediction Market

## Goal
Create an easy-to-use service on Ethereum that allows subreddit moderators to create prediction markets for community members. For example, a prediction market can be used as a spam filtering mechanism by allowing community members to bet on whether or not a new post is spam. Community members are incentivized to participate because correct predictions are rewarded with additional tokens.

## Basic Design

First, a prerequisite for this prediction market is a token that's widely distributed to community members. The tokens are used to place bets. Second, a smart contract allows subreddit moderators to create new prediction markets. The smart contract allows token holders to predict the final result, and if that prediction turns out to be correct, they are rewarded with additional tokens.


## Market design
For each prediction market we have a uniswap style mechanism. A user makes a post. We automatically create a pool A and pool B. Where the currency held in pool A (SPAM) and pool B (Not SPAM) are the sub reddits community points. 

If the post is eventually marked as spam by a moderator in pool B is divided among everyone in pool A. If the post is marked as not spam the tokens in pool A is divided among everyone in pool B. 

How does this division happen? If we divided evenly there would be a pile in attack where when it is clear how a post will be resolved (maybe while the settlement transaction is in flight) many user bet all their tokens on that outcome in order to maximize their returns. 

Insead we borrow the idea of [invariant exchange](https://blog.gnosis.pm/building-a-decentralized-exchange-in-ethereum-eea4e7452d6e) from uniswap. We have tokens in pool A and pool B. I want to make a bet. To do this I need to: 

1. Risk tokens that I will lose if I am wrong
2. Get some tokens if I am right. 

The people who deposit into pool A are betting it is spam. The ones who are depositing into pool B are betting it is not. 

If I deposit into pool A I get 

$b_{remove} = b - (a*b)/(a+a_{add})$ 

b_remove tokens from pool B if I am correct and my original stake from pool a. 

### Liquidity reward. 

We can take a small amount of every transaction around 1%. This can then be distributed evenly between both pools. But the reward is given per trade. So at trade x everyone who is in the liqiuduty pool at that time gets a reward proportioal to their share of the liqudity pool. Note we can do this easily by burning 1% of the tokens being withdrawn. 

The idea here is that if the ration of the pools enters the odds that you belive are correct for an event. The rational move is to put funds on both side of the pool. We offer the 1% reward of each trade as incentive to increase the liqidity of the pool and reduce slippage when users try and make big bets. 

Currently preidction markets don't offer a confidence about predictions. This is because there is no way to trade at a given price. But with invariant based exchanges you have that option. If we maximize the pool size it means that users can make bigger bets at a price. This means that the market is more confident. So we incentivize this with the 1% liquity fee. 

Finally, in order to reduce transaction fee payments, transactions will be executed using an Optimistic Rollup.

## Example: Reddit community auto moderator 

Every post that is placed on a subreddit automatically has a prediction market created with the field "Will a moderator label this as spam post". Anyone with community points is able to participate in this market. 

When the market is created the creator bets 10 community points on both the post being and not being spam. This is an incentive to others to check if the post is spam. Basically a community reward for helping the mod team. 

If it is spam they can bet and say it is spam. They know that the moderators when they check the post will label it as such. 

Any post that has probability 50% is spam gets auto blocked but the moderatos can unblock it. Any post that has prob 50% is not spam gets left as usual. 

If an attacker wants to beat this system they have to bet that their own post is not spam. This is a bet they will lose when the moderators resolve the market. When they make this bet. Community members are incentivized to bet against it. There are also incentives for people to create bots that detect if posts are spam. 

Most markets will have very clear results so there is no need for the moderators to resolve every market. Only the controversial ones. 


## Milestones 

1. ramp up on https://github.com/Hubble-Project and how it works
2. Make a simple child chain that mass migrates from a hub chain and back again. This kind of depends upon Vaibhav adding mass migrations + stabalizing hub chain. 
3. Create the fraud proof for prediction market opru
4. Deploy to testnet with coordinator + users. 
5. Make a CLI that lets you make bets / mass migrate / withdraw / predict / get your winnings. This will feed into a UI specialist who will make a UI, also may need to support them. 
6. Make a tutorial about how to make a child chain.