bisq-network / growth

Bisq exchange growth experiments
https://bisq.wiki/Growth_team
25 stars 11 forks source link

Add semi-automated DAO reporting to website #245

Closed m52go closed 2 years ago

m52go commented 3 years ago

Proper DAO reporting is long-overdue, but probably won't be implemented as originally envisioned (fully automated) for a while.

Hence this initiative to add semi-automated reporting, which takes place at intervals (e.g., per-day, per-cycle) instead.

Mid-term workaround

Reporting BTC+BSQ burning, qualitative issuance, BSQ supply, and more in real-time is not a trivial task.

However, thanks to the cycle results JSON dump provided by Bisq itself, reporting basic DAO voting cycle results in a semi-automated way is quite simple. By "semi-automated" I mean creating a script that parses the JSON dump -- this script will need to be run manually after cycles end, but can write most of the report automatically.

Here's what I'm currently working on to get this done:

I'll have the script leave blank spaces for proposal commentary and general commentary, both to be filled in by hand wherever appropriate.

This workflow will make DAO reporting more punctual, as I won't have to spend time getting simple data points such as DAO cycle block numbers, time periods, voting statistics, and other items. Currently these numbers must be obtained from Bisq itself and a bunch of script hacked together over time, which makes doing this by hand tedious and prone to pushing off.

Next steps

Once this basic DAO result reporting is completed, the next step will be to add supply dynamics (issuance details, BSQ burn, BTC burn, etc) to help put DAO results into context.

Whereas voting cycle results are only released once per cycle and require hand-crafted commentary, fee collection (both BSQ and BTC) happens constantly and needs to be counted in an automated way. Thus this next step will require more technical work and probably some kind of intermediate server that aggregates data on intervals. Depending on the approach used, daily time intervals might work, otherwise, a cycle-based interval may need to be used.

Details are TBD, and will be addressed in a future issue.

Future

As mentioned above, the long-term hope is for mempool nodes to entirely take over and provide DAO reporting. They are technically in the best spot to do so since they already have real-time BTC and BSQ data, so implementing this any other way is a compromise. But it's past time to get a handle on DAO reporting, so this compromised approach will have to suffice for now.

I'll have a pull request soon for the items covered in the mid-term workaround section, as I don't see those changes as controversial (they're merely moving around data that's already on the website and changing a behind-the-scenes workflow).

I'm making this issue to outline the approach and background to put that pull request into context and how it could fit within a broader initiative to achieve better overall reporting for the Bisq DAO.

Please let me know if you have any suggestions or concerns.

m52go commented 3 years ago

Overview of Planned Work

This post outlines the conceptual overviews, data sources, and planned work for 2 pages: a new /dao page and /dao/cycle-n pages with cycle details.

The goal is to auto-generate all items below (exception: proposal descriptions, since those are necessarily subjective and reflective). It assumes updates will take place monthly right after the end of a cycle. Most data should be available locally (e.g. Bisq data dumps), but GitHub and Mempool may be needed for some things...the idea is to get all the data, process it, auto-generate pages as outlined below, add proposal commentary (which would be optional, strictly speaking), and push to GitHub.

The /dao page outlined below should replace the page currently at /dao as well as the current /stats page.

/dao - Conceptual Overview

This overview will be wireframed shortly for design feedback (see task list below).

Graph (single graph with all 3 data series)

Tiles for each cycle

Learn more about the DAO


/dao/cycle-n - Conceptual Overview

This overview will be wireframed shortly for design feedback (see task list below).

Trading Overview

Network Funds Transfers

Governance


Task List

What needs to be done...

UI

Obtain Data

Plug Data into Interface

Document


Data Sources

Where will the data come from?

/dao

/dao/cycle-n

pazza83 commented 3 years ago

Hi @m52go looks great.

On the /dao/cycle-n page

Do you think it would be possible to pull in the following:

USD BTC
Trade volume July 2021 $X X BTC
BSQ trade revenue fees $X X BTC
BTC trade revenue fees $X X BTC
Net Profit (Loss) $X X BTC

Percentage of fees paid in BSQ was: XX.XX%

When doing it manually I was able to pull in data on a monthly basis but found in harder to pull in the correct data for a cycle.

m52go commented 2 years ago

Merged with https://github.com/bisq-network/bisq-website/pull/449.