Discover Neverland markets from the on-chain registry - #2960
Conversation
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
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe 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. ChangesNeverland adapter
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🔵 Low · up to 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: 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
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation 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)
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. Comment |
|
The neverland adapter exports pools: Test Suites: 1 passed, 1 total |
Discovers Neverland lending markets from
PoolAddressesProviderRegistryinstead 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 ayield-servermaintenance.Market discovery
getMarketsloadsgetAddressesProvidersList, then resolves each provider'sgetMarketIdandgetPoolDataProvider. 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
poolMetanow comes fromgetMarketId. Canonical reserves link to/markets?asset=<symbol>, isolated market IDs derive/isolated/<market>automatically, androuteGroupKeyremains the data provider address so borrow routing stays within a market.Expired streams are still filtered from APY and
rewardTokensthrough the sameliveEmissionstimestamp, preserving consistent reward metadata.Summary by CodeRabbit