Skip to content

Commit 03cbfa2

Browse files
Add HyperEVM in Giza / Arma (#16964)
1 parent 3e8e33f commit 03cbfa2

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

projects/giza/arma.js

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ const ARBITRUM_PROTOCOLS = {
4646
]
4747
};
4848

49+
// Arbitrum chain protocol addresses
50+
const HYPEREVM_PROTOCOLS = {
51+
hyperlendPoolDataProvider: '0x5481bf8d3946E6A3168640c1D7523eB59F055a29', // Hyperlend Pool Data Provider
52+
tokens: [
53+
"0xFc5126377F0efc0041C0969Ef9BA903Ce67d151e", // Morpho Felix USDT0
54+
"0x9896a8605763106e57A51aa0a97Fe8099E806bb3", // Morpho Felix USDT0 Frontier
55+
"0xe5ADd96840F0B908ddeB3Bd144C0283Ac5ca7cA0", // Morpho Hypertihm USDT0
56+
"0x3Bcc0a5a66bB5BdCEEf5dd8a659a4eC75F3834d8", // Morpho MEV Capital USDT0
57+
"0x53A333e51E96FE288bC9aDd7cdC4B1EAD2CD2FfA", // Morpho Gauntlet USDT0
58+
]
59+
};
60+
4961
const abi = {
5062
getReserveTokensAddresses: "function getReserveTokensAddresses(address asset) view returns (address aTokenAddress, address stableDebtTokenAddress, address variableDebtTokenAddress)",
5163
};
@@ -149,8 +161,43 @@ async function arbitrumTvl(api) {
149161
});
150162
}
151163

164+
async function hyperevmTvl(api) {
165+
// For HyperEVM chain
166+
const owners = await getConfig('giza/arma/' + api.chain, 'https://api.arma.xyz/api/v1/999/smart-accounts');
167+
168+
api.log(`[Arma] Found ${owners.length} smart accounts on HyperEVM`);
169+
170+
// Get aUSDT0 token from Hyperlend Pool Data Provider
171+
const USDT0 = ADDRESSES.hyperliquid.USDT0;
172+
const aaveReserveData = await api.call({
173+
target: HYPEREVM_PROTOCOLS.hyperlendPoolDataProvider,
174+
abi: abi.getReserveTokensAddresses,
175+
params: [USDT0]
176+
});
177+
178+
const allTokens = [
179+
...HYPEREVM_PROTOCOLS.tokens,
180+
aaveReserveData.aTokenAddress // Add the actual aUSDT0 token
181+
];
182+
183+
// Build tokensAndOwners array for each token-owner combination
184+
const tokensAndOwners = [];
185+
allTokens.forEach(token => {
186+
owners.forEach(owner => {
187+
tokensAndOwners.push([token, owner]);
188+
});
189+
});
190+
191+
return api.sumTokens({
192+
tokensAndOwners,
193+
permitFailure: true
194+
});
195+
}
196+
197+
152198
module.exports = {
153199
base: { tvl: baseTvl },
154200
plasma: { tvl: plasmaTvl },
155-
arbitrum: { tvl: arbitrumTvl }
201+
arbitrum: { tvl: arbitrumTvl },
202+
hyperliquid: { tvl: hyperevmTvl }
156203
};

projects/giza/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ module.exports = {
1212
methodology: 'TVL is calculated by querying onchain balances of Giza smart wallet accounts across DeFi lending protocols for the Arma product, and Pendle PT token holdings for the Pulse product.',
1313
base: arma.base,
1414
plasma: arma.plasma,
15+
hyperliquid: arma.hyperliquid,
1516
arbitrum: { tvl: combinedArbitrumTvl },
1617
}

0 commit comments

Comments
 (0)