Skip to content

a3mc/Casper-Metrics-Front

Repository files navigation

Casper Metrics API

Initial approach of this work is to calculate CSPR circulating supply. Although some parts of the supply are distributed on protocol level, there is a significant amount of transactions which are processed manually. We've decided to bring such transactions flow to atomic level of transparency, as we believe this is an important component for the blockchain where decentralization and transparency are playing fundamental role in the architecture. Manual funds distribution make calculation process very difficult, as transactions are passing between many inputs; these inputs are unknown and distribution flow can be very confusing for an outside observer. We made a lot of research on this subject and came up with the provided solution.

This engine was built specifically for circulating supply calculation, however not limited and can become a foundation of new tools, for example, collecting and plotting employees salaries, donations and all sort of transactions flows for unlimited needs. The crawler builds a dependency tree connecting HEX addresses with accounts hashes. Users will be able to see connections between different inputs and represent this in a form of diagrams. Crawler is able to collect data very fast and provides user with a populated database for the future network analysis.

Platform developed under MIT license and contains 3 core modules split between 3 repositories:
  1. Casper-Metrics

    • high performance asynchronous crawler - we want data crawling process to be as fast as possible
    • API - provides a wide range of metrics with an ability to filter through history, can be used by researchers and dApps and was built with the scalability in mind
  2. Casper-Metrics-Front >>> You are here <<<

    • Complete web user interface with various charts
    • API web interface
  3. Casper-Metrics-Admin

    • Secure administration panel with the permissions management allows administrators to select the transfers which they believe are a part of circulating supply.
    • Administration panel includes a tool to adjust vesting schedule of initial genesis validators accounts.

The project can be observed at caspermetrics.io, administrator panel is accessible at admin.caspermetrics.io, API endpoint mainnet.cspr.art3mis.net

All elements are independent and can be deployed separately, depending on the particular needs, as for example to run only the crawler to populate the database with transactions. Admin interface has a search section which accepts input HEX as well as account hash and transaction hash.

General architecture:

API engine is constructed on top of the Loopback framework. Multiple crawler processes are managed by PM2. MySQL is used as a primary data storage and Redis provides a communication layer between all processes and is used as temporary in-memory storage bringing crawling process to the next level of performance.

Overview

Documentation:

Full documentation can be found in the docs folder.

The project was initiated with the proposal #86 and successfully passed DevDao pipeline on 9/29/2021

Based on casper.network

Opensource components:

Contributing and Code of Conduct

You are welcome to add your suggestions and to contribute to the project. Please create PRs against develop branch if you want to contribute. We reserve the right to ignore or decline any PRs and not to respond to the messages.

Please follow the best practices, follow the code structure and make sure that your suggestion is really valuable for the project and well-formed. When you open an issue, please make sure you provide enough details on how to reproduce it. Don't use explicit lexis and be polite to other members.

Please see CODE OF CONDUCT for full details.

License

This project is licensed under MIT license.

About us: