From ecbc53e55bb92fa05fb3340cd18715b155fb9b6b Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Fri, 31 Oct 2025 18:37:34 +0000 Subject: [PATCH] felix (#16913) --- projects/felix-vaults/index.js | 50 ++++++++++------------------------ 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/projects/felix-vaults/index.js b/projects/felix-vaults/index.js index 6eee2fb3a..2aa417cf5 100644 --- a/projects/felix-vaults/index.js +++ b/projects/felix-vaults/index.js @@ -1,39 +1,19 @@ -const morphoBlueAdapter = require("../morpho-blue/index.js"); +const { getMorphoVaultTvl } = require("../helper/morpoho"); -const tvl = async (api) => { - await morphoBlueAdapter.hyperliquid.tvl(api); - - const felixVaultAddresses = [ - "0x835febf893c6dddee5cf762b0f8e31c5b06938ab", - "0xfc5126377f0efc0041c0969ef9ba903ce67d151e", - "0x9c59a9389d8f72de2cdaf1126f36ea4790e2275e", - "0x2900ABd73631b2f60747e687095537B673c06A76", - "0x9896a8605763106e57A51aa0a97Fe8099E806bb3", - "0x66c71204B70aE27BE6dC3eb41F9aF5868E68fDb6", - ]; - - const assets = await api.multiCall({ - abi: "function asset() view returns (address)", - calls: felixVaultAddresses, - }); - - const totalAssets = await api.multiCall({ - abi: "function totalAssets() view returns (uint256)", - calls: felixVaultAddresses, - }); - - assets.forEach((asset, i) => { - if (asset && totalAssets[i]) { - api.add(asset, totalAssets[i] * -1); - } - }); -}; +const hyperliquidConfig = { + governor: "0x2157f54f7a745c772e686AA691Fa590B49171eC9", +} module.exports = { - methodology: - "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.", doublecounted: true, - hyperliquid: { - tvl, - }, -}; + hyperliquid: { tvl: getMorphoVaultTvl(hyperliquidConfig.governor, { + vaults: [ + '0x835febf893c6dddee5cf762b0f8e31c5b06938ab', + '0xfc5126377f0efc0041c0969ef9ba903ce67d151e', + '0x9c59a9389d8f72de2cdaf1126f36ea4790e2275e', + '0x2900ABd73631b2f60747e687095537B673c06A76', + '0x9896a8605763106e57A51aa0a97Fe8099E806bb3', + '0x66c71204B70aE27BE6dC3eb41F9aF5868E68fDb6' + ] + }) }, +} \ No newline at end of file