Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

Query Node: Add support for fees #4846

Open mochet opened 1 year ago

mochet commented 1 year ago

Problem

Currently the Query Node does not track fees for anything. Fees are an extremely important economic metric for the platform because they will eventually need to be balanced against storage costs and also for other uses (like NFT sales) are also important. As it is there is no way to tell how much is being burned through fees--a good example of this is the membership faucet, which is currently burning something like 10k $JOY per day, which is a decent amount, yet it is very difficult to surface this information without QN support.

Another side of this is that when a user uploads a video they are quoted a price for the file size of the video they are uploading that doesn't seem to be tracked either.

3rd party solutions like Subsquid do not seem to surface this information either.

Solution

Add tracking of fees for the various actions on the platform that require them such as

Although transfer fees would be desirable, since the QN doesn't track them it seems out of scope currently.

bedeho commented 1 year ago

You have to be more careful about sort of fee you are referring to. There are block inclusion fees, there are tips, there are extra state bloat costs which are recoverable, there are usage fees that are related to key actions are burned, and we cannot conflate all of these, as a given use case may only want to count a subset of these.

I also want to highlight that there is a complementary effort around the new dashboard API which touches on some of these goals, so I suggest not touching QN until more clarity is generated there.

https://github.com/Joystream/dashboard-api/issues/1