Skip to content

Commit ecbc53e

Browse files
authored
felix (#16913)
1 parent d946f43 commit ecbc53e

File tree

1 file changed

+15
-35
lines changed

1 file changed

+15
-35
lines changed

projects/felix-vaults/index.js

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,19 @@
1-
const morphoBlueAdapter = require("../morpho-blue/index.js");
1+
const { getMorphoVaultTvl } = require("../helper/morpoho");
22

3-
const tvl = async (api) => {
4-
await morphoBlueAdapter.hyperliquid.tvl(api);
5-
6-
const felixVaultAddresses = [
7-
"0x835febf893c6dddee5cf762b0f8e31c5b06938ab",
8-
"0xfc5126377f0efc0041c0969ef9ba903ce67d151e",
9-
"0x9c59a9389d8f72de2cdaf1126f36ea4790e2275e",
10-
"0x2900ABd73631b2f60747e687095537B673c06A76",
11-
"0x9896a8605763106e57A51aa0a97Fe8099E806bb3",
12-
"0x66c71204B70aE27BE6dC3eb41F9aF5868E68fDb6",
13-
];
14-
15-
const assets = await api.multiCall({
16-
abi: "function asset() view returns (address)",
17-
calls: felixVaultAddresses,
18-
});
19-
20-
const totalAssets = await api.multiCall({
21-
abi: "function totalAssets() view returns (uint256)",
22-
calls: felixVaultAddresses,
23-
});
24-
25-
assets.forEach((asset, i) => {
26-
if (asset && totalAssets[i]) {
27-
api.add(asset, totalAssets[i] * -1);
28-
}
29-
});
30-
};
3+
const hyperliquidConfig = {
4+
governor: "0x2157f54f7a745c772e686AA691Fa590B49171eC9",
5+
}
316

327
module.exports = {
33-
methodology:
34-
"Felix Vanilla represents direct lending markets TVL calculated as Total Morpho Blue TVL minus Felix Vaults TVL. This captures the portion of Morpho Blue markets accessed through Felix's direct lending interface rather than through managed vaults.",
358
doublecounted: true,
36-
hyperliquid: {
37-
tvl,
38-
},
39-
};
9+
hyperliquid: { tvl: getMorphoVaultTvl(hyperliquidConfig.governor, {
10+
vaults: [
11+
'0x835febf893c6dddee5cf762b0f8e31c5b06938ab',
12+
'0xfc5126377f0efc0041c0969ef9ba903ce67d151e',
13+
'0x9c59a9389d8f72de2cdaf1126f36ea4790e2275e',
14+
'0x2900ABd73631b2f60747e687095537B673c06A76',
15+
'0x9896a8605763106e57A51aa0a97Fe8099E806bb3',
16+
'0x66c71204B70aE27BE6dC3eb41F9aF5868E68fDb6'
17+
]
18+
}) },
19+
}

0 commit comments

Comments
 (0)