Skip to content

Commit b9683ed

Browse files
authored
feature: add Arkis Wrapped Hype Vault to Arkis adapter (#14796)
1 parent fd53963 commit b9683ed

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

projects/arkis/index.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const { getLogs } = require("../helper/cache/getLogs");
22
const ADDRESSES = require('../helper/coreAssets.json');
33
const { sumTokens2 } = require("../helper/unwrapLPs");
4+
const axios = require("axios");
45

56
const native = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
67

@@ -24,6 +25,8 @@ const abis = {
2425
totalBorrowed: "function totalBorrowed() returns (uint256)",
2526
}
2627

28+
const arkis_wrapped_hype_vault = "0x454F936D5877Daf9366Ef1Fca1bDF888201Bb127";
29+
2730
const fetchFactoryLogs = async (api, type) => {
2831
const fromBlock = 21069508;
2932
const topic = type === "agreement" ? topics.agreementCreated : topics.accountDeployed;
@@ -76,7 +79,16 @@ const borrowed = async (api) => {
7679
})
7780
}
7881

82+
async function tvlHyperliquid(api) {
83+
const response = await axios.get(`https://www.hyperscan.com/api/v2/addresses/${arkis_wrapped_hype_vault}`);
84+
const hypeBalance = response.data.coin_balance || '0';
85+
api.add(ADDRESSES.null, hypeBalance);
86+
}
87+
88+
7989
module.exports = {
80-
methodology: "TVL is calculated by summing the balances of leverage assets, collaterals, and whitelisted tokens held in agreements and margin accounts deployed by factory contracts. Native tokens and LP tokens are also included.",
81-
ethereum : { tvl, borrowed }
82-
}
90+
methodology: "On Ethereum, TVL includes leverage assets, collaterals, whitelisted tokens, ETH, and LP tokens held in agreements and margin accounts created by factory contracts. " +
91+
"On Hyperliquid, TVL reflects the native HYPE held at the Arkis Wrapped HYPE Vault (0x454F936D5877Daf9366Ef1Fca1bDF888201Bb127), which backs the arkisHYPE token issued on Ethereum.",
92+
ethereum: { tvl, borrowed },
93+
hyperliquid: { tvl: tvlHyperliquid },
94+
}

0 commit comments

Comments
 (0)