Welcome to influence.vote’s documentation!

Influence is designed for token weighted decentralised content curation and rough consensus formation around anything from tuning monetary policy parameters to meme markets. This is where DAO members deliberate and decide.

docs-influence missing

Setting up

Frontend

Repository link: Influence

  1. In the influence terminal:

    git checkout develop
    
  2. In the main influence folder create .env.local file and put in there settings copied from .env.example. If you’d like to use local backend, remember to comment this line from env.local: REACT_APP_API_URL='https://test.influencebackend.xyz'

  3. Install dependencies:

    npm install
    
  4. Run application:

    npm start
    

Backend

Repository link: Influence hub

  1. In the influence-hub terminal:

    git checkout develop
    
  2. Install dependencies:

    npm install
    
  3. In the main influence-hub folder create .env.local file and put in there settings copied from .env.

  4. Add your wallet address into admin_init file under migration folder. Make sure export line is uncommented.

  5. Run application:

    docker-compose up --build
    
  6. If after the building there are no documents in database under strategies collection, make sure strategies_init file under migration folder has uncommented export line.

Minting Identity

Minting an identity is an anti-sybil protection.

Learn more about minting here.

How does it work?

In purpose of voting, first thing to do is to mint an identity in cost of burning some $FVT to gain voting power.
And that is what it can be seen from user interface. But what is going on under the hood?
_images/MerkleIdentity.jpg

This scheme depicts mechanism standing behind minting an Identity within I Influence.vote.


Our starting point is GatedMerkleIdentity contract, which remembers all Merkle trees root hashes and verifies whether Merkle proof delivered by user is in any of the Merkle trees. More on Merkle tree here.
Adding tree hashes to GatedMerkleIdentity requires passing NFT address and gate address, both of which could be get via contracts.

GatedMerkleIdentity connects to the contract of token, which is desired by user to get.
In Influence.vote the only available token’s contract right now is VotingIdentity2, which creates an Identity and sets NFT addresses for them, also it transfers NFT from one user to another and shows minter’s NFT balance. More on Identities here.

Price of minting an Identity is dynamic and determined by amount of Indentities already bought. That’s why there are two price contracts. FixedPriceGate always returns basic price, while LinearPriceGate returns price increasing in time.

Incinerator takes a token address and some ether. It uses the ether to purchase the token and burn them (remove them from supply permanently).

The last two contracts indicated in the schema are used for trading from a smart contract.
UniswapRouter and SushiswapRouter are contracts that works nearly the same and are used to safely swap tokens to and from different assets.

How To Vote

  1. Connect your wallet.

  2. Enter proposal and read its description.

  3. If needed, make sure you’re on proper chain.

  4. Allocate your votes (quadratic strategies) or choose an option (binary strategies).

  5. Hit Vote button.

  6. Justify your vote (optional).

  7. Hit Submit vote button.

  8. Confirm voting in MetaMask.

  9. Voila!

If you’re still confused, checkout a quick walkthrough video down below and Voting Explained chapter

Voting notes

To submit a vote you need to click into vote field votefield and type in a value or simply use arrows shown when you hover over a field. Voting system is based on quadratic voting system, so every value typed in is squared. This mechanism allows to vote more than once(allocate more than 1 vote) on a particular choice, but the stronger(more valuable) your votes get, the more it costs you. You can spend all of your vote power over one choice or split it over all available choices - it is up to you (but you have to distribute votes the way its total value doesn’t exceed your vote power).

For some proposals (depends on strategy used), there is a possibility of negative voting. If you definitely don’t want particular choice to win you can try to weaken its position. Typed in value is still squaring and counted out of your vote power.

_images/6_negative_vote.jpg

Proposal view

Main view of proposal contains a title and a description with all the information about ballot and ballot’s choices. Details contain proposal hash (IPFS field), voting strategy, start and end voting date, block height (Snapshot field), countdown timer and voting result data in JSON and CSV.
Below that, there are four tabs:
  • My vote

  • Vote Results

  • Opinions

  • Votes list (and submitted votes counter)

Tabs

My Vote

My Vote tab contains identity picker (only in multi identity strategies proposals), account available votes, distribution of votes (allocation field) and vote form.

_images/1_proposal_view.png
_images/1_proposal_view.jpg

