Skip to content

fix: d2-finance adapter (dead subgraph, stale vault list)#2786

Merged
0xkr3p merged 4 commits into
DefiLlama:masterfrom
0xshubhs:fix/d2-finance-onchain
Jul 12, 2026
Merged

fix: d2-finance adapter (dead subgraph, stale vault list)#2786
0xkr3p merged 4 commits into
DefiLlama:masterfrom
0xshubhs:fix/d2-finance-onchain

Conversation

@0xshubhs

@0xshubhs 0xshubhs commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Problem

The d2-finance adapter is broken and currently sits in the exclusion list:

  • Its APY source, the self-hosted subgraph at https://d2.finance/subgraphs/name/d2, is behind a Cloudflare managed challenge and returns 403 to any non-browser client.
  • Its hardcoded vault list is the original 10 Arbitrum vaults, which now hold only dust (~$3k combined). The protocol's ~$28M TVL lives in newer vaults on Hyperliquid, Arbitrum, Base, Berachain and Ethereum.

Change

Rewrote the adapter to be fully on-chain, no subgraph:

  • Vault list mirrors the DefiLlama-Adapters d2finance TVL adapter (41 ERC4626 vaults across ethereum/base/arbitrum/berachain/hyperliquid).
  • TVL: totalAssets() priced via the coins API.
  • APY: D2 vaults are epoch-based — funds are custodied to a trader and returned with PnL at settlement, which is the only time the share price moves. apyBase is the trailing convertToAssets(1 share) change, annualized over the longest lookback window the vault has existed for (365d, then 180/90/30d for younger vaults), with historical values read at the corresponding block heights.
  • Pool ids keep the old <vault>-<chain> format so existing Arbitrum pool history continues.
  • Removed the d2-finance entry from the exclusion list so the adapter is triggered again.

Test

npm run test --adapter=d2-finance passes (245 tests), returning 40 pools, total $27.8M matching the protocol page ($27.9M). Top pools:

Arbitrum        HYPE++      $11,591,339   13.01%
Hyperliquid L1  d2HYPE       $8,411,893   24.94%
Base            HYPE++       $2,968,899    8.87%
Hyperliquid L1  hXXI         $2,117,155    4.38%
Hyperliquid L1  HYPE++       $1,967,597    8.92%
Hyperliquid L1  dgnUpside      $501,126   -3.55%

Summary by CodeRabbit

  • New Features

    • Added D2 Finance ERC-4626 vault support across multiple blockchain networks, enabling multi-chain pool tracking.
  • Improvements

    • Reworked TVL, price-per-share, and APY calculations to use each vault’s live underlying asset data and ERC-4626 onchain accounting, including historical lookback for APY estimation.
    • Aggregates results across configured chains and filters out invalid/incomplete pools for cleaner outputs.
  • Bug Fixes

    • Removed D2 Finance from the default static protocol exclusion list.

Copilot AI review requested due to automatic review settings July 7, 2026 21:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 798dfb62-560f-4cb1-8c20-aaeb15d49022

📥 Commits

Reviewing files that changed from the base of the PR and between 6e64227 and 9db516e.

📒 Files selected for processing (1)
  • src/adaptors/d2-finance/index.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/adaptors/d2-finance/index.js

📝 Walkthrough

Walkthrough

The D2 Finance adaptor now supports configured vaults across multiple chains, resolves ERC-4626 asset metadata through multicalls, calculates TVL and APY from current and historical conversions, aggregates valid pools, and removes the adaptor from the hardcoded exclusion list.

Changes

D2 Finance multi-chain adaptor

Layer / File(s) Summary
Vault configuration and ERC-4626 contracts
src/adaptors/d2-finance/index.js
Adds multi-chain vault configuration, a lookback period, and ERC-4626 ABIs for asset discovery and conversion.
Vault metrics and historical APY
src/adaptors/d2-finance/index.js
Uses multicalls and resolved ERC20 prices to calculate TVL, price per share, and APY from historical vault data.
Multi-chain aggregation and adaptor enablement
src/adaptors/d2-finance/index.js, src/utils/exclude.js
Aggregates and filters per-chain pools, and removes d2-finance from the hardcoded exclusion list.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant poolsFunction
  participant chainPools
  participant multicall
  participant ERC20PriceLookup
  participant getBlocksByTime
  poolsFunction->>chainPools: process configured chains and vault lists
  chainPools->>multicall: read totalAssets, asset, symbol, and decimals
  chainPools->>ERC20PriceLookup: fetch prices for resolved assets
  chainPools->>getBlocksByTime: resolve historical block from LOOKBACK_DAYS
  chainPools->>multicall: call convertToAssets at current and historical blocks
  chainPools-->>poolsFunction: return calculated pool metrics
  poolsFunction-->>poolsFunction: flatten results and keep finite entries
