This cadCAD model and notebook series is a collaboration between Gitcoin and BlockScience. A brief table of contents follows to explain the file structure of the various documents produced in this collaboration.
- Install all requirements:
pip install -r requirements.txt
- Change the parameters on
env_config.py
so that it fits your use case. - Run the simulation through
python run_simulation.py
so that we generate themodel/data/simulation_result.pkl.gz
pickled file.- Alternatively, you can just unzip the
model/data/simulation_result.tar.xz
file.
- Alternatively, you can just unzip the
- Perform any analytics on the generated data or use one of the available notebooks.
Additionally, there are several options on the run_simulation.py
script
that encapsulates the features on env_config.py
without needing to modify it.
-
Notebook: dynamic_network.ipynb
This notebook showcases the cadCAD networked model using raw CSV data -
Notebook: graph_communities.ipynb
This notebook contains visualizations of communites on Gitcoin
Python functions for the optimality gap research on Gitcoin grants. More info can be found on this hackmd.
cadCAD configuration scripts for the model and the data to be used on the analysis.
Quadratic Voting captured the hearts of the web3 space after being re-introduced by the Radical xChange movement. Gitcoin builds on the same principle by leveraging a powerful algorithmic policy called Quadratic Funding (QF) to allocate sponsor funds via matching community donations to grants submitted through the Gitcoin Grants program. The purpose of this form of grant matching is to allocate sponsor funding via a community preference signal by capturing not just the depth of donations ($ amount donated), but also the breadth of the donation base (# people who donated). The outcome is that grants that are supported by many people with small donations would receive relatively larger matching than grants supported by few donations of larger amounts. In effect, Quadratic Funding aims to boost the influence of people over plutocracy.
In cyber-physical systems like international power grids, global flight networks, or socioeconomic community ecosystems, engineers model simulated replicas of their system, called digital twins. These models help to manage the complexity of systems that have trillions of data points and are constantly in flux. These simulations channel the information into pathways that allow humans to understand what is going on in their ecosystem at a high level, so they can intervene where and as appropriate. (Like hitting a breaker switch when a fault is cleared in a power system).
Digital twins can be considered like a flight simulator, which can be used to run your system through a billion different "tests", varying one parameter at a time, to see what effects may throw your system out of balance. As engineers with public safety in mind, we must understand the tipping points of our systems, and ensure mechanisms are in place to push the system back towards balance if and when they enter their boundary conditions of safety.
cadCAD (complex adaptive dynamics Computer-Aided Design) is a python based modeling framework for research, validation, and Computer Aided Design of complex systems. Given a model of a complex system, cadCAD can simulate the impact that a set of actions might have on it. This helps users make informed, rigorously tested decisions on how best to modify or interact with the system in order to achieve their goals. cadCAD supports different system modeling approaches and can be easily integrated with common empirical data science workflows. Monte Carlo methods, A/B testing and parameter sweeping features are natively supported and optimized for.
cadCAD links:
In order to reproduce this code, we recommend the researcher to use this link to download Python 3.7. To install the specific version of cadCAD this repository was built with, run the following code:
pip install -r requirements.txt
or
conda install --file requirements.txt
Check out the cadCAD forum for more information about installing and using cadCAD.