Vote Results

This tab shows current or final results of the ballot.
If a winnerbox were switched ‘on’ during proposal creating, it will be shown here as well.
_images/2_votes_tab.jpg

Opinions

In the opinions tab you can see justifications for votes submitted by other users. Filtering by chocies names is a simple way to filter out only interesting you choices.
Sorting options works either for all opinions or filtered out choices. You can sort by oldest or newest opinions and by $I Power.
_images/2_opinions_tab..jpg

Votes list

Votes list tab informs how much voting power were spend by each token ID/wallet address (depending on strategy)
_images/5_votes_list.jpg

How to add submission

Tasks are special proposals type, where users know only a question and their job is to propose an answer.
Depend on task configuration, user may be able to add more than one submission per ID (token or NFT).
Task types:
  1. text - you can add only text submissions

  2. media - you can add only video, twitter or image submissions

  3. mixed - you can add only text, only media or text and media at the same time

Steps:
  1. Connect your wallet.

  2. Enter task and read its description.

  3. Hit Create a submission button.

  4. Choose ID you want to send your proposal with.

  5. Click Next.

  6. Add Title and content (depend on task type).

  7. Hit Submit vote button.

  8. Confirm in MetaMask.

  9. Voila!

Text submissions

Title and description are mandatory.
Description length depends on task configuration.

Media submissions

Influence supports YouTube, Vimeo, TikTok, Twitter urls and sending images (acceptable formats: .jpeg, .jpg, .webp, .png, .gif)
On submission creation, choose which media you would like to add and paste a media url or send an image.

Mixed submissions

This type leaves the most freedom. You can either add media or text, or both at the same time if you want.
The only limitation is that you have to add at least something. And a title.

Create new realm

Adding new realms is reserved for admins only.
To add a new realm choose add realm tile on the main influence site (if you don’t see one, you don’t have admin privileges).
Add new realm form basic elements:
  1. Name field

  2. Networks picker

  3. Strategies picker

  4. Members field

  5. Logo height field

  6. Logo width field

  7. Realm logo uploader

  8. Realm header uploader

All parameters set during creating a new realm are editable after the realm is created.
  • You have to choose at least one network and one strategy to create a realm.

  • Members field must be sent as a JSON array (at least one element):

    ["address1","address2","address3"]
    
  • Recommended logo height and width is 150px. Graphics size shouldn’t be higher than 1 MB. Accteptable graphic formats: .jpg, .jpeg, .png, .webp, .svg, .gif

  • There are additional fields, that are added to the form on chains adding. Those are [network name] contract address fields that you can leave empty.

Only the basic form elements, listed above, are mandatory to create a new realm

Creating Proposal

Entering New Proposal Mode

  1. On the main page choose interesting you realm.

  2. Hit New Proposal button above the proposals list (only moderators can add new proposal).

entering new proposal creating form

Steps to Creating Proposal

A quick reminder on how to properly set up a proposal.
If you are not familiar with any (or some) of the points, we encourage you to read more in the further parts of this article.
  1. Hit New Proposal button.

  2. Fill in title (“Question” field) and description (“What is your question?”). You can use Markdown basic syntax to format your description (read more).

  3. Set start and end dates.

  4. Choose strategy.

  5. Choose proposal’s tag.

  6. Optional: Decide on proposal’s options (or leave them as are):

    1. Which chains should be allowed

    2. Turn on winnerbox

    3. Restrict viewing results

    4. Decide who is eligible to vote (whitelist) or/and who is ineligible (blacklist)

  7. Fill in voting options (choices). You can choose to fill in choices descriptions as well.

  8. When everything is filled out we recommend to check everything because once published there is no editing possibility. You can decide to publish proposal in draft mode.

  9. After making sure everything is correct you can finally hit Publish button. If all required fields are filled in properly, loading screen and signature request from MetaMask will appear.

  10. All done! Proposal has been made and you’ve been sent to the main page. Created proposal should appear on the top of the proposals list.

  11. If you’ve created proposal in a draft node, decide on publishing it or deleting.

Proposal elements

When you first create a proposal You’ll see this form:

A

_images/creating_proposal_1_proposal_main.png
_images/creating_proposal_1_proposal.jpg

Proposal content

