the lastest version of the flagship simulation Demo 7-4 is here; see FROZEN.md
for the full table of frozen releases
This is the Binder repo for the Carbon simulator. The permament github URL for this repo is bancorprotocol/carbon-simulator-binder. Please refer to the simulator repo at bancorprotocol/carbon-simulator and the Carbon project website carbondefi.xyz for more information. On the site you will find in particular the litepaper, whitepaper and the patent application.
This repo contains a collection of Jupyter notebooks related to the Carbon Simulator. Whilst most notebooks should be working, there may be two issues aring: firstly, some notebooks may be very old and may not have been updated to use the latest version of Carbon and there are breaking changes. Secondly, the notebook may be too new and rely on Carbon code that is currently in the beta branch, and when run on Binder it is only possibly to run the code that is currently in the main branch.
The notebooks are arranged according to the following categories
CarbonExamples
: the example workbooks from the root directory of the Carbon repoCarbonDemo
: the demo workbooks fromresources/demo
of the Carbon repoCarbonNBTest
: the test workbooks fromresources/nbtest
of the Carbon repoExamples
: other examples not present in the Carbon repoFrozen
: the notebooks in the dated folders will usually not be updated; in conjunction with a frozen branch this avoids having to rebuild the binder too often, in particular just ahead of an event
Either use the button above to launch the generic repo and navigate to the workbook you want from within the user environment,
or go to the file directly using the url
https://mybinder.org/v2/gh/bancorprotocol/carbon-simulator-binder/main?labpath=PATH/BOOK.ipynb
where you should replace PATH
and BOOK
in
...?labpath=PATH/BOOK.ipynb
with the desired path and notebook name.
A couple of example URLs you can follow are below:
- ...?labpath=CarbonSim-LitepaperExamples.ipynb
- ...?labpath=Examples/202301_ExpandingRanges.ipynb
- ...?labpath=CarbonDemo/CarbonSim-Demo-1-1.ipynb
This repo is mostly designed to be used with Binder, a web-based service for hosting Jupyter notebooks and labs. If you want to run the simulator locally, we recommend cloning the main repo instead, and following the installation instructions there. This gives you access to not only the stable main
branch of the simulator that is available in PyPi, but also to the full source code and the beta
branch that contains the latest code.
To launch this repo on binder, you can use the badge above to launch the lab. You can also
- go to the lab environment here, or
- to the litepaper example sheet here.
Note that the launch process can be slow at times: if the repo has been recently changed and you are the first one use it then the docker images may have to be built. Even if the docker images are available, it may take a moment to transfer the required images to the federation server
If you nevertheless want to run this repo locally, you can do so by running
$ pip install -r requirements.txt
which in particular will install the carbon simulator from PyPi
$ pip install carbon-simulator
We recommend using a virtual environment to ensure that there are no conflicts with other local installations.