Skip to content

zeitgeistpm/zeitgeist

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5d6df79 · Mar 27, 2023
Feb 1, 2023
Dec 16, 2022
Jan 19, 2023
Jul 1, 2021
Jan 20, 2023
Jan 25, 2023
Mar 27, 2023
Jan 31, 2023
Jan 25, 2023
Mar 27, 2023
Mar 25, 2021
Jul 6, 2022
Mar 25, 2021
Jun 1, 2022
Aug 10, 2022
Jan 31, 2023
Jan 20, 2023
Oct 14, 2022
Mar 25, 2021
Jun 22, 2021
Oct 25, 2022
Jan 24, 2023
Aug 11, 2022
Oct 18, 2022
Dec 17, 2022
Oct 6, 2022

Repository files navigation

Zeitgeist: An Evolving Blockchain for Prediction Markets and Futarchy

Rust Codecov Discord Telegram

Zeitgeist is a decentralized network for creating, betting on, and resolving prediction markets. The platform's native currency, the ZTG, is used to sway the direction of the network, and as a means of last-call dispute resolution. Additionally, Zeitgeist is a protocol for efficient trading of prediction market shares and will one day become the backbone of the decentralized finance ecosystem by allowing traders to create complex financial contracts on virtually anything.

Modules

  • authorized - Offers authorized resolution of disputes.
  • court - An implementation of a court mechanism used to resolve disputes in a decentralized fashion.
  • global-disputes - Global disputes sets one out of multiple outcomes with the most locked ZTG tokens as the canonical outcome. This is the default process if a dispute mechanism fails to resolve.
  • liquidity-mining - This pallet implements the time-based incentivization with Zeitgeist tokens for continuously providing liquidity to swap pools.
  • market-commons - Contains common operations on markets that are used by multiple pallets.
  • orderbook-v1 - A naive orderbook implementation that's only part of Zeitgeist's PoC. Will be replaced by a v2 orderbook that uses 0x-style hybrid on-chain and off-chain trading.
  • prediction-markets - The core implementation of the prediction market logic for creating and resolving markets.
  • simple-disputes - Simple disputes selects the last dispute after a predetermined amount of disputes as the canonical outcome.
  • swaps - An implementation of liquidity pools that allows any user to provide liquidity to the pool or swap assets in and out of the pool. The market maker that is traded against is either a Constant Function Market Maker (CFMM) or a Rikiddo Market Maker.
  • primitives - Contains custom and common types, traits and constants.
  • rikiddo - The module contains a completely modular implementation of our novel market scoring rule Rikiddo. It also offers a pallet, that other pallets can use to utilize the Rikiddo market scoring rule. Rikiddo can be used by the automated market maker to determine swap prices.

How to build and run a Zeitgeist node

Zeitgeist node comes in two flavors, one for standalone self-contained execution and another for Kusama/Polkadot parachain integration.

To build the standalone version, simply point to the top directory of this project and type:

cargo build --release

To build the parachain version, execute the following command:

cargo build --features parachain --release

Optimized binaries (--release) are usually used for production (faster and smaller), but this behavior is optional and up to you.

Our current beta test network Battery Station runs as a parachain. To connect your Zeitgeist parachain node, follow the tutorial at our documentation site.

Alternatively you can run a non-parachain node, which is usually only necessary for testing purposes, by executing the following command:

cargo run --release --bin zeitgeist -- <node-options-and-flags>

A common value for <node-options-and-flags> is --dev --tmp, which runs a local temporary development node.

Using Docker

We publish the latest standalone and parachain version to the Docker Hub, from where it can be pulled and ran locally to connect to the network with relatively low effort and high compatibility. In order to fetch the latest docker image, ensure you have Docker installed locally, then type (or paste) the following commands in your terminal.

For parachain Zeitgeist node:

docker pull zeitgeistpm/zeitgeist-node-parachain

For standalone, non-parachain Zeitgeist node:

docker pull zeitgeistpm/zeitgeist-node

Our current beta test network Battery Station runs as a parachain. To connect your Zeitgeist parachain node, follow the tutorial at our documentation site.

Alternatively you can run a non-parachain node, which is usually only necessary for testing purposes, by executing the following command:

docker run zeitgeistpm/zeitgeist-node -- <node-options-and-flags>