Proposal content consists of the title (“Question”) and the description (“What is your proposal?”). You can use Markdown basic syntax to format your description (read more).
Below the question field there is a field reserved for a description of what your question concerns, try to clarify what you want to ask. You can also describe each choice you’ll put to the vote so everyone knows what it is about.
If you will need more space for the text area, use the expand handle.

B

_images/creating_proposal_1_proposal_hover.jpg
_images/creating_proposal_1_proposal_unhover.jpg

Note

Remember to use less than 40 000 characters in your proposal description

Proposal voting choices

Filling in at least 2 choices is mandatory. They should relate to the proposal description.
To add more choices hit Add choice button, to remove choice use X mark next to the choice you want to remove.
Adding a choice description is optional. Descriptions are accessible through the voting component. Choices that have one are clickable and highlighting (check out the video for reference).

Proposal details

In the ‘Action’ field (Proposal’s details) you decide when proposal starts and ends, on what kind of strategy it will run and what will be the proposal’s tag. Below the graphic, you’ll find a more specific description of each parameter.

B

_images/creating_proposal_1_proposal_details.png
_images/creating_proposal_1_proposal_unhover.jpg
Mandatory proposal’s elements are:
  • start and end dates (dates of voting start and end mustn’t be the same)

    • startdate time

  • strategy - strategies are mechanics for proposals that determine the voting power of users and how they are allowed to cast their votes. Each strategy has different voting power calculations and relies on different sources (tokens, cryptocurrencies, NFTs). Each realm has a predefined set of strategies allowed to use in the proposals.

  • tag - the proposal tag consists of up to 4 characters. Tags make it easier to find proposals in the list as well as categorize and organize them.

    • You can choose from existing tags within dropdown menu or create your own by hitting “Add new sign”. Choosing to add your own sign, a new window will pop up with name field and color picker.

    • sign signpicker

  • snapshot - it’s the height of the block in the blockchain that was used to check account balance.

There are also a few additional setting options that could be used to control who can see and/or vote in the proposal and whether the proposal’s winning option should be especially exposed after the end:
  • acceptable chains - as influence is a multichain platform, those checkboxes allow user to decide which chains should or shouldn’t be considered within the proposal. Some of the strategies sums up user balance within all chains, so those checkboxes help control it.

  • winnerbox - it’s a field that appears at the proposal’s end and contains the name of the choice (or choices) that has won.

_images/winnerbox.jpg
_images/3_way_tie.jpg
  • viewing restriction - it’s an option that restricts the preview of voting results for those who didn’t meet the prerequisites (having a specific token or NFT in the wallet, determined by the strategy)

  • voting restrictions are handled per chain (for example one address/token ID could be restricted only on mainnet but not on other chains). You can either type ID number/wallet address directly into the field or paste CSV formatted array:

    • whitelist - a list of IDs numbers or wallet addresses (depending on strategy) that are eligible to cast a vote:

    • blacklist - a list of IDs numbers or wallet addresses (depending on strategy) that are ineligible to cast a vote:

Draft mode

Before you publish your proposal you may want to share it with someone so they double check it. But since the proposal cannot be changed or deleted after publishing, you can publish a draft of it first.
All you have to do to achieve that mode is to simply leave the draft switch ‘On’ during proposal creating:
_images/draft.jpg
You may now share the draft with someone and be sure that no one will be able to vote while the proposal is in draft mode.

Once you’ll decide that everything is correct, you can publish it (square with arrow icon) or if there were some mistakes, you can delete it (bin icon):
_images/draft_icons.jpg
If you don’t want to publish a proposal in a draft mode, remember to turn the draft switch ‘Off’ during proposal creation:
_images/draft_off.jpg

Strategies

Influence supports various contracts, token standards and chains. Implemented different calculating methods called strategies help to handle such diversity and cover most user needs.

Strategies used in the app are built out of params. Those 6 of them (listed in the next section) create 6 basic strategies:

Strategy

Base

Voting

Power Calculating

Token weighted quadratic voting

token-based

quadratic

not-aggregated

Token weighted binary voting

token-based

binary

not-aggregated

Quadratic voting

nft-based

quadratic

not-aggregated

Binary voting

nft-based

binary

not-aggregated

Aggregated quadratic voting

nft-based