Loading

Suggested reviewers: 0xkr3p

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: replacing the dead subgraph and stale vault list in the d2-finance adapter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

The d2-finance adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 245 passed, 245 total
Snapshots: 0 total
Time: 0.282 s
Ran all test suites.

Nb of pools: 40
 

Sample pools:
┌─────────┬──────────────────────────────────────────────────────────┬──────────────────┬──────────────┬──────────────────┬────────────────────┬─────────────────────┬─────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────────────────┐
│ (index) │ pool                                                     │ chain            │ project      │ symbol           │ tvlUsd             │ apyBase             │ poolMeta                                                                            │ underlyingTokens                                 │
├─────────┼──────────────────────────────────────────────────────────┼──────────────────┼──────────────┼──────────────────┼────────────────────┼─────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────┤
│ 0       │ '0x75288264fdfea8ce68e6d852696ab1ce2f3e5004-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'HYPE++'         │ 11590814.9768215   │ 13.010908736135418  │ "Strategy's lock duration is aligned with market opportunities, verifable onchain." │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │
│ 1       │ '0x3ebb11ba6a5b61c04d1a703ea10728d519945440-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'd2HYPE'         │ 8411892.847540118  │ 24.94180145548843   │ "Strategy's lock duration is aligned with market opportunities, verifable onchain." │ [ '0x5555555555555555555555555555555555555555' ] │
│ 2       │ '0x2406aacbdf8463176deb285adaa81768415b6c7e-base'        │ 'Base'           │ 'd2-finance' │ 'HYPE++'         │ 2968723.0239519407 │ 8.866640546882161   │ "Strategy's lock duration is aligned with market opportunities, verifable onchain." │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 3       │ '0xf44f49e6577b3934f981c6f0629d15154d2606e6-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'hXXI'           │ 2117154.7495235954 │ 4.3837978046162185  │ "Strategy's lock duration is aligned with market opportunities, verifable onchain." │ [ '0x9FDBdA0A5e284c32744D2f17Ee5c74B284993463' ] │
│ 4       │ '0x195eb4d088f222c982282b5dd495e76dba4bc7d1-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'HYPE++'         │ 1967596.812132235  │ 8.921365016839854   │ "Strategy's lock duration is aligned with market opportunities, verifable onchain." │ [ '0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb' ] │
│ 5       │ '0x6bf9345b5d6b27b5cbf2e463dc5e0b2afcedc21c-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'dgnUpside'      │ 501125.87244010397 │ -3.5459095786902983 │ "Strategy's lock duration is aligned with market opportunities, verifable onchain." │ [ '0xBe6727B535545C67d5cAa73dEa54865B92CF7907' ] │
│ 6       │ '0x1176c3760af6a1dbaa5bbd0cc6cda8a2ed6b785e-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 88605.2571782891   │ 0                   │ "Strategy's lock duration is aligned with market opportunities, verifable onchain." │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │
│ 7       │ '0x57f467c9c4639b066f5a4d676cd8ed7d87c1791b-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 58988.03611079318  │ 0                   │ "Strategy's lock duration is aligned with market opportunities, verifable onchain." │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │
│ 8       │ '0x36b933554782b108bb9962ac00c498acbceb706d-berachain'   │ 'Berachain'      │ 'd2-finance' │ 'HyperBERA.USDC' │ 41582.843036909144 │ -31.232808696710045 │ "Strategy's lock duration is aligned with market opportunities, verifable onchain." │ [ '0x549943e04f40284185054145c6E4e9568C1D3241' ] │
│ 9       │ '0x91acd32da9bea6da3751dc12ee0fbe47169349c1-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 33993.10555537234  │ 0                   │ "Strategy's lock duration is aligned with market opportunities, verifable onchain." │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │
└─────────┴──────────────────────────────────────────────────────────┴──────────────────┴──────────────┴──────────────────┴────────────────────┴─────────────────────┴─────────────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

Comment thread src/adaptors/d2-finance/index.js Outdated
// oldest window in which the vault already existed
let apyBase = 0;
const priceNow = Number(ppsNow.output[i].output);
for (const [w, days] of LOOKBACK_DAYS.map((d, j) => [j, d])) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We stick to shorter windows, between 24-7d is ideal but stretch to 30d in some cases. Also we stick to one time window for consistency. Pls see results from using 7d or if not then 30d max

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

