fix: vvs-standard returning 0 pools (farms moved to CraftsmanV2 rewarders)#2785
fix: vvs-standard returning 0 pools (farms moved to CraftsmanV2 rewarders)#27850xshubhs wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe vvs-standard adaptor removes its ABI export file and rewrites yield calculation to use VVS farm APIs, subgraph pair metadata, and Craftsman staking multicalls instead of MasterChef and volume-based inputs. ChangesVVS Standard Adaptor Rewrite
Estimated code review effort: 3 (Moderate) | ~25 minutes 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 vvs-standard 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/vvs-standard/index.js`:
- Around line 73-100: Guard the multicall results in vvs-standard/index.js
before using them in the activeFarms.map loop: with permitFailure: true,
wrapperStakes.output[i] and craftsmanBalances.output[i] may be absent or missing
output, so add per-row checks before reading amount or output. Update the logic
around the Promise.all results and the pools mapping so each farm is skipped or
handled safely when its corresponding multicall entry failed, instead of
dereferencing the missing row and throwing.
🪄 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: 645bef24-ad6a-46dd-b1eb-38ed17afb8cc
📒 Files selected for processing (2)
src/adaptors/vvs-standard/abis.jssrc/adaptors/vvs-standard/index.js
💤 Files with no reviewable changes (1)
- src/adaptors/vvs-standard/abis.js
|
The vvs-standard adapter exports pools: Test Suites: 1 passed, 1 total |
|
Guarded the multicall rows in c10c00f so a farm whose call failed gets skipped instead of throwing. Harness still green, 4 pools. |
|
The vvs-standard adapter exports pools: Test Suites: 1 passed, 1 total |
Problem
The vvs-standard adapter silently returns 0 pools. It enumerates the V1 Craftsman (
0xDccd...564bc) and keeps pools withallocPoint > 0, but VVS redirected all V1 emissions about a year ago:totalAllocPointis now 1 and the only pool with a non-zero allocPoint is pid 154, a dummy "vvs deposit token" (VDT) pool. Every LP farm has allocPoint 0, so the filter drops everything.What changed on VVS side
emissionApris 0 for all farms on vvs.finance).0xbc149c62EFe8AFC61728fC58b1b66a0661712e76), which holds the whole V1 position per pool and pays third-party rewarder incentives (FM, CORGIAI, BARA, PACK).api.vvs.finance.Change
Rewrote the adapter to:
/general/api/v1/farms) and APRs (/general/api/info/v1/farm-aprs) from the same API the vvs.finance UI uses, keeping only non-finished farmsuserInfoamount in V1 Craftsman for V2 farms (LPbalanceOfthe Craftsman for any legacy V1 farm), priced via the pair'sreserveUSD/totalSupplyfrom the VVS exchange subgraph (also switched to the currentgraph-v2.cronoslabs.comhost)apyBase= LP fee APR,apyReward= VVS emission APR (currently 0) + active rewarder APRs, with matchingrewardTokensTest
npm run test --adapter=vvs-standardpasses, returning 4 pools that match the vvs.finance/farms UI:Summary by CodeRabbit