No description
  • JavaScript 76.8%
  • Pug 14.9%
  • SCSS 6.1%
  • Shell 1.3%
  • Dockerfile 0.5%
  • Other 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-02-03 15:40:45 +01:00
.meteor Patched build to make it still build and run 2023-12-02 12:59:00 +01:00
client New logo on login screen 2024-02-03 15:37:02 +01:00
graphics Added logo 2015-01-14 02:13:40 +01:00
i18n de,fr and es translations for new trade log dl button 2021-05-31 20:56:43 +02:00
imports download token only valid in one minute. Also protected by secret 2021-06-01 00:32:00 +02:00
private Added server methods to send out batch enrollment emails 2016-11-15 17:07:06 +01:00
public New logo on login screen 2024-02-03 15:37:02 +01:00
server Fix zero is falsey bug when computing pricehistory 2023-11-30 22:35:36 +01:00
tests Removed more consts 2019-02-26 17:54:02 +01:00
.dockerignore Patched build to make it still build and run 2023-12-02 12:59:00 +01:00
.gitignore Patched build to make it still build and run 2023-12-02 12:59:00 +01:00
AppVersion.version Added version string on login screen 2019-03-06 21:06:57 +01:00
build-docker.sh Optionally pass version to Docker build 2023-12-03 18:58:37 +01:00
CHANGELOG.md New logo on login screen 2024-02-03 15:37:02 +01:00
collections.js Upgraded everything, ported from coffee to js 2018-09-02 02:43:26 +02:00
Dockerfile Optionally pass version to Docker build 2023-12-03 18:58:37 +01:00
entrypoint.sh Add settings.json to dockerfile 2019-03-27 23:40:37 +01:00
LICENCE Added licence information 2015-04-02 18:35:31 +02:00
package-lock.json Prepare release 1.7.1 2024-02-03 15:40:45 +01:00
package.json Prepare release 1.7.1 2024-02-03 15:40:45 +01:00
project-tap.i18n Added spanish translation 2016-05-26 19:59:52 +02:00
README.md Fix build script 2019-03-07 00:38:14 +01:00
scss-config.json Properly display tag fields. Use tagify.js 2019-07-28 01:08:04 +02:00
settings.json Actually fix auto logout 2019-03-31 16:54:29 +02:00

Predi predictionmarket

This is Predi, a reactive web app for running prediction markets.

Predi is an application that runs partly on the serverside and partly in the browser. Everything is reactive, so that any changes are reflected in all connected clients without the user having to update.

It is using Robert Hanson's lmsr market maker to compute prices for contracts.

Predi can simultaniously host several markets. Each market is its own economy, and can contain several Contract sets. A contract set is a topic on which a prediction is made.

A contract set is either a vote share contract set or a probabillity contract set. A vote share contract set can have many contracts whose prices will sum up to 100%. When a user buys shares in one contract, its price will increase and the other contracts in the set will decrease. Selling will have the opposite effect. It is also possible for users to short sell contracts. This will freeze a settable (by the administrator) amount of money per share from that user untill he buys back the shares or the market is settled. Freezing 100 credits per shorted share means no risk for the bank at the cost of reducing the market liquidity and creating a upward pressure on the prices. This is to avoid the bank ending up owing money after settling the market.

A probabillity contract set only have one contract whose price is somewhere between 0 and 100. They are of the form "How likely is it that x will happen". Technically a probabillity contract set is the same as a vote share set with two contracts, but one of the contracts are always hidden from view.

Markets and users have tags. Any user that have a tag matching a market is given access to that market. When a match is first created (adding a tag to a user or a market), all affected users are given starting funds. The amont of funds given is configurable per market.

Predi is built using the Meteor framework.

Development

Install Meteor, clone Predi and run meteor in the root folder of the cloned app. Then open http://localhost:3000 in a browser. A development database will be created, and when you first open the app in a browser you will be asked to create an administrator account, and whether you want some test market data to be generated. Changes to the code will be immediatly reflected in the brower as long as meteor is running.

Deployment

The recomended way to deploy Predi is using Docker. You can build a Docker container using the build-docker.sh script at the root of the project. The resulting container will need a MonogDB container running along side it. You should also map out /home/meteor/images to a folder on the docker host to persist uploaded images.