Skip to content

Commit 7978211

Browse files
authored
Add RockawayX Risk Curator (#18490)
2 parents 6bcb3b1 + f2d1871 commit 7978211

File tree

2 files changed

+57
-4
lines changed

2 files changed

+57
-4
lines changed

projects/mev-capital/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,7 @@ const configs = {
247247
'0xa01227a26a7710bc75071286539e47adb6dea417', // Terminal tUSDe
248248
'0xa1150cd4a014e06f5e0a6ec9453fe0208da5adab', // Terminal tWETH
249249
],
250-
midas: [
251-
'0x030b69280892c888670edcdcd8b69fd8026a0bf3', // Midas mMEV Vault
252-
'0xb64c014307622eb15046c66ff71d04258f5963dc', // Midas mevBTC Vault (price not in the api yet)
253-
],
250+
midas: [],
254251
upshift: [
255252
'0x5fde59415625401278c4d41c6befce3790eb357f', // The Treehouse Growth Vault
256253
],

projects/rockawayx/index.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
const { getCuratorExport } = require("../helper/curators");
2+
3+
const MIDAS_VAULTS = {
4+
ethereum: [
5+
'0x030b69280892c888670EDCDCD8B69Fd8026A0BF3', // mMEV
6+
'0xb64C014307622eB15046C66fF71D04258F5963DC', // mevBTC
7+
],
8+
plume_mainnet: [
9+
'0x7d611dC23267F508DE90724731Dc88CA28Ef7473', // mMEV
10+
],
11+
etlk: [
12+
'0x5542F82389b76C23f5848268893234d8A63fd5c8', // mMEV
13+
],
14+
};
15+
16+
const configs = {
17+
methodology: 'Count all assets deposited in all vaults curated by RockawayX.',
18+
blockchains: {
19+
ethereum: {
20+
morpho: [
21+
'0x5f829B1B473cBA86838E1B7BB7E144DbDE228e21',
22+
'0xE0181090c22579B6A217f1522cbf8c9f1F0C1965',
23+
'0x64C18DCC4Ccb3b8D27877a4aeBB4C3126CB39cB9',
24+
],
25+
},
26+
solana: {
27+
kaminoLendVaults: ['DWSXb18xZApz29vnQpgR2m6MynCT7PznaXt7Ut7M7KaP'], // Kamino RWA USDC
28+
},
29+
}
30+
}
31+
32+
const adapterExport = getCuratorExport(configs);
33+
34+
async function midasTvl(api, vaults) {
35+
const totalSupplies = await api.multiCall({
36+
abi: 'uint256:totalSupply',
37+
calls: vaults,
38+
permitFailure: true
39+
});
40+
for (let i = 0; i < vaults.length; i++) {
41+
if (totalSupplies[i] === null || totalSupplies[i] === undefined) continue;
42+
api.add(vaults[i], totalSupplies[i]);
43+
}
44+
}
45+
46+
for (const [chain, vaults] of Object.entries(MIDAS_VAULTS)) {
47+
const baseTvl = adapterExport[chain]?.tvl;
48+
adapterExport[chain] = {
49+
tvl: async (api) => {
50+
if (baseTvl) await baseTvl(api);
51+
await midasTvl(api, vaults);
52+
}
53+
};
54+
}
55+
56+
module.exports = adapterExport;

0 commit comments

Comments
 (0)