Package: bancor-simulator
Bancor SimulatorBancor Simulatoris an open-source python package developed by theBancor Research Team. It aims to assist the design, testing, and validation of Bancor v3 tokenomics.Seeofficial documentationfor complete details.Warning: The docs are a work in progress with potentially broken links, unfinished sections, and a non-exhuastive overview of commands and example usage. Moreover, the entirety of the codebase and documentation is subject to change without warning.IntroductionAll state transition functions and accompanying data structures described in the product specificationBIP15: Proposing Bancor 3are the core system level operations of this library.OrganizationThis is the project directory structure:bancor_analytics/            <------- Tableau Dashboard Project
bancor_emulator/             <------- Solidity Emulation Project
bancor_simulator/            <------- ** Spec & Simulation Project **
├── v3/                      <------- Current Version
│   └── simulation/          <------- Agent-based simulation module
│   │     └── agents.py      <------- Mesa Agent-based implementations of the Bancor protocol.
│   │     └── batch_run.py   <------- Script used to perform a parameter sweep.
│   │     └── model.py       <------- Main Bancor Simulation module interface.
│   │     └── random_walk.py <------- Generalized behavior for random walking
│   │     └── run.py         <------- Runs the simulation server with browser-based UI
│   │     └── server.py      <------- Configures the browser-based interface.
│   │     └── utils.py       <------- Misc utility functions
│   │ 
│   └── spec/                <------- State transition functions and data structures described in BIP15.
│         └── actions.py     <------- Deposit, trade, & withdrawal algorithm logic.
│         └── emulation.py   <------- Verifies solidity result parity.
│         └── network.py     <------- Main BancorNetwork application interface.
│         └── rewards.py     <------- Autocompounding and standard rewards logic.
│         └── state.py       <------- State variables, constants, data structures, and CRUD interfaces.
│         └── utils.py       <------- Misc utility functions
│ 
└── main.py                  <------- Application

** These docs apply.NotationCode snippets appearing inthis styleare to be interpreted as Python 3 code.Formatting & StyleCode is formatted according toPEP8, which is the official Python style guide. In order to overcome the burden on the developers to fix formatting, we useBlackwhich reports on format errors and automatically fixes them.Project setupIf you don't already have one, create a virtualenv
usingthese instructionsInstallBancor3 Simulationis available for Python 3.6+To install usingpypi, run this command:$ pip install bancor-simulatorDocumentationIn addition to the codebase, this repository holds the Jupyter Book source for Bancor v3 Simulation: A hands-on demo of
features described
inBIP15: Proposing Bancor 3.To make a change to the jupyter book and update:Get your copy of this repository:git clone https://github.com/bancorprotocol/simulator-v3Build and preview the jupyter-book text locallyTo build locally,pip install -r requirements.txtand thenjupyter-book build .Follow the build instructions on the Jupyter Book guide. The guide has information for how to use the Jupyter Book
CLI to build this book. You can find
theJupyter Book build instructions here.Build and preview the text locallyTo build locally, pip install -r requirements.txt and then jupyter-book build .Follow the build instructions on the Jupyter Book guide. The guide has information for how to use the Jupyter Book CLI to build this book. You can find the Jupyter Book build instructions here.