This project is a Streamlit-based web application that calculates and visualizes matching results for Quadratic Funding (QF) rounds. It compares standard Quadratic Funding with Connection-Oriented Cluster Matching (COCM) to provide insights into fund distribution.
- Load and process round data from various blockchain networks
- Apply Sybil defense mechanisms using Passport scores
- Calculate and compare matching results using QF and COCM algorithms
- Visualize crowdfunding statistics and donation distributions
- Generate downloadable matching distributions and round summaries
- Filter out specific wallets or projects from calculations
-
Clone the repository:
git clone [repository-url] cd [repository-name]
-
Install the required packages:
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run Home.py
-
Access the app through your web browser, typically at
http://localhost:8501
-
Provide the
round_id
andchain_id
as URL parameters:http://localhost:8501/?round_id=[ROUND_ID]&chain_id=[CHAIN_ID]
- The app uses environment variables for database connections and API keys. Ensure these are set up in a
secrets.toml
file or your environment.
Home.py
: Main Streamlit application filefundingutils.py
: Contains functions for QF calculationsutils.py
: Utility functions for data loading and processingrequirements.txt
: List of Python package dependenciesqueries/
: SQL query files for data retrieval
- streamlit
- pandas
- numpy
- plotly
- psycopg2-binary
This project is configured for deployment on Fly.io. Here are the steps to deploy:
-
Install the Fly CLI: Follow the instructions at https://fly.io/docs/hands-on/install-flyctl/
-
Login to Fly:
fly auth login
-
Navigate to your project directory and initialize the Fly app:
fly launch
-
Deploy the app:
fly deploy
-
Once deployed, you can access your app at
https://qf-calculator.fly.dev
Remember to set up your environment variables and secrets in the Fly.io dashboard or using the Fly CLI before deployment.
For more detailed information on deploying Streamlit apps on Fly.io, refer to their documentation: https://fly.io/docs/app-guides/streamlit/