frontend-monorepo
frontend-monorepo copied to clipboard
Spike: Fee summary data
The Chore
At launch / soon after we want to make sure that someone who has decided to trade, provide liquidity on Vega has an easy way to understand what they are making from fees and rewards. Right now, we have the ability to show reward scheme earnings in the token front end, but do not currently show fees:
- Maker fees
- LP fees
- Infrastructure fees
May need some form of pagination so that we can request just X period of time e.g. 30 days?
Tasks
- [ ] Identify the data required
- [ ] Identify if this data is available via API
- [ ] Outline ticket for creating the service or requirement on data node (if there is one needed)
Additional details / background info
These fees might be on the ledger entries API https://docs.vega.xyz/testnet/api/rest/data-v2/trading-data-service-list-ledger-entries- e.g. TRANSFER_TYPE_MAKER_FEE_RECEIVE TRANSFER_TYPE_LIQUIDITY_FEE_DISTRIBUTE TRANSFER_TYPE_INFRASTRUCTURE_FEE_DISTRIBUTE
Need to make sure we include the historical granularity on this stuff.
Will people want to see by day, week, month, year?
How accurate within a day? Is a day fine or does it need to be hourly?
When does a "day" start and end? Is epoch best? Maybe UTC? 00:00? Vegatime?
Really important we get the data engineering right on this first time!