-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Conversation
…pdate Drift logic (Carrot support)
projects/gauntlet/index.js
Outdated
const pnlArr = data.megavaultPnl; | ||
if (!pnlArr || !pnlArr.length) return; | ||
const currentTvl = Number(pnlArr[pnlArr.length - 1].equity); | ||
// Report as Noble USDC (uusdc, 6 decimals) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
projects/gauntlet/index.js
Outdated
// Report as USD value (this should work with DeFiLlama's backend) | ||
api.add('tether', (currentTvl * 1e6).toFixed(0)); | ||
|
||
} catch (error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove any try/catch
projects/gauntlet/index.js
Outdated
const currentTvl = Number(pnlArr[pnlArr.length - 1].equity); | ||
|
||
// Report as USD value (this should work with DeFiLlama's backend) | ||
api.add('tether', (currentTvl * 1e6).toFixed(0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use coingecko:usd-coin
- Remove try/catch from MegaVault TVL function (per reviewer request) - Report MegaVault TVL using 'coingecko:usd-coin' identifier - Remove all debugging logs and unrelated changes - Ensure code is clean and in sync with latest reviewer feedback
The adapter at projects/gauntlet exports TVL:
|
Summary
-Add MegaVault (MV) TVL reporting to the Gauntlet adapter.
-Add dYdX TVL reporting (currently shows 0 due to backend mapping, see notes).
Details
-MegaVault TVL is fetched and reported under the appropriate key.
-dYdX TVL is fetched and reported as uusdc (Noble USDC), but currently not displayed in CLI/website due to backend mapping—please advise if a different identifier is needed.
Testing
-Ran local tests (node test.js projects/gauntlet), all chains report expected TVL.
-No errors or crashes.
Clarification regarding Drift/Carrot logic
-The logic for Solana Drift vaults, including Carrot hJLP, is already included in a previous PR: #15519.
-This PR may temporarily include those changes until #15519 is merged. Once that PR is merged, this one will only contain the MegaVault and dYdX changes.
Notes
Please advise on the correct identifier for dYdX TVL if uusdc is not supported.