Skip to content

Discover Neverland markets from the on-chain registry - #2960

Open
0xCatalyst wants to merge 1 commit into
DefiLlama:masterfrom
0xCatalyst:feat/auto-discovery-pools
Open

Discover Neverland markets from the on-chain registry#2960
0xCatalyst wants to merge 1 commit into
DefiLlama:masterfrom
0xCatalyst:feat/auto-discovery-pools

Conversation

@0xCatalyst

@0xCatalyst 0xCatalyst commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Discovers Neverland lending markets from PoolAddressesProviderRegistry instead of maintaining provider addresses in the adapter. Registered markets now receive their metadata, application route, and borrow-routing group from on-chain configuration, so adding another market no longer requires a yield-server maintenance.

Market discovery

getMarkets loads getAddressesProvidersList, then resolves each provider's getMarketId and getPoolDataProvider. Invalid entries are ignored and each provider's reserve reads remain isolated, while the adapter rejects a completely empty lending result rather than publishing one silently.

Pool metadata

poolMeta now comes from getMarketId. Canonical reserves link to /markets?asset=<symbol>, isolated market IDs derive /isolated/<market> automatically, and routeGroupKey remains the data provider address so borrow routing stays within a market.

Expired streams are still filtered from APY and rewardTokens through the same liveEmissions timestamp, preserving consistent reward metadata.

Summary by CodeRabbit

  • New Features
    • Markets are now discovered automatically from the live protocol registry.
    • Market links and metadata are generated dynamically for isolated markets.
  • Bug Fixes
    • Improved handling of incomplete reward and pricing data to prevent misleading APY results.
    • Unavailable reward data no longer appears as zero-value APY.
  • Reliability
    • Clear errors are now reported when market or lending-pool data cannot be resolved.
    • Borrow APY availability is detected more accurately.

Keep Neverland pool coverage aligned with on-chain configuration and
avoid publishing incomplete market or reward data.

- discovered providers and market metadata through the registry
- isolated bad providers and rejected empty lending output
- derived pool metadata, URLs, and route groups per registered market
- kept reward APYs unresolved when prices or decimals were missing
@coderabbitai

coderabbitai Bot commented Aug 30, 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 Plus

Run ID: 5fb1f758-4216-4ad3-8729-9182a7938071

📥 Commits

Reviewing files that changed from the base of the PR and between 9d8fa6f and ddc0df5.

📒 Files selected for processing (2)
  • src/adaptors/neverland/abi.js
  • src/adaptors/neverland/index.js

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The Neverland adapter now discovers markets through an on-chain addresses-provider registry. It derives market metadata and URLs from market IDs, tolerates decimal lookup failures, validates reward data, and throws when market or lending-pool data is unavailable.

Changes

Neverland adapter

Layer / File(s) Summary
Registry-based market discovery
src/adaptors/neverland/abi.js, src/adaptors/neverland/index.js
The adapter adds provider ABIs and resolves market IDs and pool data providers from the registry. It removes the hardcoded market list and requires resolved market data.
Market output and reward validation
src/adaptors/neverland/index.js
Market metadata and URLs now use marketId. Reward calculations return undefined or null when required price, decimal, or APY data is incomplete.
Lending-pool and APY assembly
src/adaptors/neverland/index.js
The adapter requires lending pools, combines them with veDUST pools, and applies Merkl rewards without filtering unresolved entries.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🔵 Low · up to ddc0d

Market discovery now follows on-chain registry configuration, so registry changes can alter which lending markets and contract data are published or cause the adapter to fail when no valid markets resolve. The change is read-only and isolates individual failures, but the registry’s control and deployment provenance should be explicitly verified before merge.

Suggested reviewers: slasher125

Sequence Diagram(s)

sequenceDiagram
  participant APY
  participant Registry
  participant Provider
  participant MarketData
  APY->>Registry: Resolve provider addresses
  Registry-->>APY: Return provider list
  APY->>Provider: Read market IDs and data providers
  Provider-->>APY: Return market configuration
  APY->>MarketData: Build market and reward data
  MarketData-->>APY: Return lending and veDUST pools
Loading
🚥 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 clearly and concisely describes the main change: discovering Neverland markets from the on-chain registry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

✨ 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

Copy link
Copy Markdown

The neverland adapter exports pools:

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

