dojo.environments package

Environments package contains environment classes and logic.

class dojo.environments.AAVEv3Env(chain: Chain, agents: list[BaseAgent], date_range: tuple[datetime, datetime], backend_type: Literal['forked', 'local', 'live'] = 'forked', port: int | None = None, token_data: dict[str, dict[datetime, Decimal]] | None = None, market_impact: Literal['default'] = 'default')

Bases: BaseEnvironment[BaseAaveAction, AAVEv3Observation]

The AAVEv3Env environment models the AAVEv3Env system dynamics.

It is responsible for updating both the protocol and agent states through time.

class dojo.environments.GmxV2Env(chain: Chain, agents: list[BaseAgent], date_range: tuple[datetime, datetime], market_venues: list[MarketVenue], market_impact: Literal['replay', 'no_market'] = 'no_market', backend_type: Literal['forked', 'local', 'live'] = 'forked', port: int | None = None, token_data: dict[str, dict[datetime, Decimal]] | None = None, execution_delay: int = 10)

Bases: BaseEnvironment[BaseGmxAction, GmxV2Observation]

The GmxV2Env models the gmx v2 system dynamics.

class dojo.environments.UniswapV3Env(chain: Chain, agents: list[BaseAgent], date_range: tuple[datetime, datetime], pools: list[str], market_impact: Literal['replay', 'no_market', 'replay_trades_only'] = 'replay', backend_type: Literal['forked', 'local', 'live'] = 'forked', dataloader: BaseLoader | Literal['auto'] | None = 'auto', port: int | None = None, token_data: dict[str, dict[datetime, Decimal]] | None = None)

Bases: BaseEnvironment[UniswapV3Action, UniswapV3Observation]

The UniswapV3Env environment models the UniswapV3 system dynamics.

It is responsible for updating both the protocol and agent states through time.

Submodules

Base Environments defines the template for all environments.

Uniswap V3 environment.

class dojo.environments.uniswapV3.UniswapV3Env(chain: Chain, agents: list[BaseAgent], date_range: tuple[datetime, datetime], pools: list[str], market_impact: Literal['replay', 'no_market', 'replay_trades_only'] = 'replay', backend_type: Literal['forked', 'local', 'live'] = 'forked', dataloader: BaseLoader | Literal['auto'] | None = 'auto', port: int | None = None, token_data: dict[str, dict[datetime, Decimal]] | None = None)

Bases: BaseEnvironment[UniswapV3Action, UniswapV3Observation]

The UniswapV3Env environment models the UniswapV3 system dynamics.

It is responsible for updating both the protocol and agent states through time.

class dojo.environments.uniswapV3.UniswapV3MarketModelType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

This enum defines the types of market impact models available.

Attr NO_MARKET:

The no market impact model does nothing. :attr REPLAY: The replay

market impact model replays history.

NO_MARKET = 'no_market'
REPLAY = 'replay'
REPLAY_TRADES_ONLY = 'replay_trades_only'