Skip to content

Nest V1 adapter#2349

Merged
0xkr3p merged 5 commits intoDefiLlama:masterfrom
olecsiuyae:master
Feb 17, 2026
Merged

Nest V1 adapter#2349
0xkr3p merged 5 commits intoDefiLlama:masterfrom
olecsiuyae:master

Conversation

@olecsiuyae
Copy link
Copy Markdown
Contributor

@olecsiuyae olecsiuyae commented Feb 10, 2026

This PR adds adapter for the Nest platform

Summary by CodeRabbit

  • New Features

    • Added Nest v1 pool data source with automatic validation, normalization, and APY calculation.
    • Pool entries now surface APY, reward/underlying tokens, and metadata when available.
    • Adapter exposes a link to the Nest UI and has timetravel disabled.
  • Bug Fixes

    • Malformed or incomplete pool records are filtered out to improve data reliability.

Nest V1 adapter
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 10, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new Nest v1 Node.js adapter that fetches pool data from a backend, validates and normalizes records into the DefiLlama pool shape, filters invalid/zero-tvl entries, and exports apy, url, and timetravel = false.

Changes

Cohort / File(s) Summary
New Nest V1 Adapter
src/adaptors/nest-v1/index.js
Introduces adapter with apy export that fetches pools from BACKEND_POOLS_URL, validates response is an array, maps/normalizes backend pool records (mandatory string fields, numeric tvlUsd > 0), coerces optional numeric fields (apyBase, apyReward) or sets null, normalizes pool, chain, symbol, and outputs DefiLlama-shaped pool objects. Exports apy, url, and timetravel = false.
Manifest / Package metadata
manifest_file, package.json
Minor metadata changes (lines added/removed noted in diff).

Sequence Diagram(s)

sequenceDiagram
  participant Consumer as Consumer
  participant Adapter as Adapter (nest-v1)
  participant Utils as utils.getData
  participant Backend as Backend API

  rect rgba(200,220,255,0.5)
    Consumer->>Adapter: call apy()
    Adapter->>Utils: getData(poolsUrl)
    Utils->>Backend: HTTP GET pools
    Backend-->>Utils: JSON array
    Utils-->>Adapter: return array
    Adapter->>Adapter: mapBackendPoolToDefiLlama(items)
    Adapter-->>Consumer: return filtered normalized pools
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • 0xkr3p

Poem

🐇 I nibble on bytes and hop with glee,

New Nest pools trimmed so neat and free,
I map each field and tidy the rest,
APYs aligned — a rabbit's fest,
Hooray, deploy — now let it be! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Nest V1 adapter' directly and clearly describes the main change: adding a new adapter for the Nest V1 platform to the codebase.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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 and usage tips.

@llamatester
Copy link
Copy Markdown

The nest-v1 adapter exports pools:

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

