Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial version of SNS Tokenomics analyzer #48

Merged
merged 4 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sns_tokenomics_analyzer/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
33 changes: 33 additions & 0 deletions sns_tokenomics_analyzer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SNS Tokenomics Analyzer

## Purpose

- **What It Is**: A tool designed to simplify the setup and analysis of tokenomics for Service Nervous Systems (SNS) on the Internet Computer (IC).
- **Key Features**:
- Parses SNS launch parameters given by SNS init file.
- Offers simulation and visualization features
- **Who It's For**: This tool is primarily aimed at SNS project teams and community members who are reviewing NNS proposals for SNS launches.

## Disclaimer

This tool is an initial beta version of the SNS Tokenomics Analyzer. Feedback regarding potential limitations and bugs is highly appreciated.

## Version
Version 0.9.

## Installation

- Copy all files from this repo directory to a local directory, in particular
- `sns_tokenomics_analyzer.py`, which contains the code for the tool.
- `sns_init.yaml` which is an example input file.
- Python installation is required.
- Additional Python libraries are also required and are listed at the beginning of the `sns_tokenomics_analyzer.py` file. In order to install these you have the following options
- **Manual Installation**: Manually install the required Python libraries listed in the `sns_tokenomics_analyzer.py` file.
- **Nix Installation**: Alternatively, install Nix and run `nix develop` in the directory where you plan to execute the code.


## Running the Tool

1. Adjust or replace the input `sns_init.yaml` in current directory.
2. Execute `python ./sns_tokenomics_analyzer.py` in your terminal.
2. Open `http://127.0.0.1:8051/` in your local web browser to use the tool.
60 changes: 60 additions & 0 deletions sns_tokenomics_analyzer/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions sns_tokenomics_analyzer/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
description = "SNS Init Analyzer";

inputs = {
nixpkgs.url = "nixpkgs/release-23.05";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; };

pythonEnv = pkgs.python3.withPackages (ps: [
ps.pandas
ps.pyyaml
ps.dash
ps.setuptools
ps.plotly
ps.numpy
]);
in
{
devShells.default = pkgs.mkShell {
packages = [ pythonEnv ];
};
}
);
}
Loading
Loading