@@ -8,11 +8,6 @@ interface Pool {
88 paid : string ;
99}
1010
11- const methodology = {
12- Fees : 'Sum of all fees accrued from LP pools.' ,
13- ProtocolReveneue : '30% of all the fees accrued excluding Community pool.'
14- }
15-
1611const urlDailyStats = "https://api.prod.flash.trade/market-stat/revenue-24hr" ;
1712
1813const calculateProtocolRevenue = ( stats : Pool [ ] ) => {
@@ -26,14 +21,23 @@ const fetchFlashStats = async (_: number): Promise<FetchResultFees> => {
2621 const dailyStats : Pool [ ] = dailyStatsResponse ;
2722 const dailyAccrued = dailyStats . reduce ( ( sum , item ) => sum + parseFloat ( item . accured ) , 0 ) ;
2823 const dailyProtocolRevenue = calculateProtocolRevenue ( dailyStats ) ;
24+ const dailyRevenue = dailyProtocolRevenue * 2 ;
2925
3026 return {
31- dailyFees : dailyAccrued . toString ( ) ,
32- dailyRevenue : dailyProtocolRevenue . toString ( ) ,
33- dailyProtocolRevenue : dailyProtocolRevenue . toString ( ) ,
27+ dailyFees : dailyAccrued ,
28+ dailyRevenue,
29+ dailyProtocolRevenue,
30+ dailyHoldersRevenue : dailyProtocolRevenue ,
3431 } ;
3532} ;
3633
34+ const methodology = {
35+ Fees : 'Sum of all fees accrued from LP pools.' ,
36+ Revenue : 'Sum of protocol revenue and holder revenue.' ,
37+ ProtocolRevenue : '30% of all the fees accrued excluding Community pool.' ,
38+ HolderRevenue : '50% of revenue goes to token stakers.' ,
39+ }
40+
3741const adapter : Adapter = {
3842 version : 2 ,
3943 adapter : {
0 commit comments