Nb of pools: 30
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬───────────┬───────────────┬────────────────────┬──────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬───────────┐
│ (index) │ pool                                                  │ chain      │ project   │ symbol        │ tvlUsd             │ apyBase  │ rewardTokens                                     │ underlyingTokens                                                                               │ poolMeta  │
├─────────┼───────────────────────────────────────────────────────┼────────────┼───────────┼───────────────┼────────────────────┼──────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼───────────┤
│ 0       │ '0xa83d60b1a9ca6dd1d0d2d9275c700114f2f3a8d6-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-KHYPE' │ 1879729.3323952495 │ 6.5926   │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0xfd739d4e423301ce9385c1fb8850539d657c296d' ] │ 'V3 pool' │
│ 1       │ '0x45fbf9786cdbde9e940620f4af0eb42b76848d17-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-WHYPE'  │ 596826.1113125236  │ 181.8489 │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0x5555555555555555555555555555555555555555' ] │ 'V3 pool' │
│ 2       │ '0xbe512f5881b85c48d9c17bc5bb2be047d156d696-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-USDC'  │ 257367.17521973996 │ 312.7583 │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0xb88339cb7199b77e23db6e890353e22632ba630f' ] │ 'V3 pool' │
│ 3       │ '0xdfa3bd13024111b84b2d8a3ead6b0f4a18192afb-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-LHYPE' │ 243734.15435622327 │ 2.9251   │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0x5748ae796ae46a4f1348a1693de4b50560485562' ] │ 'V3 pool' │
│ 4       │ '0xcd238eafadb112515910f8d09d94a90ac8c180fe-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-UBTC'  │ 167491.00846784667 │ 101.6936 │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0x9fdbda0a5e284c32744d2f17ee5c74b284993463' ] │ 'V3 pool' │
│ 5       │ '0x9aa281b23341ce69d4b1500367a43cfc42005538-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'NEST-WHYPE'  │ 122194.48203052279 │ 0        │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x07c57e32a3c29d5659bda1d3efc2e7bf004e3035', '0x5555555555555555555555555555555555555555' ] │ 'V2 pool' │
│ 6       │ '0xb09a299e9f7d333420d347eebe0456cb0f8545d5-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-USD₮0'  │ 110818.26513813688 │ 20.8658  │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb' ] │ 'V3 pool' │
│ 7       │ '0xc08fec05f656690e2658ef8082f909e8d6edc727-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-USDC'   │ 95560.80575681702  │ 17.3229  │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0xb88339cb7199b77e23db6e890353e22632ba630f' ] │ 'V3 pool' │
│ 8       │ '0xd73917411c33136b448d12e57b8a734cc601195b-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-BBHLP'  │ 50754.04615379112  │ 135.0146 │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0x4bb19336c973506b9405db586b7aee302a7cbcfc' ] │ 'V3 pool' │
│ 9       │ '0xc8e5ee73b80bb3f6c9b5348771de8217abd412e7-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'KNTQ-WHYPE'  │ 43256.67064135041  │ 135.6823 │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x000000000000780555bd0bca3791f89f9542c2d6', '0x5555555555555555555555555555555555555555' ] │ 'V3 pool' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴───────────┴───────────────┴────────────────────┴──────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴───────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/adaptors/nest-v1/index.js`:
- Around line 14-18: Validate required fields before mapping: ensure pool.pool,
pool.chain, and pool.symbol are present and non-empty (e.g., if any of those are
null/undefined/empty, return null or skip the entry) so you don't call
String(pool.pool) or utils.formatChain/formatSymbol on missing values; also
replace String('nest-v1') with the literal 'nest-v1'. Update the mapping code
that produces the object (the block using pool.pool,
utils.formatChain(pool.chain), and utils.formatSymbol(pool.symbol)) to perform
checks and bail out early for malformed entries to prevent producing strings
like "undefined".

Comment thread src/adaptors/nest-v1/index.js
@llamatester
Copy link
Copy Markdown

The nest-v1 adapter exports pools:

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

Nb of pools: 30
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬───────────┬───────────────┬────────────────────┬──────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬───────────┐
│ (index) │ pool                                                  │ chain      │ project   │ symbol        │ tvlUsd             │ apyBase  │ rewardTokens                                     │ underlyingTokens                                                                               │ poolMeta  │
├─────────┼───────────────────────────────────────────────────────┼────────────┼───────────┼───────────────┼────────────────────┼──────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼───────────┤
│ 0       │ '0xa83d60b1a9ca6dd1d0d2d9275c700114f2f3a8d6-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-KHYPE' │ 1879748.568692688  │ 6.5932   │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0xfd739d4e423301ce9385c1fb8850539d657c296d' ] │ 'V3 pool' │
│ 1       │ '0x45fbf9786cdbde9e940620f4af0eb42b76848d17-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-WHYPE'  │ 595219.7981527132  │ 193.2972 │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0x5555555555555555555555555555555555555555' ] │ 'V3 pool' │
│ 2       │ '0xbe512f5881b85c48d9c17bc5bb2be047d156d696-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-USDC'  │ 257173.21763351068 │ 312.1324 │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0xb88339cb7199b77e23db6e890353e22632ba630f' ] │ 'V3 pool' │
│ 3       │ '0xdfa3bd13024111b84b2d8a3ead6b0f4a18192afb-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-LHYPE' │ 243734.15435622327 │ 2.9267   │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0x5748ae796ae46a4f1348a1693de4b50560485562' ] │ 'V3 pool' │
│ 4       │ '0xcd238eafadb112515910f8d09d94a90ac8c180fe-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-UBTC'  │ 167491.00846784667 │ 101.7441 │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0x9fdbda0a5e284c32744d2f17ee5c74b284993463' ] │ 'V3 pool' │
│ 5       │ '0x9aa281b23341ce69d4b1500367a43cfc42005538-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'NEST-WHYPE'  │ 122456.0812736769  │ 0        │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x07c57e32a3c29d5659bda1d3efc2e7bf004e3035', '0x5555555555555555555555555555555555555555' ] │ 'V2 pool' │
│ 6       │ '0xb09a299e9f7d333420d347eebe0456cb0f8545d5-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-USD₮0'  │ 110734.26267557379 │ 20.8205  │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb' ] │ 'V3 pool' │
│ 7       │ '0xc08fec05f656690e2658ef8082f909e8d6edc727-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-USDC'   │ 95575.70267720638  │ 17.2805  │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0xb88339cb7199b77e23db6e890353e22632ba630f' ] │ 'V3 pool' │
│ 8       │ '0xd73917411c33136b448d12e57b8a734cc601195b-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-BBHLP'  │ 50754.04615379112  │ 134.6534 │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0x4bb19336c973506b9405db586b7aee302a7cbcfc' ] │ 'V3 pool' │
│ 9       │ '0xc8e5ee73b80bb3f6c9b5348771de8217abd412e7-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'KNTQ-WHYPE'  │ 43112.07617329248  │ 136.7496 │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x000000000000780555bd0bca3791f89f9542c2d6', '0x5555555555555555555555555555555555555555' ] │ 'V3 pool' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴───────────┴───────────────┴────────────────────┴──────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴───────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

pool.apyBase === undefined || pool.apyBase === null
? null
: Number(pool.apyBase),
rewardTokens:
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 include apyReward if the pool has reward tokens

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.

Pools on Nest receive emission rewards in NEST token instead of LP fees. We're not sure which category to include it to (rewards or base APY) but Thena (similar protocol) displays similar rewards as Base. LPs don't get rewards in extra tokens or additional yield which is why we left apyReward empty

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.

Looking at the Thena adapter you referenced, it actually separates these
correctly: apyBase is trading fee APY from the hypervisor, apyReward is
masterchef token emissions

For Nest pools:

  • apyBase should be trading fees (may be 0 if pools don't generate fees)
  • apyReward should be NEST emission APY
  • rewardTokens should include the NEST token address

// Your Blaze API helper endpoint (adjust host/port as needed)
const BACKEND_POOLS_URL =
process.env.NEST_DEFI_LLAMA_POOLS_URL ||
'https://blaze.nest.aegas.it/api/defillama/pools';
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 aim to get tvl and calculate apy from onchain using our defillama sdk or subgraphs. are you able refactor this?

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.

No unfortunately - APY is calculated via custom backend solution similar to Merkl that tracks LP activity and applies specific formula based on TVL, liquidity involved, current ranges and other factors. It's simply not possible to reproduce from the contract events only

Comment thread src/adaptors/nest-v1/index.js
Copy link
Copy Markdown
Contributor

@0xkr3p 0xkr3p left a comment

Choose a reason for hiding this comment

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

thanks for the PR @olecsiuyae, I've left a few comments

The V3 APY values appear to be v high, at defillama we typically use much wider ranges for non-stable pairs like +/-30%

@0xkr3p 0xkr3p self-assigned this Feb 11, 2026
@olecsiuyae
Copy link
Copy Markdown
Contributor Author

Hello @0xkr3p, thank you for your review. I have added my responses in the corresponding branches.

Regarding the APY values, we use +-10% range for volatile pools and +-3 ticks for stablecoin pairs. If it's absolutely necessary we can use a wider range for volatile pools

@0xkr3p
Copy link
Copy Markdown
Contributor

0xkr3p commented Feb 12, 2026

Hello @0xkr3p, thank you for your review. I have added my responses in the corresponding branches.

Regarding the APY values, we use +-10% range for volatile pools and +-3 ticks for stablecoin pairs. If it's absolutely necessary we can use a wider range for volatile pools

hey @olecsiuyae, added a comment regarding rewards. Yes, that would be great, thank you!

@llamatester
Copy link
Copy Markdown

The nest-v1 adapter exports pools:

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

Nb of pools: 31
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬───────────┬───────────────┬────────────────────┬─────────┬───────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬───────────┐
│ (index) │ pool                                                  │ chain      │ project   │ symbol        │ tvlUsd             │ apyBase │ apyReward │ rewardTokens                                     │ underlyingTokens                                                                               │ poolMeta  │
├─────────┼───────────────────────────────────────────────────────┼────────────┼───────────┼───────────────┼────────────────────┼─────────┼───────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼───────────┤
│ 0       │ '0xa83d60b1a9ca6dd1d0d2d9275c700114f2f3a8d6-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-KHYPE' │ 2071562.9976347124 │ 0       │ null      │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0xfd739d4e423301ce9385c1fb8850539d657c296d' ] │ 'V3 pool' │
│ 1       │ '0x45fbf9786cdbde9e940620f4af0eb42b76848d17-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-WHYPE'  │ 676220.6922902624  │ 0       │ null      │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0x5555555555555555555555555555555555555555' ] │ 'V3 pool' │
│ 2       │ '0xbe512f5881b85c48d9c17bc5bb2be047d156d696-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-USDC'  │ 303790.11964817694 │ 0       │ null      │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0xb88339cb7199b77e23db6e890353e22632ba630f' ] │ 'V3 pool' │
│ 3       │ '0xdfa3bd13024111b84b2d8a3ead6b0f4a18192afb-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-LHYPE' │ 254392.1966835682  │ 0       │ null      │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0x5748ae796ae46a4f1348a1693de4b50560485562' ] │ 'V3 pool' │
│ 4       │ '0xcd238eafadb112515910f8d09d94a90ac8c180fe-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-UBTC'  │ 178064.72527583025 │ 0       │ null      │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0x9fdbda0a5e284c32744d2f17ee5c74b284993463' ] │ 'V3 pool' │
│ 5       │ '0x9aa281b23341ce69d4b1500367a43cfc42005538-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'NEST-WHYPE'  │ 122231.44994281982 │ 0       │ null      │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x07c57e32a3c29d5659bda1d3efc2e7bf004e3035', '0x5555555555555555555555555555555555555555' ] │ 'V2 pool' │
│ 6       │ '0xc08fec05f656690e2658ef8082f909e8d6edc727-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-USDC'   │ 95575.4669125214   │ 0       │ null      │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0xb88339cb7199b77e23db6e890353e22632ba630f' ] │ 'V3 pool' │
│ 7       │ '0xb09a299e9f7d333420d347eebe0456cb0f8545d5-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-USD₮0'  │ 63956.745008827966 │ 0       │ null      │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb' ] │ 'V3 pool' │
│ 8       │ '0xd73917411c33136b448d12e57b8a734cc601195b-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-BBHLP'  │ 50763.67153745649  │ 0       │ null      │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0x4bb19336c973506b9405db586b7aee302a7cbcfc' ] │ 'V3 pool' │
│ 9       │ '0xc8e5ee73b80bb3f6c9b5348771de8217abd412e7-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'KNTQ-WHYPE'  │ 41555.942819932    │ 0       │ null      │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x000000000000780555bd0bca3791f89f9542c2d6', '0x5555555555555555555555555555555555555555' ] │ 'V3 pool' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴───────────┴───────────────┴────────────────────┴─────────┴───────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴───────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/adaptors/nest-v1/index.js`:
- Around line 29-32: The apyBase field is incorrectly hardcoded to 0 instead of
reading the backend value; change the apyBase mapping (the object that currently
sets apyBase: 0) to mirror the apyReward pattern by reading pool.apyBase and
converting to Number or null when undefined/null (i.e., use the same conditional
logic used for apyReward to set apyBase from pool.apyBase).

