Add XOXNO Lending yield adapter#2753
Conversation
|
Warning Review limit reached
More reviews will be available in 12 minutes and 31 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new XOXNO lending adaptor is added at ChangesXOXNO Lending Adaptor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Error while running xoxno-lending adapter: Test Suites: 1 failed, 1 total |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/adaptors/xoxno-lending/index.js (1)
34-43: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winConsider reusing shared
utils.keepFiniteto avoid over-filtering.This local filter is stricter than the repository’s shared contract and can exclude valid pools when optional fields are missing.
🤖 Prompt for 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. In `@src/adaptors/xoxno-lending/index.js` around lines 34 - 43, The local keepFinite function is unnecessarily strict and filters out valid pools. Instead of checking all seven fields with every(), use the shared utils.keepFinite utility that already exists in the repository. Replace the local keepFinite function implementation with a call to the shared utils.keepFinite function to align with the repository's standard filtering logic and avoid excluding valid pools when optional fields are missing.
🤖 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/xoxno-lending/index.js`:
- Around line 30-31: The return statement that returns data.markets ?? [] does
not properly validate that markets is actually an array before returning it,
which allows non-array values to be passed through and causes runtime errors
when the result is iterated at line 55. Replace the return statement with a
guard that explicitly checks if data.markets is an array using Array.isArray,
returning the markets array if it passes the check or an empty array otherwise,
to ensure the function always returns a valid array for iteration.
- Around line 21-24: The getMarkets function's fetch call lacks a timeout
mechanism, which can cause the adaptor to hang if upstream services are slow or
unresponsive. Add an AbortSignal with a 5000 millisecond timeout to the fetch
options by including a signal property that uses AbortSignal.timeout(5000) in
the fetch configuration object, similar to the pattern used in
evaa-protocol/getPrices.js.
---
Nitpick comments:
In `@src/adaptors/xoxno-lending/index.js`:
- Around line 34-43: The local keepFinite function is unnecessarily strict and
filters out valid pools. Instead of checking all seven fields with every(), use
the shared utils.keepFinite utility that already exists in the repository.
Replace the local keepFinite function implementation with a call to the shared
utils.keepFinite function to align with the repository's standard filtering
logic and avoid excluding valid pools when optional fields are missing.
🪄 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: 5c9847ba-c602-47ce-a631-4829e1dc30ea
📒 Files selected for processing (1)
src/adaptors/xoxno-lending/index.js
d5aa68c to
906795d
Compare
|
Error while running xoxno-lending adapter: Test Suites: 1 failed, 1 total |
906795d to
18b20e9
Compare
|
Error while running xoxno-lending adapter: Test Suites: 1 failed, 1 total |
18b20e9 to
909e58d
Compare
|
Update: the adapter now exports protocolId |
|
Error while running xoxno-lending adapter: Test Suites: 1 failed, 1 total |
909e58d to
7e7d2a4
Compare
|
Error while running xoxno-lending adapter: Test Suites: 1 failed, 1 total |
Summary
Adds XOXNO Lending Stellar markets to the DefiLlama yield server.
The adapter emits one pool per XOXNO Stellar lending market, including supply APY, borrow APY, utilization, TVL, total supplied, and total borrowed.
Data Source
https://api.xoxno.com/integrations/lending/stellarUser-Agent: dune-analyticsxoxno-lendingThe API export is built from the XOXNO Stellar lending indexer and current market state. It includes the listed markets, current balances, APYs, utilization, and token metadata.
Methodology
tvlUsduses pool reserves / net deposits from the market export.totalSupplyUsduses total supplied market balance.totalBorrowUsduses outstanding borrowed balance.apyBaseuses the market supply APY from the XOXNO export.apyBaseBorrowuses the market borrow APY from the XOXNO export.The adapter is structured so a future MultiversX lending deployment can be added with the same response shape.
Validation
node --check src/adaptors/xoxno-lending/index.jsSummary by CodeRabbit