This is a multi-agent simulator for token mechanisms in decentralized organizations. Use this to simulate your own token-based societies!
Built out of a project for scientifically evaluating an organizational incentive schemes, this simulation demonstrates the behaviour of a decentralized autonmous economy over time. The system is akin to those occuring in statistical mechanics and is modelled as a discrete-time Markov chain.
Read my paper on Decentralized Organizations as Multi-Agent Systems (Mar 2017)
Ahoj Ethereum developers!
Make sure you have Python 3. You can download the latest version here - https://www.python.org/
Install all dependencies either manually or by using
$ pip3 install -r requirements.txt
Clone this repository.
$ git clone https://github.com/ShrutiAppiah/Simulating-an-Economy-ABM
On Terminal or Command Prompt, cd into the main directory for this repository.
If you want to follow the workshop, see Token Engineering. If you want to skip ahead and run the code, go to Run/
In the token engineering design process, you will define your token economy as an optimization problem, mathematically model it, and then validate it using this multi-agent simulation.
A simple token economy aims to either maximize or minimize one parameter or function. The objective function is also known as the fitness function or utility function.
Define the goal of your token economy. Think long-term.
In this example, I want my token to incentivize human agents to contribute in projects. So, I could define my objective function as:
Maximize f(x) = Total number of human agents participating in a project in each iteration
In this example, the domain is a single organization/company with a fixed number of agents.
Domain: A single DAO with 10x10 participants
The agents of the system constitute of all the parties that can transact with one another.
In this example, the agents of this economy are members of the DAO.
Agents: Members of the DAO
The agents certainly have some properties associated with them. At this point, you may have uncovered some of them.
In this example, the agents have the following known properties -
Properties:
Altruistic
Fair
Truthful
Rational
The clock is defined as the smallest period in which the objective function/parameter changes. The period should be repeatable.
In this example, the period is the granular unit in which a full project cycle can be completed i.e. the project can be posted, agents can opt in to it, complete it, and get rewarded.
There are always some unknowns in any system. Although not measured or verified, we may have a rough idea of what these unknowns could be. These will be defined as assumptions.
In this example, we make the following assumptions -
Quality of all the projects completed are similar
Agents aren't able to evaluate difficulty of projects
All token transactions are tracked
Constraints bound the system. An optimally constrained system is easy to find solutions for.
System constraints
- Bounded rationality of agents
Technical constraints
- Scalability
- Gas price
Can be obtained from prior statistical studies
- User or design research
- Behavioural economics
- Surveys
In this example, one of the input parameters are the altruism coefficients.
In most cases, you may be able to define some of these in your starting mechanism -
- Incentives/tokens
- Token supply
- Is there a cap?
- Value -- Is the value pegged to fiat or a stablecoin?
- Mobility
- Tradability -- What can the token be exchanged for?
- Any identified equilibria
This example started with the mechanism of a simple Boltzmann Wealth Model.
Navigate into the cloned repo folder
$ cd Simulating-an-Economy-ABM
And run
$ python3 VisualizeEconomy.py
docker build -t simulating-an-economy-abm .
docker run -it -p 8521:8521 -v `pwd`:/usr/local/models simulating-an-economy-abm
The server should host it on http://127.0.0.1:8521/
🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁 🏁
Join TokenWork on Telegram
Read my paper on Decentralized Organizations as Multi-Agent Systems (Mar 2017)
Star this repo if you found this model useful. Reach out to me if you'd like to collaborate.
Copyright (c) 2017
Shruti Appiah