Voting with staked DATA tokens

Voting with staked DATA tokens

Lately it’s been a bit quiet in terms of Streamr governance, as some improvements to the Snapshot setup were necessary to support voting with DATA tokens on various chains, as well as building tooling to help major node runners to vote. Now those improvements are done, and Streamr governance is ready to fire up again!

With more than 40M DATA staked across over 5,200 nodes, it’s important to cover how to vote with staked tokens, as that could well represent a large portion of the active Streamr community. I’ll start with a recap of voting information, then dive into recommendations for how to vote with staked tokens in practice. At the end, you’ll find a call for proposals and the timelines for the next governance round.

Recap of general voting information

  • DATA balances on Ethereum mainnet, Polygon, Gnosis Chain, and Binance Smart Chain grant voting power, as well as non-migrated XDATA balances on Ethereum mainnet.
  • You need to have the tokens in self-custody, in a normal wallet (not on a centralized exchange, DEX pool, etc.)
  • The voting power is calculated for each proposal whenever the proposal is posted on Snapshot. Different proposals may be posted at a slightly different time, so be sure to withdraw your tokens from exchanges well in advance if you intend to participate.

Since on Streamr, DATA tokens staked on nodes are just tokens in a normal address, they automatically get voting power. The most practical way to vote with your staked tokens depends on how many nodes you’re running, and therefore how many wallets your tokens are spread across. Let’s take a look at different scenarios next.

Voting with a small number of wallets (<10)

If you are holding your DATA tokens in just one wallet, or a handful, voting on Streamr governance proposals is probably easiest to do in the standard way: by using the Snapshot UI in the browser with MetaMask or other supported wallet software.

  • Use the “Import account” feature of MetaMask to import each one of your private keys.
  • For each of your imported accounts, cast your votes manually in the Snapshot UI.

This requires some clicking around in MetaMask and in the voting UI, but with a limited number of wallets it’s still manageable, and is probably easier than learning the programmatic approach described below. As a reminder, never enter your private key or seed phrase into any unfamiliar website or app.

Voting with a large number of wallets

If you are staking on the Streamr Network, you might be running multiple nodes and have your DATA tokens spread across a large number of addresses due to the current 10,000 DATA staking cap per node. Voting using the above manual approach would mean a lot of clickety-clicking, which becomes cumbersome beyond some point.

Worst of all, if you have this problem, it means you’re a power user,an important community member, and token holder, and it would be a shame to lose your votes just because it’s a bit cumbersome. Below, I’ll show a way to programmatically cast votes for all your addresses efficiently.

In the following, I’m making an assumption about the reader’s technical abilities: If you’re orchestrating tens or even hundreds of nodes, you probably know how to use command-line tools, write simple scripts, and organize your private keys. Here’s what you need to know:

Voting with the CLI tool

Support for governance voting has been added to the Streamr CLI tools starting from version 6.1.1. You’ll need to have node.js 16+ to install and run it. If you don’t have node.js, see nvm. Note that there’s no need to install and run the CLI tool on the server that hosts your broker node(s), you can just use your laptop or any other computer you’re comfortable accessing your private keys on.

To install the CLI tools:

npm install -g @streamr/cli-tools

This installs the streamr command globally. You can then cast votes with the tool like this:

streamr governance vote <proposalId> <choiceId> --private-key <key>

There’s a test proposal currently open, which you can use to test the tool. The below will vote for option 1 (Foo) on the test proposal (remember to replace <key> with your private key):

streamr governance vote 0xd78509ce359871e1140eed07e0328efe1bce689c22619facc3aa1980343ee0e7 1 --private-key <key>

By the way, the CLI tool can be used for a lot of Streamr things, like publishing and subscribing to streams. It’s like the Swiss army knife for Streamr. Here we’ll just focus on voting, but check out the docs.

Casting many votes with a script

The CLI tool casts a vote on a single proposal from a single wallet, so to vote using all your wallets you simply need to iterate through all your private keys and run the command for each of them.

While you can obviously write your own script for that in any language of your choosing, here’s an ultra-simple bash script that reads private keys (one per line) from a given text file and casts votes with each one using the CLI tool. The proposal id and choice are given as second and third arguments:

#!/bin/bash
filename=$1
proposal=$2
choice=$3
while read key; do 
    streamr governance vote $proposal $choice --private-key $key
done < $filename

Save the above snippet into a file called vote.sh and make it executable:

chmod u+x vote.sh

Then you can run it like so:

./vote.sh <keyfile> <proposal-id> <choice-id>

Assuming you create a temporary file called keys.txt containing your private keys, you can test the script by voting on the test proposal currently open:

./vote.sh keys.txt 0xd78509ce359871e1140eed07e0328efe1bce689c22619facc3aa1980343ee0e7 1

Security reminder: you might want to delete the temporary key file after voting to avoid storing unnecessary copies of your keys.

Call for proposals

While proposals can technically be added to the Streamr Snapshot at any time, it’s useful to coordinate the submission of proposals in order to focus the community’s attention and maximize voting activity. We therefore propose the following timelines and procedures:

  • It’s best practice to share a draft and request comments on the #governance channel in the project Discord well ahead of the submission date.
  • Please only post proposals of type “Single choice voting” (meaning voters choose exactly one option out of the ones presented).
  • On Wednesday Nov 23rd, please upload your proposals to Snapshot and make them open for voting immediately. Snapshot records token balances at the time the proposal is posted, so uploading all proposals on the same day achieves coherence in voting power across proposals.
  • Look at what proposals have already been posted and choose the next available SIP number (e.g. SIP-10) and add the code to the beginning of your proposal’s title.
  • Configure the voting on your proposal to end on Wednesday Nov 30th at 12:00 noon UTC.

See you in the Discord #governance channel!

Stay up to date

Get the latest Streamr news and articles delivered to your inbox