This tool provides a read-only calculator for a Quadratic vote implemented via tokenlog. It was conceived during the Commons Prize (whose tokenlog results can be found here) as a way to facilitate the merging of proposals "in-flight" during a quadratic voting race.
While not explicitly forbidden by any stated rules, this merging of proposals was not contemplated prior to the CommonsPrize vote. As such, this script has been posted to illustrate & advocate for the principle.
In short, a few climate-solution oriented submissions are electing to merge our submissions because we believe that the submissions are stronger together than separate and also because we believe the causes are worth continuing to race for.
While there are currently no stated rules around submission merges, a couple choices have been made proactively to maintain the integrity of the quadratic voting computation and maintain a level playing field.
- Quadratic voting causes each successive vote from a single voter to be exponentially more expensive in 'voting power'. To prevent gaming, this computation, the max votes from all merged solutions is selected. Votes cast by the same voter to other submissions within the merge are discarded.
- This script, which performs the computation, has been posted open source so that other submissions may also use it to verify our computations and also to evaluate the votes that their own submission might gain from a merger.
note: you need ruby installed to use this or use and online interpreter
not yet functional, requires tokenlog fix use get_votes.rb
to download the current votes cast in your election via the stats page. For example
https://tokenlog.xyz/commons-stack/commonsprize/stats
temporary fix is to visit the site manually,
- click
Show/Hide
ctrl-a
ctrl-c
ctrl-v
into a doc in your project'sdata
folder- remove non-json text above and below the pasted snippet
- save
Use json_to_csv.rb
. This makes it easy to load into a spreadsheet, if you'd like to explore the data in more detail
Open submissions.csv
to and take note of the numbers for which submissions you prefer to merge. Add those numbers to the submissions
array of main.rb
then run main.rb
.
Your results will then be posted to the folder data/outputs
some rspec tests have been written to constrain the format of the input (which may be subject to change) and the output. First run bundle install
to set up, then run rspec
to ensure the tests pass