Skip to content

oceanprotocol/pdr-backend

pdr-backend

Run bots (agents)

(If you're a predictoor or trader, you can safely ignore the rest of this README.)

Settings: PPSS

A "ppss" yaml file, like ppss.yaml, holds parameters for all bots and simulation flows.

  • We follow the idiom "pp" = problem setup (what to solve), "ss" = solution strategy (how to solve).
  • PRIVATE_KEY is an exception; it's set as an envvar.

When you run a bot from the CLI, you specify your PPSS YAML file.

pdr has basic stdout logging, but supports customisations. To customise logging, copy and edit the existing logging.yaml:

cp logging.yaml my_logging.yaml

CLI

(First, install pdr-backend first.)

To see CLI options, in console:

pdr

This will output something like:

Usage: pdr sim|predictoor|trader|..

Main tools:
  pdr sim YAML_FILE
  pdr predictoor YAML_FILE NETWORK
  pdr trader APPROACH YAML_FILE NETWORK
...

Atomic READMEs

Flows for core team

Repo structure

This repo implements all bots in Predictoor ecosystem. Here are each of the sub-directories in the repo.

Main bots & user tools:

  • predictoor - submit individual predictions
  • trader - buy aggregated predictions, then trade
  • sim - experiments / simulation flow
  • payout - OCEAN & ROSE payout

OPF-run bots & higher-level tools:

  • trueval - report true values to contract
  • dfbuyer - buy feeds on behalf of Predictoor DF
  • publisher - publish pdr data feeds
  • analytics - analytics tools
  • deployer - deployer tool
  • accuracy - calculates % correct, for display in predictoor.ai webapp

Mid-level building blocks:

  • cli - implementation of CLI
  • ppss - implements settings
  • lake - data lake and data pipeline
  • subgraph - blockchain queries, complements lake
  • aimodel - AI/ML modeling engine
  • accuracy - to report % correct in webapp
  • pred_submitter - for predictoor bots to submit >>1 predictions in 1 tx

Lower-level utilities:

  • contract - classes to wrap blockchain contracts; some simple data structures
  • util - function-based tools