Skip to content

Commit 4a0f389

Browse files
committed
Added Run Money Adapter
1 parent 661c475 commit 4a0f389

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

projects/run-money/index.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
};

0 commit comments

Comments
 (0)