Skip to content

danchousz/ens_open_ledger

Repository files navigation

ENS Open Ledger

Overview

ENS Open Ledger is a platform designed to track and visualize DAO budgets, providing an intuitive understanding of fund allocation across various working group expenses through an interactive Sankey diagram. The platform enhances transparency and detail, making it a valuable tool for informed decision-making, monitoring your own funding, and analyzing competitor spending within the DAO ecosystem. The application is availible at ens-ledger.app.

Authors: Alex van de Sande (contact). Danch.eth (contact).

Features

  • Visualize budgets over all-time or filter by specific periods (e.g. 2023Q4), working groups (e.g. Ecosystem WG in 2022Q3), or expense categories (e.g. PG Small Grants in 2023)
  • Export graphs in tabular or graphical formats
  • Access detailed statistics on any contractor or expense category by clicking on a node
  • Get instant transaction details by clicking on a link

Structure

The most important elements of the application structure are described here. You can see a more detailed structure in the corresponding file.

Sankey

Main component, draws a Sankey chart.

Backend

  • Service processes and filters data for sending to Generator.
  • Generator creates the arrays that Plotly needs to draw the chart, such as nodes, links, X and Y positions, colors, and so on.
  • API.

Frontend

  • sankeyLayout accepts data arrays from the generator, sets the canvas sizes, annotations, and configs.
  • nodeLabels forces changes to the chart's CSS elements, setting the position and size of node labels.
  • customDragOverlay adds custom dragging as the built in Plotly is not the best quality.
  • plotlyListeners makes nodes, annotations and links clickable and sets the corresponding functions.
  • sankey gathers.

Styles

Dropdown

Opens a dropdown with final recipients within a category when clicking on a node. Dropdown

Backend

  • Service filters data related to end recipients within a given category.
  • API.

Frontend

Styles

Tables

Shows detailed statistics for the recipient when clicking Show All-time statistics in the dropdown. Table

Backend

  • Service filters data by the final recipient.
  • API.

Frontend

  • recipientDetails сalculates statistics, draws diagrams, and creates a table based on data received from the service.

Styles

Pie charts

Allows you to draw a pie chart instead of Sankey. Pie

Backend

Same as for Sankey.

Frontend

Export

Formats a graph for export to SVG, PNG, CSV, JSON, and XSLX.

Backend

  • Service sorts data from unnecessary for export
  • API.

Frontend

  • exportChart generates canvas, layout and annotations for SVG and PNG images, as well as columns for table formats.

Scripts

  • cronJobs sets the Cron schedule.
  • new_miner collects information from the chain via Etherscan. Runs every 2 hours.
  • stream_grouper creates pseudo-transactions for a stream to service providers as if they were withdrawing funds every day. That is, it reflects the amount of funds they can withdraw. Runs every day.
  • merger processes data, assigns names to contractors, and determines the expense category. Runs every two hours after miner.
  • avatar_parser searches and downloads avatar records in the chain. Runs weekly, cache is cleared monthly in case someone changes the avatar.

Requirements

License

This project is licensed under the MIT License. It’s open source and welcomes contributions from the community. Feel free to fork the repository, submit pull requests, and help improve the platform together!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published