1Hive / apiary

Aragon DAO explorer
https://apiary.1hive.org
GNU General Public License v3.0
25 stars 16 forks source link

Add app score calculation CLI script #168

Closed onbjerg closed 4 years ago

onbjerg commented 4 years ago

Adds a script that we can use to play around with weights and quadratic scoring.

Setup

cd scripts
npm i

Usage

Usage: ./calcscore <activity weight> <aum weight> <ant weight> [flags]

Flags:
--quad, --quadratic
    Use quadratic scoring
--apps
    Path to a file of app IDs eligible for payouts
--blacklist, --blacklisted-orgs
    Path to a file of organisation addresses that are blacklisted
--pot
    The size of the payout pot. Defaults to 100k.

App ID file
===
The file used for `--apps` should be a newline delimited file of app IDs

Organisation blacklist file
===
The file used for `--blacklist` should be a newline delimited file of checksummed organisation addresses

File comments
===
Comments can be added to any file passed to this CLI. Comments start with `//` and anything after it will be ignored

Where each weight is a value from 0-1. The results are saved to two files on disk in CSV format: app_scores.csv and organisation_scores.csv.