File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,18 @@ async function tvl() {
57
57
const boosted_tvl = await get ( "https://api.fluidtokens.com/get-ft-stats" ) ;
58
58
59
59
const boosted = parseInt ( boosted_tvl . bs_available_volume ) + parseInt ( boosted_tvl . bs_active_volume ) ;
60
+
61
+ const lending_v3 = await get ( "https://api.fluidtokens.com/get-tvl" ) ;
62
+
63
+ const principal = lending_v3 . collectionOfferPools . principal ;
64
+ const collateral = lending_v3 . loans . collateral ;
65
+
66
+ // Sum and convert to integer
67
+ const total_v3 = Math . floor ( principal + collateral ) ;
60
68
61
69
return {
62
70
// cardano: (SC_offers_tvl+repay_tvl+pools_tvl+boosted) / 1e6,
63
- cardano : ( SC_offers_tvl + pools_tvl + boosted ) / 1e6 ,
71
+ cardano : ( SC_offers_tvl + pools_tvl + boosted + total_v3 ) / 1e6 ,
64
72
} ;
65
73
}
66
74
@@ -80,13 +88,18 @@ async function borrowed() {
80
88
81
89
const dataOffers = await get ( "https://api.fluidtokens.com/get-available-collection-offers" ) ;
82
90
let SC_offers_tvl = 0 ;
91
+
92
+
93
+ const lending_v3 = await get ( "https://api.fluidtokens.com/get-tvl" ) ;
94
+ const lent = lending_v3 . loans . principal ;
95
+
83
96
84
97
dataOffers . forEach ( ( i ) => {
85
98
SC_offers_tvl += parseInt ( i . offerData . loanAmnt ) ;
86
99
} ) ;
87
100
88
101
return {
89
- cardano : ( SC_tvl ) / 1e6 ,
102
+ cardano : ( SC_tvl + lent ) / 1e6 ,
90
103
} ;
91
104
}
92
105
You can’t perform that action at this time.
0 commit comments