Comment thread src/adaptors/nest-v1/index.js Outdated
@olecsiuyae
Copy link
Copy Markdown
Contributor Author

Hi @0xkr3p,

I’ve added the required updates. Please let me know if any additional changes are needed

@llamatester
Copy link
Copy Markdown

The nest-v1 adapter exports pools:

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

Nb of pools: 31
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬───────────┬───────────────┬────────────────────┬─────────┬───────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬───────────┐
│ (index) │ pool                                                  │ chain      │ project   │ symbol        │ tvlUsd             │ apyBase │ apyReward │ rewardTokens                                     │ underlyingTokens                                                                               │ poolMeta  │
├─────────┼───────────────────────────────────────────────────────┼────────────┼───────────┼───────────────┼────────────────────┼─────────┼───────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼───────────┤
│ 0       │ '0xa83d60b1a9ca6dd1d0d2d9275c700114f2f3a8d6-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-KHYPE' │ 2088700.5606947008 │ null    │ 12.4279   │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0xfd739d4e423301ce9385c1fb8850539d657c296d' ] │ 'V3 pool' │
│ 1       │ '0x45fbf9786cdbde9e940620f4af0eb42b76848d17-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-WHYPE'  │ 677014.8965667716  │ null    │ 73.5131   │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0x5555555555555555555555555555555555555555' ] │ 'V3 pool' │
│ 2       │ '0xbe512f5881b85c48d9c17bc5bb2be047d156d696-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-USDC'  │ 304151.3769829414  │ null    │ 80.3419   │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0xb88339cb7199b77e23db6e890353e22632ba630f' ] │ 'V3 pool' │
│ 3       │ '0xdfa3bd13024111b84b2d8a3ead6b0f4a18192afb-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-LHYPE' │ 254392.1966835682  │ null    │ 40.1115   │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0x5748ae796ae46a4f1348a1693de4b50560485562' ] │ 'V3 pool' │
│ 4       │ '0xcd238eafadb112515910f8d09d94a90ac8c180fe-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'WHYPE-UBTC'  │ 178719.24768601218 │ null    │ 44.8976   │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x5555555555555555555555555555555555555555', '0x9fdbda0a5e284c32744d2f17ee5c74b284993463' ] │ 'V3 pool' │
│ 5       │ '0x9aa281b23341ce69d4b1500367a43cfc42005538-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'NEST-WHYPE'  │ 123156.22736015037 │ null    │ 6.9726    │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x07c57e32a3c29d5659bda1d3efc2e7bf004e3035', '0x5555555555555555555555555555555555555555' ] │ 'V2 pool' │
│ 6       │ '0xc08fec05f656690e2658ef8082f909e8d6edc727-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-USDC'   │ 95551.1218595709   │ null    │ 6.8062    │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0xb88339cb7199b77e23db6e890353e22632ba630f' ] │ 'V3 pool' │
│ 7       │ '0xb09a299e9f7d333420d347eebe0456cb0f8545d5-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-USD₮0'  │ 63954.81379921057  │ null    │ 116.7818  │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb' ] │ 'V3 pool' │
│ 8       │ '0xd73917411c33136b448d12e57b8a734cc601195b-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'USDH-BBHLP'  │ 50763.67153745649  │ null    │ 30.3925   │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x111111a1a0667d36bd57c0a9f569b98057111111', '0x4bb19336c973506b9405db586b7aee302a7cbcfc' ] │ 'V3 pool' │
│ 9       │ '0xc8e5ee73b80bb3f6c9b5348771de8217abd412e7-hyperevm' │ 'Hyperevm' │ 'nest-v1' │ 'KNTQ-WHYPE'  │ 41986.876519091755 │ null    │ 175.0656  │ [ '0x07c57E32a3C29D5659bda1d3EFC2E7BF004E3035' ] │ [ '0x000000000000780555bd0bca3791f89f9542c2d6', '0x5555555555555555555555555555555555555555' ] │ 'V3 pool' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴───────────┴───────────────┴────────────────────┴─────────┴───────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴───────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@0xkr3p
Copy link
Copy Markdown
Contributor

