Welcome to markets.vote’s documentation!

markets.vote is a prediction market and collective intelligence tool, which uses quadratic voting and a decentralised identity system to curate emerging markets and reach consensus on the perceived future value of assets. It allows users to break through the noise of permissionless systems and concentrate on the assets most worthy of their attention.

docs-markets missing

Before setting up

Clone following repositories and put them both in one main folder:

Contracts

Trollbox

Setting up

Table of Contents

Locally

Prerequisites:

  • Created an account on GitLab via invite

  • Ganache-cli installed

  • Truffle suite installed

  • Code editor installed

  1. In the contracts terminal:

    truffle compile
    truffle deploy
    
  2. Run

    ganache-cli -d -i 333 --chainId  333

  3. In the trollbox terminal:

    git checkout develop
    git pull
    yarn install
    ./scripts/import-contracts.sh
    
  4. In the main trollbox folder create a file .env.local and put in there:

    SKIP_PREFLIGHT_CHECK=true
    ESLINT_NO_DEV_ERRORS=true
    REACT_APP_LOCAL_PROVIDER_URL='ws://207.154.210.94:8545'
    
  5. Run application:

    yarn start
    

On Remote Server

Prerequisites:

  • Created an account on GitLab via invite

  • Code editor installed

  • On MacOS: wget install

Testing server address: 207.154.210.94:8545

  1. In the trollbox terminal:

    git checkout develop
    git pull
    yarn install
    
  2. Update contracts, see here.

  3. In the main trollbox folder create a file .env.local and put in there:

    REACT_APP_LOCAL_PROVIDER_URL='http://207.154.210.94:8545’
    
  4. Run application:

    yarn start
    

Update Cotracts

whenever deploy is being made on the testing server side, contracts must be updated:

  1. Remove all contracts from trollbox/src/truffle/build/contracts

  2. If there is no download.txt file, create one and put in there:

    207.154.210.94:8000/download/AggregatorInterface.json
    207.154.210.94:8000/download/AggregatorProxy.json
    207.154.210.94:8000/download/AggregatorV2V3Interface.json
    207.154.210.94:8000/download/AggregatorV3Interface.json
    207.154.210.94:8000/download/ChainLinkOracle.json
    207.154.210.94:8000/download/ChainLinkOracle2.json
    207.154.210.94:8000/download/Identity.json
    207.154.210.94:8000/download/ReferralProgram.json
    207.154.210.94:8000/download/Token.json
    207.154.210.94:8000/download/Trollbox.json
    207.154.210.94:8000/download/TrollboxProxy.json
    
  3. run a terminal in ../contracts folder and run:

    wget -i download.txt
    

It will download and copy all contracts from test server into that folder.

*For manual import do that for every contract:

wget 207.154.210.94:8000/download/Contracts_Name.json

Connect Wallet

Prerequisites:

  • using one of the following browsers:
    • Chrome

    • Firefox

    • Brave

    • Edge

In purpose of using an application you need to connect a wallet to the site. In the browser install an extension called MetaMask and create a new account. From the menu bar choose import and paste there one of the Private Keys:

0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d

0x6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1
For local use:

Set network to localhost

For remote server use:

Set network to Own RPC:

URL RPC: http://207.154.210.94:8545/
Chain ID: 333

Round Resolving

Challenge period

As you know markets.vote comprises two time bounded windows, a vote window and a market window, that usually lasts from Monday to Sunday (each).
But there’s a period of time after the winner is proposed but before it is confirmed called challenge period. It is a gap between market window closure at Sunday midnight UTC and winner reveal by snapshot taken. The challenge period lasts 1 day.

If you’re sure that true winner is not the one proposed, you can challenge by depositing 50k FVT.
Simply click the challenge button on the ballot and say which you think is the real winner.
If you’re right administrator will accept your challenge and your deposit will be returned.

When the challenge period passes and you want the round resolved earlier then you can call confirmWinnerUnchallenged and that doesn’t require a deposit.
See instructions below for that.

Instructions

Anyone can call the functions on the contract proposeWinner and confirmWinnerUnchallenged:
  1. Go to the etherscan link for the Markets contract: Etherscan

  2. Go to the contract tab.

  3. Click on the Write Contract sub-tab.

  4. Connect to Web3 -> this should bring up your metamask or other browser wallet.

  5. Click proposeWinner and write and confirm transaction on your wallet soon after midnight UTC Sunday-Monday.

  6. If it is after midnight UTC Monday-Tuesday, then you can click confirmWinnerUnchallenged then write then confirm in your wallet.

Indices and tables

Our products

Back to main page