fix(snowbl-capital): migrate to new vaults (USDC/ETH/BTC)#2744
fix(snowbl-capital): migrate to new vaults (USDC/ETH/BTC)#2744estebgonza wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 1 minute and 40 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)
📝 WalkthroughWalkthroughThe Snowbl Capital adaptor is expanded from a single hardcoded USDC vault to three ERC-4626 vaults (USDC, WETH, cbBTC) on Base. A ChangesSnowbl Capital Multi-Vault Expansion
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
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/snowbl-capital/index.js`:
- Around line 42-49: Add a validation check immediately after retrieving the
price from pricesByAddress using the lowercase underlyingToken address. If the
price is undefined or null, either skip processing the current vault (continue
to next iteration) or return early from the function. Only proceed to compute
the tvlUsd value if the price is confirmed to exist and is a valid number,
preventing NaN values from being calculated and propagated downstream.
🪄 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: 78887a21-2fdd-4969-966e-8966d3c938c0
📒 Files selected for processing (1)
src/adaptors/snowbl-capital/index.js
4cc10c9 to
9eae7d5
Compare
|
hey |
9eae7d5 to
2b5e875
Compare
The previous single USDC vault (sSnowbl, 0xd61b…06e8) was retired after a contract migration. Return one pool per new Base ERC-4626 vault, each with its own underlying decimals and USD price: - sUSD -> USDC (6 decimals) - sETH -> WETH (18 decimals) - sBTC -> cbBTC (8 decimals)
2b5e875 to
84fae34
Compare
Snowbl Capital migrated its on-chain contracts. The previous single USDC vault
sSnowbl(0xd61b…06e8) is retired.This returns one pool per new Base ERC-4626 vault, each with its own underlying decimals and USD price:
0x0e1a8354e10057092ecb7218b784c0c21710db910xffa67bd20e656f1c7873525df81728e9d26c8ee20xf423393e84ca810e1955a7806d1cd84d18099809Verified locally against Base mainnet — the adapter returns 3 pools with correct TVL and price-per-share.
Summary by CodeRabbit
New Features
Improvements