quadratic

aggregated

Aggregated binary voting

nft-based

binary

aggregated

Any other strategies are custom and require a separate approach to meet even the highest user requirements.

Main params

  1. Base:

    • token-based

      takes user balance of ERC20 token and grants voting power based on that amount

    • nft-based

      grants voting power to those who own the expected NFT in their wallets

  2. Voting method:

    • binary

      allows voting with the whole voting power at once on only one choice

    • quadratic

      allows voting on multiple choices while keeping the rule of quadratic voting at the same time (if you’re not familiar with the idea, check it out >here<)

  3. Vote power calculating method:

    • aggregated

      it allows voting per wallet, meaning the user might vote only once, using concatenated assets at once

    • not-aggregated

      it allows voting per NFT ID, meaning each identity might vote differently

Create new task

_images/task_creation.jpg
Form fields:
  1. Title & description

  2. Start & end dates

  3. Ranking end date - more on ranking further on

  4. Max submissions length - how many symbols user may input into submission form

  5. Task type - text, media, mixed (more on task types <https://financevote.readthedocs.io/projects/influence/en/latest/content/submissions.html#text-submissions>`_)

  6. Tag - you can choose tag from the dropdown or create your own (more on tags in the proposals view details)

  7. ‘Open to’ box fields - decide how many submissions can be added (more on that further on)

Ranking

The ranking is a special task mode that starts right after the task end and lasts till the ranking end date set on task creation is reached.
From task start till the ranking end, users may vote on the submitted submissions to decide which are the best, but after the task end cannot add any new ones. So ranking mode is basically created to give chance to those submissions that were added near the task end, so they can gain some votes too.

Voting on submissions:

Submissions limits

On task creation you can decide how many submissions the user may add to the task and what kind of assets are allowed - NFT, Token or both.

You cannot decide which NFT or which Tokens are allowed, you only decide on asset type. The system takes all assets that are allowed within that realm.
For some realms, multiple strategies are implemented, and some of them may be using different NFTs.
Since tasks are insensitive to strategies, there is no way to whitelist or blacklist any specific NFTs contract addresses.

Markdown syntax

While creating a new proposal, you will have to add a description that will be easy to read.
It could be tricky, especially when you have to explain it adequately.
So instead of loading people with long boring descriptions, you can use markdown syntax that helps you emphasize what’s more important.
Check out markdowns supported by influence.vote down below.

Text formatting

  • italics text - use single asterix * around: *italics*

  • bold text - use double asterix ** around: **bold**

  • strikethrough - to get text strikethrough use double tylda ~~ around it: ~~strikethrough~~

  • verbatim code - use single backquote ` around it: `verbatim code`

Headings

To create a section or subsection within your description, you can use headings:
hint: the more hashes before the header, the smaller one.
  • # Header 1

  • ## Header 2

  • ### Header 3

  • #### Header 4

  • ##### Header 5

  • ###### Header 6

Images

Adding images into proposal is possible but limited. Markdown syntax allows to add graphics, but basics don’t support size control.
Remember, this function is not dynamic and graphics may not look the same on every device.

To add an image use ![Caption in case it didn't show](http://example.graphic.com/elephant.png). Remember to put an alternative description into square brackets and image address into regular ones.

Lists

To create a beautifully look list with sub-items you just need to use symbols (* , +, -) and indentations for each level.
  • use * for main level
    • use + for sub-items

    • and don’t forget

    • about indentations
      • sub-items of sub-items

      • are possible

      • just use - for them

      • …and of course a proper indentation

  • you can aways get back to the main level

Example:

* unordered list
   + sub-item 1
   + sub-item 2
       - sub-sub-item 1

Tables

To create a table you just need to use the following formatting. The first row content describes how column content will align, depending on using colons :

| Default | Left | Right | Center |
|---------|:-----|------:|:------:|
| 12      | 12   |    12 |   12   |
| 123     | 123  |   123 |  123   |
| 1       | 1    |     1 |   1    |

Line break

To make a line break, simply type ---
It will do this:

We may not have covered all the possibilities.
If you need anything else than listed above, try it yourself. A preview is always available underneath the proposal description during proposal creation, so if you see the desired output, you can use it, and it will work!

Indices and tables

Our products

Back to main page