0xkr3p commented Feb 13, 2026

Hi @0xkr3p,

I’ve added the required updates. Please let me know if any additional changes are needed

Thanks @olecsiuyae, can you include the fee in the pool meta instead of V3 pool, other than that everything looks good!

@olecsiuyae
Copy link
Copy Markdown
Contributor Author

Hi @0xkr3p,

We’ve added the required changes to our backend. Pool metadata now includes the fee instead of the pool type.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/adaptors/nest-v1/index.js (1)

29-34: Number() on a non-numeric string silently produces NaN — consider guarding.

If the backend ever returns a non-numeric string for apyBase or apyReward (e.g. "N/A"), Number(...) yields NaN, which will propagate into DefiLlama's data pipeline. A quick isFinite guard keeps it consistent with the tvlUsd handling above.

Also, the apyBase ternary (lines 29-31) is indented differently from the apyReward ternary (lines 32-34).

Proposed fix
-    apyBase:  pool.apyBase === undefined || pool.apyBase === null
-    ? null
-    : Number(pool.apyBase),
-    apyReward: pool.apyReward === undefined || pool.apyReward === null
+    apyBase: pool.apyBase == null
+      ? null
+      : Number.isFinite(Number(pool.apyBase)) ? Number(pool.apyBase) : null,
+    apyReward: pool.apyReward == null
       ? null