switched to a single 30d window. tried 7d first like you said but these are epoch vaults that only settle ~monthly, so a 7d lookback lands in the flat stretch between settlements and reads back near-zero for most of them. 30d lines up with one settlement cycle and gives real numbers, and it's within the 30d cap. done

@0xkr3p 0xkr3p left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hey @0xshubhs, thanks for the PR, just a small issue surrounding the time window to resolve before we can move forwards

Comment thread src/adaptors/d2-finance/index.js Outdated
apy,
apyBase,
poolMeta:
"Strategy's lock duration is aligned with market opportunities, verifable onchain.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we remove this pool meta pls

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed

poolMeta:
"Strategy's lock duration is aligned with market opportunities, verifable onchain.",
underlyingTokens: [underlyingAsset],
underlyingTokens: [asset],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pls add pricePerShare

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added, it's convertToAssets(1 share) normalised by the asset decimals

@github-actions

Copy link
Copy Markdown

The d2-finance adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 325 passed, 325 total
Snapshots: 0 total
Time: 0.304 s
Ran all test suites.

Nb of pools: 40
 

Sample pools:
┌─────────┬──────────────────────────────────────────────────────────┬──────────────────┬──────────────┬──────────────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬────────────────────┐
│ (index) │ pool                                                     │ chain            │ project      │ symbol           │ tvlUsd             │ apyBase            │ underlyingTokens                                 │ pricePerShare      │
├─────────┼──────────────────────────────────────────────────────────┼──────────────────┼──────────────┼──────────────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼────────────────────┤
│ 0       │ '0x75288264fdfea8ce68e6d852696ab1ce2f3e5004-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'HYPE++'         │ 11689654.441361787 │ 0.6822913327642695 │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1.482676           │
│ 1       │ '0x3ebb11ba6a5b61c04d1a703ea10728d519945440-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'd2HYPE'         │ 8813295.67300747   │ 20.609062998008675 │ [ '0x5555555555555555555555555555555555555555' ] │ 1.2600397165438684 │
│ 2       │ '0x2406aacbdf8463176deb285adaa81768415b6c7e-base'        │ 'Base'           │ 'd2-finance' │ 'HYPE++'         │ 2590144.954439733  │ 0.6894838599384852 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 1.059363           │
│ 3       │ '0xf44f49e6577b3934f981c6f0629d15154d2606e6-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'hXXI'           │ 2128600.000028254  │ -4.634502413143483 │ [ '0x9FDBdA0A5e284c32744D2f17Ee5c74B284993463' ] │ 1.05660539         │
│ 4       │ '0x195eb4d088f222c982282b5dd495e76dba4bc7d1-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'HYPE++'         │ 1966698.8912614544 │ 0.6900994788035852 │ [ '0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb' ] │ 1.086643           │
│ 5       │ '0x6bf9345b5d6b27b5cbf2e463dc5e0b2afcedc21c-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'dgnUpside'      │ 392973.01529808436 │ 0                  │ [ '0xBe6727B535545C67d5cAa73dEa54865B92CF7907' ] │ 0.9649737655979944 │
│ 6       │ '0x1176c3760af6a1dbaa5bbd0cc6cda8a2ed6b785e-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 88612.04411463962  │ 0                  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1                  │
│ 7       │ '0x57f467c9c4639b066f5a4d676cd8ed7d87c1791b-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 58992.55444366953  │ 0                  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1                  │
│ 8       │ '0x36b933554782b108bb9962ac00c498acbceb706d-berachain'   │ 'Berachain'      │ 'd2-finance' │ 'HyperBERA.USDC' │ 41560.856791669736 │ 0                  │ [ '0x549943e04f40284185054145c6E4e9568C1D3241' ] │ 0.69527            │
│ 9       │ '0x91acd32da9bea6da3751dc12ee0fbe47169349c1-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 33995.70934041973  │ 0                  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1                  │
└─────────┴──────────────────────────────────────────────────────────┴──────────────────┴──────────────┴──────────────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/adaptors/d2-finance/index.js`:
- Around line 139-146: Update the APY calculation near rawNow, rawThen, and
apyBase to detect non-finite converted values, including missing historical
ppsThen data, before calculating or returning APY. When either value is
unavailable, reject the pool or assign the established explicit unavailable
value; do not emit 0% APY. Preserve the existing calculation for finite positive
values.
- Around line 163-166: Update the aggregation around chainPools to use
Promise.allSettled instead of Promise.all, preserving fulfilled results while
isolating rejected chains. Report each rejected chain with its chain identifier
and error, then flatten only the successful results without discarding other
chains.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4fc381fe-bce1-474d-a139-7808c35a74e0

📥 Commits

Reviewing files that changed from the base of the PR and between 1329169 and 1f03401.

📒 Files selected for processing (2)
  • src/adaptors/d2-finance/index.js
  • src/utils/exclude.js
💤 Files with no reviewable changes (1)
  • src/utils/exclude.js

Comment thread src/adaptors/d2-finance/index.js Outdated
Comment thread src/adaptors/d2-finance/index.js Outdated
@0xkr3p

0xkr3p commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

hi @0xshubhs thanks for fast changes, can you take a look at both code rabbit issues pls we should only set apy as 0 if it's genuinely 0 otherwise it can skew avgs over time - thanks

@github-actions

Copy link
Copy Markdown

The d2-finance adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 325 passed, 325 total
Snapshots: 0 total
Time: 0.267 s
Ran all test suites.

Nb of pools: 40
 

Sample pools:
┌─────────┬──────────────────────────────────────────────────────────┬──────────────────┬──────────────┬──────────────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬────────────────────┐
│ (index) │ pool                                                     │ chain            │ project      │ symbol           │ tvlUsd             │ apyBase            │ underlyingTokens                                 │ pricePerShare      │
├─────────┼──────────────────────────────────────────────────────────┼──────────────────┼──────────────┼──────────────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼────────────────────┤
│ 0       │ '0x75288264fdfea8ce68e6d852696ab1ce2f3e5004-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'HYPE++'         │ 11688357.662181206 │ 0.6822913327642695 │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1.482676           │
│ 1       │ '0x3ebb11ba6a5b61c04d1a703ea10728d519945440-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'd2HYPE'         │ 8984718.052100066  │ 20.609062998008675 │ [ '0x5555555555555555555555555555555555555555' ] │ 1.2600397165438684 │
│ 2       │ '0x2406aacbdf8463176deb285adaa81768415b6c7e-base'        │ 'Base'           │ 'd2-finance' │ 'HYPE++'         │ 2589924.9386914335 │ 0.6894838599384852 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 1.059363           │
│ 3       │ '0xf44f49e6577b3934f981c6f0629d15154d2606e6-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'hXXI'           │ 2128229.38568437   │ 0                  │ [ '0x9FDBdA0A5e284c32744D2f17Ee5c74B284993463' ] │ 1.05660539         │
│ 4       │ '0x195eb4d088f222c982282b5dd495e76dba4bc7d1-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'HYPE++'         │ 1967894.5089024813 │ 0.6900994788035852 │ [ '0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb' ] │ 1.086643           │
│ 5       │ '0x6bf9345b5d6b27b5cbf2e463dc5e0b2afcedc21c-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'dgnUpside'      │ 398346.5505729975  │ 0                  │ [ '0xBe6727B535545C67d5cAa73dEa54865B92CF7907' ] │ 0.9649737655979944 │
│ 6       │ '0x1176c3760af6a1dbaa5bbd0cc6cda8a2ed6b785e-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 88602.21403330291  │ 0                  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1                  │
│ 7       │ '0x57f467c9c4639b066f5a4d676cd8ed7d87c1791b-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 58986.010168404966 │ 0                  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1                  │
│ 8       │ '0x36b933554782b108bb9962ac00c498acbceb706d-berachain'   │ 'Berachain'      │ 'd2-finance' │ 'HyperBERA.USDC' │ 40607.19075712032  │ 0                  │ [ '0x549943e04f40284185054145c6E4e9568C1D3241' ] │ 0.69527            │
│ 9       │ '0x91acd32da9bea6da3751dc12ee0fbe47169349c1-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 33991.93806314862  │ 0                  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1                  │
└─────────┴──────────────────────────────────────────────────────────┴──────────────────┴──────────────┴──────────────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@0xshubhs

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

underlyingTokens: [underlyingAsset],
apyBase,
underlyingTokens: [asset],
pricePerShare,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add url per pool

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added - each pool now links to its vault at d2.finance/strategies/

@github-actions

Copy link
Copy Markdown

The d2-finance adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 325 passed, 325 total
Snapshots: 0 total
Time: 0.273 s
Ran all test suites.

Nb of pools: 40
 

Sample pools:
┌─────────┬──────────────────────────────────────────────────────────┬──────────────────┬──────────────┬──────────────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬────────────────────┬────────────────────────────────────────────────────────────────────────────┐
│ (index) │ pool                                                     │ chain            │ project      │ symbol           │ tvlUsd             │ apyBase            │ underlyingTokens                                 │ pricePerShare      │ url                                                                        │
├─────────┼──────────────────────────────────────────────────────────┼──────────────────┼──────────────┼──────────────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼────────────────────┼────────────────────────────────────────────────────────────────────────────┤
│ 0       │ '0x75288264fdfea8ce68e6d852696ab1ce2f3e5004-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'HYPE++'         │ 11688090.828260064 │ 0.6822913327642695 │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1.482676           │ 'https://d2.finance/strategies/0x75288264FDFEA8ce68e6D852696aB1cE2f3E5004' │
│ 1       │ '0x3ebb11ba6a5b61c04d1a703ea10728d519945440-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'd2HYPE'         │ 8999880.225018535  │ 20.609062998008675 │ [ '0x5555555555555555555555555555555555555555' ] │ 1.2600397165438684 │ 'https://d2.finance/strategies/0x3ebb11ba6a5b61c04d1a703ea10728d519945440' │
│ 2       │ '0x2406aacbdf8463176deb285adaa81768415b6c7e-base'        │ 'Base'           │ 'd2-finance' │ 'HYPE++'         │ 2589896.7144024847 │ 0.6894838599384852 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 1.059363           │ 'https://d2.finance/strategies/0x2406aacbdF8463176DeB285AdAa81768415B6c7E' │
│ 3       │ '0xf44f49e6577b3934f981c6f0629d15154d2606e6-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'hXXI'           │ 2129751.4224324785 │ 0                  │ [ '0x9FDBdA0A5e284c32744D2f17Ee5c74B284993463' ] │ 1.05660539         │ 'https://d2.finance/strategies/0xf44f49E6577B3934f981C6f0629d15154d2606E6' │
│ 4       │ '0x195eb4d088f222c982282b5dd495e76dba4bc7d1-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'HYPE++'         │ 1967819.767230412  │ 0.6900994788035852 │ [ '0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb' ] │ 1.086643           │ 'https://d2.finance/strategies/0x195eb4d088f222c982282b5dd495e76dba4bc7d1' │
│ 5       │ '0x6bf9345b5d6b27b5cbf2e463dc5e0b2afcedc21c-hyperliquid' │ 'Hyperliquid L1' │ 'd2-finance' │ 'dgnUpside'      │ 398130.6462703907  │ 0                  │ [ '0xBe6727B535545C67d5cAa73dEa54865B92CF7907' ] │ 0.9649737655979944 │ 'https://d2.finance/strategies/0x6bf9345b5d6b27b5cbf2e463dc5e0b2afcedc21c' │
│ 6       │ '0x1176c3760af6a1dbaa5bbd0cc6cda8a2ed6b785e-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 88600.19133029573  │ 0                  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1                  │ 'https://d2.finance/strategies/0x1176c3760Af6a1dbAa5BBd0Cc6cdA8A2Ed6B785E' │
│ 7       │ '0x57f467c9c4639b066f5a4d676cd8ed7d87c1791b-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 58984.66357473966  │ 0                  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1                  │ 'https://d2.finance/strategies/0x57f467C9c4639B066F5A4D676Cd8Ed7D87C1791b' │
│ 8       │ '0x36b933554782b108bb9962ac00c498acbceb706d-berachain'   │ 'Berachain'      │ 'd2-finance' │ 'HyperBERA.USDC' │ 40596.84509138351  │ 0                  │ [ '0x549943e04f40284185054145c6E4e9568C1D3241' ] │ 0.69527            │ 'https://d2.finance/strategies/0x36b933554782b108bb9962ac00c498acbceb706d' │
│ 9       │ '0x91acd32da9bea6da3751dc12ee0fbe47169349c1-arbitrum'    │ 'Arbitrum'       │ 'd2-finance' │ 'GTxD2'          │ 33991.162060019466 │ 0                  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 1                  │ 'https://d2.finance/strategies/0x91aCd32dA9beA6DA3751dc12Ee0fBe47169349C1' │
└─────────┴──────────────────────────────────────────────────────────┴──────────────────┴──────────────┴──────────────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴────────────────────┴────────────────────────────────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@0xkr3p 0xkr3p left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approved - thanks for the fast changes @0xshubhs

@0xkr3p 0xkr3p merged commit 28320c0 into DefiLlama:master Jul 12, 2026
2 checks passed
@0xshubhs

Copy link
Copy Markdown
Contributor Author

Always ser @0xkr3p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants