sky-lending: add stUSDS (Expert Mode) pool#2789
Conversation
- New pool: SKY staking engine rewards farm 0xB44c2Fb4181D7cb06BdFf34a46FdFE4A259b40Fc (StakingRewards; staked token lsSKY is the engine's 1:1 SKY wrapper, priced via SKY). - farmsAPY generalized: per-farm stake token/symbol/poolMeta/url instead of hardcoded USDS. - sUSDS pools get per-pool urls to the savings widget (ethereum / arbitrumone), replacing the project-level homepage fallback.
- USDS->SPK farm 0x173e314C7635B45322cd8Cb14f44b312e079F3af listed under
sky-lending with the ${address}-${chain} pool id form, alongside the
bare-address row the sparklend adapter owns - mirroring how
spark-savings lists this adapter's sUSDS pools on Arbitrum/Base with
suffixed ids.
- sUSDS on Base (0x5875eEE1...) added to the savings configs (bare
pool id; spark-savings holds the suffixed one).
An active farm with zero staked balance would divide by zero and emit apyReward Infinity; return 0 instead.
📝 WalkthroughWalkthroughUpdates the Sky Lending adaptor to add ChangesSky Lending Adaptor Updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 sky-lending adapter exports pools: Test Suites: 1 passed, 1 total |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/sky-lending/index.js`:
- Around line 572-585: The STUSDS pool object returned from the sky-lending
adaptor is missing the declared confidence value. Update the pool record in the
return array built by the STUSDS block in index.js to include a confidence field
set to 1.0 alongside the existing properties like pool, symbol, tvlUsd, and
apyBase.
🪄 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: d4e0aa05-0968-4552-bf5b-2d3ab7ed7f9f
📒 Files selected for processing (1)
src/adaptors/sky-lending/index.js
| return [ | ||
| { | ||
| pool: STUSDS, | ||
| symbol: 'STUSDS', | ||
| project: 'sky-lending', | ||
| chain: 'ethereum', | ||
| token: STUSDS, | ||
| poolMeta: 'Expert Mode', | ||
| tvlUsd: (totalSupplyRes.output / 1e18) * price, | ||
| apyBase, | ||
| underlyingTokens: [USDS], | ||
| isIntrinsicSource: true, | ||
| url: 'https://app.sky.money/?network=ethereum&widget=expert&expert_module=stusds&flow=supply', | ||
| }, |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Add the declared confidence to the STUSDS pool.
The PR objective says STUSDS TVL is reported with confidence 1.0, but the returned pool object does not include it.
Proposed fix
tvlUsd: (totalSupplyRes.output / 1e18) * price,
apyBase,
+ confidence: 1,
underlyingTokens: [USDS],📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| return [ | |
| { | |
| pool: STUSDS, | |
| symbol: 'STUSDS', | |
| project: 'sky-lending', | |
| chain: 'ethereum', | |
| token: STUSDS, | |
| poolMeta: 'Expert Mode', | |
| tvlUsd: (totalSupplyRes.output / 1e18) * price, | |
| apyBase, | |
| underlyingTokens: [USDS], | |
| isIntrinsicSource: true, | |
| url: 'https://app.sky.money/?network=ethereum&widget=expert&expert_module=stusds&flow=supply', | |
| }, | |
| return [ | |
| { | |
| pool: STUSDS, | |
| symbol: 'STUSDS', | |
| project: 'sky-lending', | |
| chain: 'ethereum', | |
| token: STUSDS, | |
| poolMeta: 'Expert Mode', | |
| tvlUsd: (totalSupplyRes.output / 1e18) * price, | |
| apyBase, | |
| confidence: 1, | |
| underlyingTokens: [USDS], | |
| isIntrinsicSource: true, | |
| url: 'https://app.sky.money/?network=ethereum&widget=expert&expert_module=stusds&flow=supply', | |
| }, |
🤖 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/sky-lending/index.js` around lines 572 - 585, The STUSDS pool
object returned from the sky-lending adaptor is missing the declared confidence
value. Update the pool record in the return array built by the STUSDS block in
index.js to include a confidence field set to 1.0 alongside the existing
properties like pool, symbol, tvlUsd, and apyBase.
|
Not applied — |
Adds the stUSDS pool (Sky's Expert Mode staked-USDS product) to the sky-lending adapter:
str()per-second RAY rate accumulator — same mechanism as the existing sUSDSssr()pathethereum:0x99CD4Ec3f88A45940936F469E4bB72A2A701EEB9, priced with confidence 1.0)Note: stacked on #2782 (which stacks on #2781) since all three touch this adapter — merging in order avoids conflicts. Only the last commit (557f4a3) is new here.
Suite run from repo root: 249/249 passed, 24 pools.
Summary by CodeRabbit
New Features
Bug Fixes