Skip to main content
Version: 2.0.1

Dependencies

The simulator has a dependency system which allows you to specify dependencies for certain classes in the simulation system.

When talking about 'classes' we currently have 5 options:

  • Agents
  • Environments
  • Strategies
  • Metrics
  • Protocols

Each of these classes is separately a code structure that implements the respective interfaces that are made available from the Simulation SDK. And also includes a almanak-library.yaml file which defines some variables that are used by the simulator to run these code files.

A typical folder structure looks like this

.
├── agent
│ ├── defi
│ │ ├── almanak-library.yaml
│ │ └── main.py
│ ├── liquidator
│ │ ├── almanak-library.yaml
│ │ └── main.py
│ └── simple_borrow_agent
│ ├── almanak-library.yaml
│ └── main.py
└── configuration.yaml

This example shows how 3 different agents are implemented but this will work similarly for the other classes.

Subdependencies

Most classes support subdependencies which can be configured in the almanak-library.yaml file. Depending on which class it can support different dependencies (different versions for example) depending on certain conditions; which chain is it running on in particular.