File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ const TRACKED_TOKENS = {
2
+ aUSDC : '0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB' , // Aave USDC on Base
3
+ aETH : '0xD4a0e0b9149BCee3C920d2E00b5dE09138fd8bb7' // Aave ETH on Base
4
+ } ;
5
+
6
+ // ClubPool contract address
7
+ const CONTRACT_ADDRESS = '0x1089db83561d4c9b68350e1c292279817ac6c8da' ;
8
+
9
+ async function tvl ( api ) {
10
+ const tokens = Object . values ( TRACKED_TOKENS ) ;
11
+
12
+ const balances = await api . multiCall ( {
13
+ abi : 'erc20:balanceOf' ,
14
+ calls : tokens . map ( token => ( {
15
+ target : token ,
16
+ params : [ CONTRACT_ADDRESS ]
17
+ } ) )
18
+ } ) ;
19
+
20
+ api . addTokens (
21
+ tokens ,
22
+ balances
23
+ ) ;
24
+ }
25
+
26
+ module . exports = {
27
+ methodology : "Measures TVL of Run Money by tracking aUSDC and aETH balances in the ClubPool contract." ,
28
+ start : 21942754 , // Deployment block of ClubPool
29
+ base : {
30
+ tvl
31
+ }
32
+ } ;
You can’t perform that action at this time.
0 commit comments