Skip to content

Add MegaVault and dYdX TVL Reporting to Gauntlet Adapter #15526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 21, 2025
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions projects/gauntlet/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { getCuratorExport } = require("../helper/curators");
const axios = require('axios');

const configs = {
methodology: 'Counts all assets that are deposited in all vaults curated by Gauntlet.',
Expand Down Expand Up @@ -227,9 +228,20 @@ async function tvl(api) {
}
}

async function megavaultTvl(api) {
const url = "https://indexer.dydx.trade/v4/vault/v1/megavault/historicalPnl?resolution=hour";
const { data } = await axios.get(url, { headers: { 'Accept': 'application/json' } });
const pnlArr = data.megavaultPnl;
if (!pnlArr || !pnlArr.length) return;
const currentTvl = Number(pnlArr[pnlArr.length - 1].equity);
// Report as Noble USDC (uusdc, 6 decimals)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this asset on coingecko?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not, can you use USDC from mainnet? 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

api.add('uusdc', (currentTvl * 1e6).toFixed(0));
}

module.exports = {
...getCuratorExport(configs),
solana: { tvl },
dydx: { tvl: megavaultTvl },
timetravel: false,
methodology: configs.methodology,
}
Loading