-      : Number(pool.apyReward),
+      : Number.isFinite(Number(pool.apyReward)) ? Number(pool.apyReward) : null,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/adaptors/nest-v1/index.js` around lines 29 - 34, The apyBase and
apyReward mappings use Number(pool.apyBase) / Number(pool.apyReward) which will
produce NaN for non-numeric strings; update both mappings to mirror the tvlUsd
handling by checking that pool.apyBase and pool.apyReward are not null/undefined
and that Number(...) is finite (e.g., via isFinite(Number(...))) before
assigning the numeric value, otherwise set null; also normalize the ternary
indentation so both apyBase and apyReward use the same formatting style as each
other.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/adaptors/nest-v1/index.js`:
- Around line 29-34: The apyBase and apyReward mappings use Number(pool.apyBase)
/ Number(pool.apyReward) which will produce NaN for non-numeric strings; update
both mappings to mirror the tvlUsd handling by checking that pool.apyBase and
pool.apyReward are not null/undefined and that Number(...) is finite (e.g., via
isFinite(Number(...))) before assigning the numeric value, otherwise set null;
also normalize the ternary indentation so both apyBase and apyReward use the
same formatting style as each other.

@0xkr3p 0xkr3p merged commit fe75d69 into DefiLlama:master Feb 17, 2026
2 checks passed
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.

4 participants