Nb of pools: 17
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────┬─────────┬─────────────┬────────────────────┬──────────────────────────────────┬────────────────────┬─────────────────────┬────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬───────┬──────────────────────────────────────────────────────┬────────────┬──────────────────────────────────────────────┬──────────────────────────────────────────────┬───────┐
│ (index) │ pool                                               │ chain   │ project     │ symbol             │ poolMeta                         │ tvlUsd             │ apyBase             │ apyReward          │ rewardTokens                                                                                   │ underlyingTokens                                 │ totalSupplyUsd     │ supplyCapUsd       │ totalBorrowUsd     │ availableBorrowUsd │ apyBaseBorrow      │ apyRewardBorrow    │ ltv   │ url                                                  │ borrowable │ borrowToken                                  │ routeGroupKey                                │ token │
├─────────┼────────────────────────────────────────────────────┼─────────┼─────────────┼────────────────────┼──────────────────────────────────┼────────────────────┼─────────────────────┼────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼───────┼──────────────────────────────────────────────────────┼────────────┼──────────────────────────────────────────────┼──────────────────────────────────────────────┼───────┤
│ 0       │ '0xf5a4d774affd6f22b6fe76ce20bb9312f23c8784-monad' │ 'Monad' │ 'neverland' │ 'PT-AUSD-8OCT2026' │ 'Neverland Isolated Pendle AUSD' │ 2417527.3583021425 │ 0                   │ 4.2095097485878235 │ [ '0xAD96C3dffCD6374294e2573A7fBBA96097CC8d7c', '0xD0fd2Cf7F6CEff4F96B1161F5E995D5843326154' ] │ [ '0x9FC74f8Ed616B5BaF52a170caa97d6d3898602d1' ] │ 2417527.3583021425 │ 9941465.426291611  │ 0                  │ 2417527.3583021425 │ 2                  │ 0                  │ 0.915 │ 'https://app.neverland.money/isolated/pendle-ausd'   │ false      │ '0x9FC74f8Ed616B5BaF52a170caa97d6d3898602d1' │ '0xeeb78818c026a3c1b82804627d101e27ce5e60cb' │       │
│ 1       │ '0xacaaa891b30e13d024ab67b6eca9c2ecbd8cf52b-monad' │ 'Monad' │ 'neverland' │ 'earnAUSD'         │ 'Neverland Markets'              │ 1706150.8994285301 │ 0                   │ 1.0511061661825987 │ [ '0xAD96C3dffCD6374294e2573A7fBBA96097CC8d7c', '0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A' ] │ [ '0x103222f020e98Bba0AD9809A011FDF8e6F067496' ] │ 1706150.5367434223 │ 6231006.978974535  │ 0                  │ 1706150.8994285301 │ 20                 │ 0                  │ 0.85  │ 'https://app.neverland.money/markets?asset=earnAUSD' │ false      │ '0x103222f020e98Bba0AD9809A011FDF8e6F067496' │ '0xfd0b6b6f736376f7b99ee989c749007c7757fdba' │       │
│ 2       │ '0x38648958836ea88b368b4ac23b86ad44b0fe7508-monad' │ 'Monad' │ 'neverland' │ 'USDC'             │ 'Neverland Markets'              │ 1705722.0166846397 │ 2.267901795319875   │ 7.501789043315937  │ [ '0xAD96C3dffCD6374294e2573A7fBBA96097CC8d7c', '0xD0fd2Cf7F6CEff4F96B1161F5E995D5843326154' ] │ [ '0x754704Bc059F8C67012fEd69BC8A327a5aafb603' ] │ 3535749.8357082186 │ 89998266.08654714  │ 1831046.2446615128 │ 1705722.0166846397 │ 7.300965794288166  │ 2.287619343413866  │ 0.85  │ 'https://app.neverland.money/markets?asset=USDC'     │ true       │ '0x754704Bc059F8C67012fEd69BC8A327a5aafb603' │ '0xfd0b6b6f736376f7b99ee989c749007c7757fdba' │       │
│ 3       │ '0xc64d73bb8748c6fa7487ace2d0d945b6fbb2ecde-monad' │ 'Monad' │ 'neverland' │ 'shMON'            │ 'Neverland Markets'              │ 1585089.0940030706 │ 0                   │ 1.3741455596323333 │ [ '0xAD96C3dffCD6374294e2573A7fBBA96097CC8d7c' ]                                               │ [ '0x1B68626dCa36c7fE922fD2d55E4f631d962dE19c' ] │ 1585089.0940030706 │ 3007214.6328767547 │ 0                  │ 1585089.0940030706 │ 0                  │ 0                  │ 0.55  │ 'https://app.neverland.money/markets?asset=shMON'    │ false      │ '0x1B68626dCa36c7fE922fD2d55E4f631d962dE19c' │ '0xfd0b6b6f736376f7b99ee989c749007c7757fdba' │       │
│ 4       │ '0x39f901c32b2e0d25ae8deaa1ee115c748f8f6bdf-monad' │ 'Monad' │ 'neverland' │ 'USDT0'            │ 'Neverland Markets'              │ 1511522.7427686013 │ 1.3182092709615172  │ 9.958226303017142  │ [ '0xAD96C3dffCD6374294e2573A7fBBA96097CC8d7c', '0xD0fd2Cf7F6CEff4F96B1161F5E995D5843326154' ] │ [ '0xe7cd86e13AC4309349F30B3435a9d337750fC82D' ] │ 2282348.6706284527 │ 24997199.525261655 │ 771430.5887227643  │ 1511522.7427686013 │ 6.501813728577763  │ 3.2578978867624384 │ 0.85  │ 'https://app.neverland.money/markets?asset=USDT0'    │ true       │ '0xe7cd86e13AC4309349F30B3435a9d337750fC82D' │ '0xfd0b6b6f736376f7b99ee989c749007c7757fdba' │       │
│ 5       │ '0x31f63ae5a96566b93477191778606bebdc4ca66f-monad' │ 'Monad' │ 'neverland' │ 'WETH'             │ 'Neverland Markets'              │ 1041352.2766362671 │ 0.14975096610076075 │ 2.9904917079190985 │ [ '0xAD96C3dffCD6374294e2573A7fBBA96097CC8d7c' ]                                               │ [ '0xEE8c0E9f1BFFb4Eb878d8f15f368A02a35481242' ] │ 1120547.9812917276 │ 7366928.324281485  │ 79224.30413561445  │ 1041352.2766362671 │ 3.5302431076744254 │ 5.287186619907455  │ 0.7   │ 'https://app.neverland.money/markets?asset=WETH'     │ true       │ '0xEE8c0E9f1BFFb4Eb878d8f15f368A02a35481242' │ '0xfd0b6b6f736376f7b99ee989c749007c7757fdba' │       │
│ 6       │ '0xdfc14d336aea9e49113b1356333fd374e646bf85-monad' │ 'Monad' │ 'neverland' │ 'sMON'             │ 'Neverland Markets'              │ 641139.369424369   │ 0                   │ 1.8293156872981453 │ [ '0xAD96C3dffCD6374294e2573A7fBBA96097CC8d7c' ]                                               │ [ '0xA3227C5969757783154C60bF0bC1944180ed81B9' ] │ 641139.369424369   │ 1174738.2945543039 │ 0                  │ 641139.369424369   │ 0                  │ 0                  │ 0.55  │ 'https://app.neverland.money/markets?asset=sMON'     │ false      │ '0xA3227C5969757783154C60bF0bC1944180ed81B9' │ '0xfd0b6b6f736376f7b99ee989c749007c7757fdba' │       │
│ 7       │ '0x34c43684293963c546b0ab6841008a4d3393b9ab-monad' │ 'Monad' │ 'neverland' │ 'WBTC'             │ 'Neverland Markets'              │ 399635.08536117023 │ 0.39709489508770274 │ 4.941742083944181  │ [ '0xAD96C3dffCD6374294e2573A7fBBA96097CC8d7c' ]                                               │ [ '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c' ] │ 474669.16982294153 │ 3902819.968214441  │ 75054.89507840584  │ 399635.08536117023 │ 4.185830632894838  │ 5.580897559842361  │ 0.7   │ 'https://app.neverland.money/markets?asset=WBTC'     │ true       │ '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c' │ '0xfd0b6b6f736376f7b99ee989c749007c7757fdba' │       │
│ 8       │ '0xbb4738d05ad1b3da57a4881bae62ce9bb1eeed6c-monad' │ 'Monad' │ 'neverland' │ 'veDUST'           │                                  │ 368276.49594883027 │                     │ 43.845586484389635 │ [ '0x754704Bc059F8C67012fEd69BC8A327a5aafb603' ]                                               │ [ '0xAD96C3dffCD6374294e2573A7fBBA96097CC8d7c' ] │                    │                    │                    │                    │                    │                    │       │ 'https://app.neverland.money'                        │            │                                              │                                              │ null  │
│ 9       │ '0x7f81779736968836582d31d36274ed82053ad1ae-monad' │ 'Monad' │ 'neverland' │ 'gMON'             │ 'Neverland Markets'              │ 275749.482002618   │ 0                   │ 0.3038074108101664 │ [ '0xAD96C3dffCD6374294e2573A7fBBA96097CC8d7c' ]                                               │ [ '0x8498312A6B3CbD158bf0c93AbdCF29E6e4F55081' ] │ 275749.482002618   │ 436775.04539365007 │ 0                  │ 275749.482002618   │ 0                  │ 0                  │ 0.55  │ 'https://app.neverland.money/markets?asset=gMON'     │ false      │ '0x8498312A6B3CbD158bf0c93AbdCF29E6e4F55081' │ '0xfd0b6b6f736376f7b99ee989c749007c7757fdba' │       │
└─────────┴────────────────────────────────────────────────────┴─────────┴─────────────┴────────────────────┴──────────────────────────────────┴────────────────────┴─────────────────────┴────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴───────┴──────────────────────────────────────────────────────┴────────────┴──────────────────────────────────────────────┴──────────────────────────────────────────────┴───────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

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.

1 participant