The Open League

This repository contains code for The Open League metrics calculation.

Architecture

The Open League consists of multiple leaderboards showcasing project rankings. These rankings are based on specific metrics and are calculated for a particular season, a set period of time with a defined list of projects and rules.

The primary objective of this repository is to establish a Domain Specific Language (DSL) for leaderboards, projects, and seasons. Using this DSL, all ranks can be calculated through backends. A backend is an implementation of metrics calculation based on a specific data source. Currently, the only supported backend is re:doubt DB, which is based on ton-indexer and Tonalytica.

Main entities:

  • Metric - used for the App Leaderboard, a simple way to describe on-chain mechanics for applications. Each metric must contains backend-specific implementation. (see an example)
  • Backend - metrics calculation backend per leaderboard.
  • ProjectStats - results of calculation, contains key-value dict with metrics values
  • Project - all information about particular project. For applications must contain all possible interactions and unique off-chain analytics tag.
  • SeasonConfig - season config: time period, list of projects, scoring formula, etc..
  • ScoreModel - final formula to get scores for each project based on metrics

Season

List of the seasons supported with the leaderboard links

Season Results Runner
S3.5 - test season (no actual competition), between S3 and S4. season3_5.py

Adding metrics for your project

To add new project one need to create a file in projects/{type}/{slug.py} folder, where type is apps or token and slug is project name.

To add more contracts please find your project file in projects folder and add metrics you need. The full list of supported metrics is here.