balancednetwork / balanced-network-info

ℹ️ Balanced network analytics.
https://stats.balanced.network
MIT License
0 stars 0 forks source link

feat/add dao financial statements #43

Closed hetfly closed 3 years ago

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/balanced-dao/balanced-network-info/GCqV6KusCZWqFZ7sw3SP7p4C8ASx
✅ Preview: https://balanced-network-info-git-feat-add-dao-fina-dfd819-balanced-dao.vercel.app

hetfly commented 3 years ago

@parrot9design statements There are 2 columns each representing single month. Selected time period says past month. Is this intended? What happens when I change the time period? Will there always be 2 data columns ?

parrot9design commented 3 years ago

There are 2 columns each representing single month. Selected time period says past month. Is this intended? What happens when I change the time period? Will there always be 2 data columns ?

Yeah this didn’t make sense to us either, until Scott broke it down. 😅

It uses a trailing time period, so when you change the time period, both columns will update to show the correct date ranges and data. The first column will always show data for the time period ending today, and the second column shows the previous period.

So if you selected past month today, the first column would show financial data for the month ending today (AUG 3 - SEP 2), and the second would show data for the previous month (JUL 3 - AUG 2).

If you were to change it to past week, the columns would show AUG 27 - SEP 2 and AUG 20 -AUG 26. past day would show SEP 1 - SEP 2 and AUG 31 - SEP 1 (unless keeping them to single days – SEP 2 and SEP 1 – would be more accurate for reporting @bennyoptions).

We’ll always have two columns so it’s easy for people to compare the financials between the current and previous period.

As a side note, I noticed we have the $ value of Balanced Dollars under Loan fees. I’m not sure how that made it into the design we shared with you, but let’s remove that and only show the number of tokens, like under Swap fees.

hetfly commented 3 years ago

Makes sense now, thanks @parrot9design So half a year and a year periods will be available after Balanced being live for 2x the time period ? Are APIs ready or should I contact someone about it ?

parrot9design commented 3 years ago

Yep, that’s correct! past 6 months and past year can be included when we get to the 1 year and 2 year mark, respectively. So past 3 months is the highest time frame we can include for now (maybe even 2 months, considering we’re only just past 4 months of operation).

I think the Geometry team are still working on the APIs, but @BennyOptions will have more insight into that.

hetfly commented 3 years ago

Waiting for the APIs

hetfly commented 3 years ago

Holdings are static. Values in Earnings starting with ** are static and are missing in API response I'm aware of some values displaying as 0 right after you reload the page

@parrot9design can you please check the numbers for loan fees ?

parrot9design commented 3 years ago

For the Earnings dropdown, let's use these options:


For the Loan fees, let's remove the $ values from the bnUSD row, so each column only displays a single number.

Current Ideal
Screen Shot 2021-09-20 at 3 17 03 PM Screen Shot 2021-09-20 at 3 17 49 PM

Also, remove the comma from the date formatting (shown in the images above, as well).


In the Governance section on the Stats page, let's make details lowercase, and add an arrow:

Current Ideal
Screen Shot 2021-09-20 at 3 24 46 PM Screen Shot 2021-09-20 at 3 11 46 PM

Holdings are static.

Values in Earnings starting with ** are static and are missing in API response

To clarify, only the Loan fee API is working at this stage, then? Do you need us to provide a date selector design for the Holdings section, or are you okay to try this on your own?

hetfly commented 3 years ago

To clarify, only the Loan fee API is working at this stage, then? Do you need us to provide a date selector design for the Holdings section, or are you okay to try this on your own?

Yes, only loan fees are working right now. I also have data for the Holdings current day but not for any past date. I've contacted Pranav about the API issues.

There is no need for date picker design

hetfly commented 3 years ago

@parrot9design time picker added

BennyOptions commented 3 years ago

@pranav925 should have an update later this week

pthirun commented 3 years ago

The daofund balance sheet endpoint is up here: https://balanced.geometry.io/api/v1/stats/daofund-balance-sheet?timestamp=-1

You can test out different parameters with this page: https://balanced.geometry.io/api/v1/docs#/stats/get_daofund_balance_sheet_api_v1_stats_daofund_balance_sheet_get

NOTE: the timestamps are unix timestamps in microseconds. A -1 timestamp will give you the latest balance sheet Example query to get daofund balance sheet of the last week: https://balanced.geometry.io/api/v1/stats/daofund-balance-sheet?timestamp=1631575246128000

This endpoint will only get you the bottom half of the page, the income statement endpoint are a WIP. Looking to get it finished by EOW.

BennyOptions commented 3 years ago

@hetfly all numbers have been verified within reason.

@octocat512 if you want to review the code prior to merging, please do.

Let's merge this PR on Monday or Tuesday night US time when we announce the new roadmap.

hetfly commented 3 years ago

@octocat512 @BennyOptions I want to do some refactoring, will do so prior to Monday

hetfly commented 3 years ago

@octocat512 @parrot9design thanks for your feedback, everything is fixed