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.
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'
In the main influence-hub folder create .env.local file and put in there settings copied from .env.
Add your wallet address into admin_init file under migration folder. Make sure export line is uncommented.
Run application:
docker-composeup--build
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.
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?
This scheme depicts mechanism standing behind minting an Identity within 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.
Allocate your votes (quadratic strategies) or choose an option (binary strategies).
Hit Vote button.
Justify your vote (optional).
Hit Submit vote button.
Confirm voting in MetaMask.
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 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.
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.
My Vote tab contains identity picker (only in multi identity strategies proposals), account available votes, distribution of votes (allocation field) and vote form.
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.
To add a new realm choose addrealm tile on the main influence site (if you don’t see one, you don’t have admin privileges).
Add new realm form basic elements:
Name field
Networks picker
Strategies picker
Members field
Logo height field
Logo width field
Realm logo uploader
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 [networkname]contractaddress fields that you can leave empty.
Only the basic form elements, listed above, are mandatory to create a new realm
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.
Hit New Proposal button.
Fill in title (“Question” field) and description (“What is your question?”). You can use Markdown basic syntax to format your description (read more).
Set start and end dates.
Choose strategy.
Choose proposal’s tag.
Optional: Decide on proposal’s options (or leave them as are):
Which chains should be allowed
Turn on winnerbox
Restrict viewing results
Decide who is eligible to vote (whitelist) or/and who is ineligible (blacklist)
Fill in voting options (choices). You can choose to fill in choices descriptions as well.
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.
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.
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.
If you’ve created proposal in a draft node, decide on publishing it or deleting.
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.
Note
Remember to use less than 40 000 characters in your proposal description
Filling in at least 2 choices is mandatory. They should relate to the proposal description.
To add more choices hit Addchoice 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).
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.
Mandatory proposal’s elements are:
start and end dates (dates of voting start and end mustn’t be the same)
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.
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.
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:
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:
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):
If you don’t want to publish a proposal in a draft mode, remember to turn the draft switch ‘Off’ during proposal creation:
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.
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
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<)
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
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.
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.
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 . Remember to put an alternative description into square brackets and image address into regular ones.
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 :
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!