Skip to content

Commit 1378e3b

Browse files
authored
add more-vaults (DefiLlama#15376)
1 parent c792417 commit 1378e3b

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

projects/helper/coreAssets.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2100,7 +2100,8 @@
21002100
"ankrFLOWEVM": "0x1b97100eA1D7126C4d60027e231EA4CB25314bdb",
21012101
"USDC_e": "0x7f27352d5f83db87a5a3e00f4b07cc2138d8ee52",
21022102
"stgUSDC": "0xf1815bd50389c46847f0bda824ec8da914045d14",
2103-
"USDF": "0x2aabea2058b5ac2d339b163c6ab6f2b6d53aabed"
2103+
"USDF": "0x2aabea2058b5ac2d339b163c6ab6f2b6d53aabed",
2104+
"WETH": "0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590"
21042105
},
21052106
"matchain": {
21062107
"MAT": "0x44a83a012B926853DFc1BBE2ec5BEf37126067e8",

projects/more-vaults/index.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
const config = {
2+
flow: {
3+
moreVaultsRegistries: ["0xd640db4Ae39b32985CcF91770efd31b9f9b5A419"],
4+
},
5+
};
6+
7+
async function tvl(api) {
8+
const { moreVaultsRegistries } = config[api.chain] || {};
9+
10+
if (!moreVaultsRegistries?.length) return {};
11+
12+
const vaultArrays = await api.multiCall({
13+
abi: 'function getDeployedVaults() external view returns (address[])',
14+
calls: moreVaultsRegistries,
15+
});
16+
17+
const allVaults = vaultArrays.flat();
18+
19+
if (!allVaults.length) return {};
20+
21+
// More Vaults uses EIP-2535 Diamond architecture with ERC4626-compatible facets
22+
await api.erc4626Sum({
23+
calls: allVaults,
24+
tokenAbi: 'address:asset',
25+
balanceAbi: 'uint256:totalAssets'
26+
});
27+
28+
return api.getBalances();
29+
}
30+
31+
module.exports = {
32+
methodology: "TVL is calculated by summing the total assets of all EIP-2535 Diamond vaults deployed through the More Vaults registry contracts on Flow. Each Diamond vault implements ERC4626-compatible facets for asset management and yield generation.",
33+
flow: {
34+
tvl,
35+
},
36+
};

0 commit comments

Comments
 (0)