Skip to content

Adding newly launched yValos and yPythagoras tokens on YieldFi#2482

Open
neelra8n wants to merge 10 commits intoDefiLlama:masterfrom
neelra8n:master
Open

Adding newly launched yValos and yPythagoras tokens on YieldFi#2482
neelra8n wants to merge 10 commits intoDefiLlama:masterfrom
neelra8n:master

Conversation

@neelra8n
Copy link
Contributor

@neelra8n neelra8n commented Mar 14, 2026

In this PR, we have added newly launched yValos and yPythagoras

yValos: https://etherscan.io/address/0xd04ae722b3fe56812e13bb212a79cea7c1b08ff0
yPythagoras: https://etherscan.io/address/0x06c2c73f30135c831d010ec7b82d0f32321c4f27

Please update the price feed for these vaults,
Thanks

Summary by CodeRabbit

  • New Features
    • Added support for two new Ethereum-only tokens: yValos and yPYMN, expanding available assets and pools.
    • These tokens are now processed and displayed alongside existing Ethereum pools, increasing asset coverage and allowing balances and yields for these tokens to be queried and shown in the UI.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 14, 2026

📝 Walkthrough

Walkthrough

Adds two Ethereum tokens (yValos, yPYMN) to the YieldFi adaptor by introducing YVALOS_CONTRACTS and YPYMN_CONTRACTS, extending DECIMALS with the new tokens, and invoking their processing inside poolsFunction.

Changes

Cohort / File(s) Summary
YieldFi adaptor — token additions
src/adaptors/yieldfi/index.js
Adds YVALOS_CONTRACTS and YPYMN_CONTRACTS constants, extends DECIMALS with yValos and yPYMN (18), and calls processToken(YVALOS_CONTRACTS[chain], 'yValos', chain) and processToken(YPYMN_CONTRACTS[chain], 'yPYMN', chain) in the Ethereum branch of poolsFunction.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through lines of JavaScript bright,
Two tokens found their place in sight,
Contracts pinned and decimals set,
In YieldFi's field they softly met,
A rabbit nods—this change is right.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding two newly launched tokens (yValos and yPythagoras) to the YieldFi adaptor.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@llamatester
Copy link

The yieldfi adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 177 passed, 177 total
Snapshots: 0 total
Time: 0.328 s
Ran all test suites.

Nb of pools: 29
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────────────┬─────────────────┬───────────┬──────────┬─────────────┬─────────┬──────────────────────────────────┬──────────────────────────────────────────────────┐
│ (index) │ pool                                                       │ chain           │ project   │ symbol   │ tvlUsd      │ apyBase │ url                              │ underlyingTokens                                 │
├─────────┼────────────────────────────────────────────────────────────┼─────────────────┼───────────┼──────────┼─────────────┼─────────┼──────────────────────────────────┼──────────────────────────────────────────────────┤
│ 0       │ '0x19Ebd191f7A24ECE672ba13A302212b5eF7F35cb-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'YUSD'   │ 10696297.29 │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 1       │ '0xdd5eff0756db08bad0ff16b66f88f506e7318894-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'YPRISM' │ 9924015.53  │ 1.02    │ 'https://yield.fi/vaults/yprism' │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 2       │ '0x839e7e610108Cf3DCc9b40329db33b6E6bc9baCE-saga'          │ 'saga'          │ 'yieldfi' │ 'YUSD'   │ 9285345.06  │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ 'coingecko:usd-coin' ]                         │
│ 3       │ '0x2e3C5e514EEf46727DE1FE44618027A9b70D92FC-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'VYUSD'  │ 2779449.19  │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 4       │ '0x704a58f888f18506C9Fc199e53AE220B5fdCaEd8-saga'          │ 'saga'          │ 'yieldfi' │ 'VYUSD'  │ 1101024.34  │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ 'coingecko:usd-coin' ]                         │
│ 5       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-arbitrum'      │ 'arbitrum'      │ 'yieldfi' │ 'VYUSD'  │ 165879.37   │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │
│ 6       │ '0x4772D2e014F9fC3a820C444e3313968e9a5C8121-base'          │ 'base'          │ 'yieldfi' │ 'YUSD'   │ 113863.98   │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 7       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-base'          │ 'base'          │ 'yieldfi' │ 'VYUSD'  │ 91128.85    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 8       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-plume_mainnet' │ 'plume_mainnet' │ 'yieldfi' │ 'VYUSD'  │ 35201.47    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xdddd73f5df1f0dc31373357beac77545dc5a6f3f' ] │
│ 9       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-sonic'         │ 'sonic'         │ 'yieldfi' │ 'VYUSD'  │ 32988.54    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0x29219dd400f2Bf60E5a23d13Be72B486D4038894' ] │
└─────────┴────────────────────────────────────────────────────────────┴─────────────────┴───────────┴──────────┴─────────────┴─────────┴──────────────────────────────────┴──────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/adaptors/yieldfi/index.js`:
- Around line 78-84: Add missing trailing semicolons to the constant
declarations YVALOS_CONTRACTS and YPYTHAGORAS_CONTRACTS to match project style
(same as YHLP_CONTRACTS), and while here, validate the two Ethereum addresses
(0xd04ae722...8ff0 and 0x06c2c73f...4f27) by checking Etherscan/chain data or
official project docs; if they are incorrect or unverified, replace with the
correct mainnet vault addresses or add a TODO comment documenting the
verification step.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 65c3b747-79c7-407c-bb86-698461f7627f

📥 Commits

Reviewing files that changed from the base of the PR and between 2284c76 and 3b06e66.

📒 Files selected for processing (1)
  • src/adaptors/yieldfi/index.js

Comment on lines +78 to +84
const YVALOS_CONTRACTS = {
ethereum: "0xd04ae722b3fe56812e13bb212a79cea7c1b08ff0",
}

const YPYTHAGORAS_CONTRACTS = {
ethereum: "0x06c2c73f30135c831d010ec7b82d0f32321c4f27",
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the contract addresses exist and retrieve basic info
echo "Checking yValos contract..."
curl -s "https://api.etherscan.io/api?module=contract&action=getabi&address=0xd04ae722b3fe56812e13bb212a79cea7c1b08ff0" | jq -r '.message'

echo "Checking yPythagoras contract..."
curl -s "https://api.etherscan.io/api?module=contract&action=getabi&address=0x06c2c73f30135c831d010ec7b82d0f32321c4f27" | jq -r '.message'

Repository: DefiLlama/yield-server

Length of output: 138


🏁 Script executed:

#!/bin/bash
# Check the DECIMALS constant and verify structure
head -20 src/adaptors/yieldfi/index.js | cat -n

# Check if yValos or yPythagoras are in DECIMALS
grep -n "DECIMALS\|yValos\|yPythagoras" src/adaptors/yieldfi/index.js | head -30

# Check the getUnderlying function
sed -n '200,220p' src/adaptors/yieldfi/index.js | cat -n

Repository: DefiLlama/yield-server

Length of output: 1748


🏁 Script executed:

#!/bin/bash
# Check the processToken function implementation
sed -n '220,260p' src/adaptors/yieldfi/index.js | cat -n

# Verify contract addresses look correct (valid hex format)
echo "yValos address check: 0xd04ae722b3fe56812e13bb212a79cea7c1b08ff0"
echo "yPythagoras address check: 0x06c2c73f30135c831d010ec7b82d0f32321c4f27"

# Check what happens when decimals is undefined in getTVL
sed -n '177,190p' src/adaptors/yieldfi/index.js | cat -n

# Look for how tokens without explicit decimals are handled
grep -n "processToken\|getTVL" src/adaptors/yieldfi/index.js | head -20

Repository: DefiLlama/yield-server

Length of output: 3468


🏁 Script executed:

#!/bin/bash
# Check for yPrism and yHLP which were added earlier - do they have DECIMALS entries?
grep -n "yPrism\|yHLP\|YPRISM\|YHLP" src/adaptors/yieldfi/index.js | grep -E "DECIMALS|const"

# Check if there's any test data or config that validates these addresses
find . -name "*yieldfi*" -type f | head -10

# Look for any comments or descriptions in the file about these new tokens
sed -n '70,95p' src/adaptors/yieldfi/index.js | cat -n

Repository: DefiLlama/yield-server

Length of output: 1137


🏁 Script executed:

#!/bin/bash
# Try alternative approach - check if addresses have any code on ethereum mainnet
# We can check the file to see if there are any comments about these addresses

grep -B5 -A2 "YVALOS_CONTRACTS\|YPYTHAGORAS_CONTRACTS" src/adaptors/yieldfi/index.js

# Also check git log to see if there's commit message info
git log --oneline -20 | head -10

# Check if there's a README or CONTRIBUTING guide with info about new tokens
find . -maxdepth 2 -name "README*" -o -name "CONTRIBUTING*" | xargs ls -la 2>/dev/null

Repository: DefiLlama/yield-server

Length of output: 896


Add trailing semicolons for consistency with existing contract declarations.

The new contract constant declarations are missing trailing semicolons, which is inconsistent with the existing style (see YHLP_CONTRACTS at line 77).

🧹 Proposed fix
 const YVALOS_CONTRACTS = {
   ethereum: "0xd04ae722b3fe56812e13bb212a79cea7c1b08ff0",
-}
+};

 const YPYTHAGORAS_CONTRACTS = {
   ethereum: "0x06c2c73f30135c831d010ec7b82d0f32321c4f27",
-}
+};

⚠️ Contract addresses failed Etherscan verification. Confirm that both addresses are valid vault contracts on Ethereum mainnet before merging.

Both contract addresses returned NOTOK when queried against Etherscan's API:

  • 0xd04ae722b3fe56812e13bb212a79cea7c1b08ff0 (yValos)
  • 0x06c2c73f30135c831d010ec7b82d0f32321c4f27 (yPythagoras)

This suggests the addresses may be invalid, unverified, or non-existent on mainnet. These should be validated on-chain (e.g., by checking live transaction data or the official project documentation) to ensure correctness.

📝 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.

Suggested change
const YVALOS_CONTRACTS = {
ethereum: "0xd04ae722b3fe56812e13bb212a79cea7c1b08ff0",
}
const YPYTHAGORAS_CONTRACTS = {
ethereum: "0x06c2c73f30135c831d010ec7b82d0f32321c4f27",
}
const YVALOS_CONTRACTS = {
ethereum: "0xd04ae722b3fe56812e13bb212a79cea7c1b08ff0",
};
const YPYTHAGORAS_CONTRACTS = {
ethereum: "0x06c2c73f30135c831d010ec7b82d0f32321c4f27",
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/adaptors/yieldfi/index.js` around lines 78 - 84, Add missing trailing
semicolons to the constant declarations YVALOS_CONTRACTS and
YPYTHAGORAS_CONTRACTS to match project style (same as YHLP_CONTRACTS), and while
here, validate the two Ethereum addresses (0xd04ae722...8ff0 and
0x06c2c73f...4f27) by checking Etherscan/chain data or official project docs; if
they are incorrect or unverified, replace with the correct mainnet vault
addresses or add a TODO comment documenting the verification step.

cursoragent and others added 2 commits March 18, 2026 05:19
Co-authored-by: Neel Ratn <neelratn.official@gmail.com>
…ts-6f59

Rename YPYTHAGORAS_CONTRACTS to YPYMN_CONTRACTS in yieldfi adapter
@llamatester
Copy link

The yieldfi adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 177 passed, 177 total
Snapshots: 0 total
Time: 0.304 s
Ran all test suites.

Nb of pools: 29
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────────────┬─────────────────┬───────────┬──────────┬─────────────┬─────────┬──────────────────────────────────┬──────────────────────────────────────────────────┐
│ (index) │ pool                                                       │ chain           │ project   │ symbol   │ tvlUsd      │ apyBase │ url                              │ underlyingTokens                                 │
├─────────┼────────────────────────────────────────────────────────────┼─────────────────┼───────────┼──────────┼─────────────┼─────────┼──────────────────────────────────┼──────────────────────────────────────────────────┤
│ 0       │ '0x19Ebd191f7A24ECE672ba13A302212b5eF7F35cb-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'YUSD'   │ 10696297.29 │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 1       │ '0xdd5eff0756db08bad0ff16b66f88f506e7318894-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'YPRISM' │ 9923801.61  │ 0.53    │ 'https://yield.fi/vaults/yprism' │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 2       │ '0x839e7e610108Cf3DCc9b40329db33b6E6bc9baCE-saga'          │ 'saga'          │ 'yieldfi' │ 'YUSD'   │ 9285345.06  │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ 'coingecko:usd-coin' ]                         │
│ 3       │ '0x2e3C5e514EEf46727DE1FE44618027A9b70D92FC-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'VYUSD'  │ 2779151.99  │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 4       │ '0x704a58f888f18506C9Fc199e53AE220B5fdCaEd8-saga'          │ 'saga'          │ 'yieldfi' │ 'VYUSD'  │ 1100906.62  │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ 'coingecko:usd-coin' ]                         │
│ 5       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-arbitrum'      │ 'arbitrum'      │ 'yieldfi' │ 'VYUSD'  │ 165879.37   │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │
│ 6       │ '0x4772D2e014F9fC3a820C444e3313968e9a5C8121-base'          │ 'base'          │ 'yieldfi' │ 'YUSD'   │ 113855.21   │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 7       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-base'          │ 'base'          │ 'yieldfi' │ 'VYUSD'  │ 91128.85    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 8       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-plume_mainnet' │ 'plume_mainnet' │ 'yieldfi' │ 'VYUSD'  │ 35197.71    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xdddd73f5df1f0dc31373357beac77545dc5a6f3f' ] │
│ 9       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-sonic'         │ 'sonic'         │ 'yieldfi' │ 'VYUSD'  │ 32988.54    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0x29219dd400f2Bf60E5a23d13Be72B486D4038894' ] │
└─────────┴────────────────────────────────────────────────────────────┴─────────────────┴───────────┴──────────┴─────────────┴─────────┴──────────────────────────────────┴──────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@llamatester
Copy link

The yieldfi adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 177 passed, 177 total
Snapshots: 0 total
Time: 0.325 s
Ran all test suites.

Nb of pools: 29
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────────────┬─────────────────┬───────────┬──────────┬─────────────┬─────────┬──────────────────────────────────┬──────────────────────────────────────────────────┐
│ (index) │ pool                                                       │ chain           │ project   │ symbol   │ tvlUsd      │ apyBase │ url                              │ underlyingTokens                                 │
├─────────┼────────────────────────────────────────────────────────────┼─────────────────┼───────────┼──────────┼─────────────┼─────────┼──────────────────────────────────┼──────────────────────────────────────────────────┤
│ 0       │ '0x19Ebd191f7A24ECE672ba13A302212b5eF7F35cb-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'YUSD'   │ 10696297.29 │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 1       │ '0xdd5eff0756db08bad0ff16b66f88f506e7318894-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'YPRISM' │ 9923801.61  │ 0.53    │ 'https://yield.fi/vaults/yprism' │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 2       │ '0x839e7e610108Cf3DCc9b40329db33b6E6bc9baCE-saga'          │ 'saga'          │ 'yieldfi' │ 'YUSD'   │ 9285345.06  │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ 'coingecko:usd-coin' ]                         │
│ 3       │ '0x2e3C5e514EEf46727DE1FE44618027A9b70D92FC-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'VYUSD'  │ 2779151.99  │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 4       │ '0x704a58f888f18506C9Fc199e53AE220B5fdCaEd8-saga'          │ 'saga'          │ 'yieldfi' │ 'VYUSD'  │ 1100906.62  │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ 'coingecko:usd-coin' ]                         │
│ 5       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-arbitrum'      │ 'arbitrum'      │ 'yieldfi' │ 'VYUSD'  │ 165879.37   │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │
│ 6       │ '0x4772D2e014F9fC3a820C444e3313968e9a5C8121-base'          │ 'base'          │ 'yieldfi' │ 'YUSD'   │ 113855.21   │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 7       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-base'          │ 'base'          │ 'yieldfi' │ 'VYUSD'  │ 91128.85    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 8       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-plume_mainnet' │ 'plume_mainnet' │ 'yieldfi' │ 'VYUSD'  │ 35197.71    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xdddd73f5df1f0dc31373357beac77545dc5a6f3f' ] │
│ 9       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-sonic'         │ 'sonic'         │ 'yieldfi' │ 'VYUSD'  │ 32988.54    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0x29219dd400f2Bf60E5a23d13Be72B486D4038894' ] │
└─────────┴────────────────────────────────────────────────────────────┴─────────────────┴───────────┴──────────┴─────────────┴─────────┴──────────────────────────────────┴──────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/adaptors/yieldfi/index.js`:
- Around line 292-293: processToken is returning null because APY data is
missing for yValos and yPYMN; update the external API or repository state so
yValos returns a valid APY and yPYMN is registered (or remove yPYMN from
YPYMN_CONTRACTS if the vault isn't ready), and add explicit decimals entries for
these tokens in the DECIMALS constant instead of relying on the 18 default;
specifically, update the API/registry for the vaults referenced by
YVALOS_CONTRACTS and YPYMN_CONTRACTS (or remove the yPYMN contract entry) and
add DECIMALS['yValos'] = <correct_decimals> and DECIMALS['yPYMN'] =
<correct_decimals> if they differ from 18.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0f673588-e2c9-4d39-b29c-b73fb332ecfc

📥 Commits

Reviewing files that changed from the base of the PR and between 3b06e66 and bd50af8.

📒 Files selected for processing (1)
  • src/adaptors/yieldfi/index.js

Comment on lines +292 to +293
processToken(YVALOS_CONTRACTS[chain], 'yValos', chain),
processToken(YPYMN_CONTRACTS[chain], 'yPYMN', chain)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify API endpoints return valid data for the new tokens

echo "Checking yValos API endpoint..."
curl -s "https://gw.yield.fi/vault/api/public/vaults/yvalos" | jq '.data.vault.metrics.apy // "No APY found"'

echo ""
echo "Checking yPYMN API endpoint..."
curl -s "https://gw.yield.fi/vault/api/public/vaults/ypymn" | jq '.data.vault.metrics.apy // "No APY found"'

Repository: DefiLlama/yield-server

Length of output: 146


🏁 Script executed:

cat -n src/adaptors/yieldfi/index.js | head -50

Repository: DefiLlama/yield-server

Length of output: 2343


🏁 Script executed:

rg "DECIMALS|YVALOS_CONTRACTS|YPYMN_CONTRACTS" src/adaptors/yieldfi/index.js -A 5 -B 2

Repository: DefiLlama/yield-server

Length of output: 1187


🏁 Script executed:

rg "fetchLatestAPY" src/adaptors/yieldfi/index.js -A 15

Repository: DefiLlama/yield-server

Length of output: 927


🏁 Script executed:

rg "const processToken" src/adaptors/yieldfi/index.js -A 30

Repository: DefiLlama/yield-server

Length of output: 958


🏁 Script executed:

# Double-check yPYMN API endpoint response structure more carefully
curl -s "https://gw.yield.fi/vault/api/public/vaults/ypymn" | jq '.'

Repository: DefiLlama/yield-server

Length of output: 360


🏁 Script executed:

# Check if getTVL is called with explicit decimals anywhere for new tokens
rg "getTVL.*yValos|getTVL.*yPYMN|YVALOS_CONTRACTS|YPYMN_CONTRACTS" src/adaptors/yieldfi/index.js -B 3 -A 3

Repository: DefiLlama/yield-server

Length of output: 786


Pools for yValos and yPYMN will not be created due to missing APY data.

The processToken function returns null when APY is unavailable (line 242), preventing pool creation. Current status:

  • yValos: API endpoint exists but returns APY = 0, causing pool creation to fail
  • yPYMN: API returns "VAULT_NOT_FOUND" error; vault does not exist in the API

Additionally, neither token has an explicit entry in the DECIMALS constant (lines 6-13), so both will use the default 18 decimals.

Ensure:

  1. yValos vault has valid APY data in the API
  2. yPYMN vault is properly registered in the API (or remove if not ready)
  3. Decimals are explicitly configured if they differ from 18
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/adaptors/yieldfi/index.js` around lines 292 - 293, processToken is
returning null because APY data is missing for yValos and yPYMN; update the
external API or repository state so yValos returns a valid APY and yPYMN is
registered (or remove yPYMN from YPYMN_CONTRACTS if the vault isn't ready), and
add explicit decimals entries for these tokens in the DECIMALS constant instead
of relying on the 18 default; specifically, update the API/registry for the
vaults referenced by YVALOS_CONTRACTS and YPYMN_CONTRACTS (or remove the yPYMN
contract entry) and add DECIMALS['yValos'] = <correct_decimals> and
DECIMALS['yPYMN'] = <correct_decimals> if they differ from 18.

@llamatester
Copy link

The yieldfi adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 177 passed, 177 total
Snapshots: 0 total
Time: 0.301 s
Ran all test suites.

Nb of pools: 29
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────────────┬─────────────────┬───────────┬──────────┬─────────────┬─────────┬──────────────────────────────────┬──────────────────────────────────────────────────┐
│ (index) │ pool                                                       │ chain           │ project   │ symbol   │ tvlUsd      │ apyBase │ url                              │ underlyingTokens                                 │
├─────────┼────────────────────────────────────────────────────────────┼─────────────────┼───────────┼──────────┼─────────────┼─────────┼──────────────────────────────────┼──────────────────────────────────────────────────┤
│ 0       │ '0x19Ebd191f7A24ECE672ba13A302212b5eF7F35cb-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'YUSD'   │ 10696297.29 │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 1       │ '0xdd5eff0756db08bad0ff16b66f88f506e7318894-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'YPRISM' │ 9924865.94  │ 0.5     │ 'https://yield.fi/vaults/yprism' │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 2       │ '0x839e7e610108Cf3DCc9b40329db33b6E6bc9baCE-saga'          │ 'saga'          │ 'yieldfi' │ 'YUSD'   │ 9285345.06  │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ 'coingecko:usd-coin' ]                         │
│ 3       │ '0x2e3C5e514EEf46727DE1FE44618027A9b70D92FC-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'VYUSD'  │ 2779436.1   │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 4       │ '0x704a58f888f18506C9Fc199e53AE220B5fdCaEd8-saga'          │ 'saga'          │ 'yieldfi' │ 'VYUSD'  │ 1101019.16  │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ 'coingecko:usd-coin' ]                         │
│ 5       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-arbitrum'      │ 'arbitrum'      │ 'yieldfi' │ 'VYUSD'  │ 165879.37   │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │
│ 6       │ '0x4772D2e014F9fC3a820C444e3313968e9a5C8121-base'          │ 'base'          │ 'yieldfi' │ 'YUSD'   │ 113855.21   │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 7       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-base'          │ 'base'          │ 'yieldfi' │ 'VYUSD'  │ 91128.85    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 8       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-plume_mainnet' │ 'plume_mainnet' │ 'yieldfi' │ 'VYUSD'  │ 35201.3     │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xdddd73f5df1f0dc31373357beac77545dc5a6f3f' ] │
│ 9       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-sonic'         │ 'sonic'         │ 'yieldfi' │ 'VYUSD'  │ 32988.54    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0x29219dd400f2Bf60E5a23d13Be72B486D4038894' ] │
└─────────┴────────────────────────────────────────────────────────────┴─────────────────┴───────────┴──────────┴─────────────┴─────────┴──────────────────────────────────┴──────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@llamatester
Copy link

The yieldfi adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 177 passed, 177 total
Snapshots: 0 total
Time: 0.268 s
Ran all test suites.

Nb of pools: 29
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────────────┬─────────────────┬───────────┬──────────┬─────────────┬─────────┬──────────────────────────────────┬──────────────────────────────────────────────────┐
│ (index) │ pool                                                       │ chain           │ project   │ symbol   │ tvlUsd      │ apyBase │ url                              │ underlyingTokens                                 │
├─────────┼────────────────────────────────────────────────────────────┼─────────────────┼───────────┼──────────┼─────────────┼─────────┼──────────────────────────────────┼──────────────────────────────────────────────────┤
│ 0       │ '0x19Ebd191f7A24ECE672ba13A302212b5eF7F35cb-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'YUSD'   │ 10696297.29 │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 1       │ '0xdd5eff0756db08bad0ff16b66f88f506e7318894-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'YPRISM' │ 9925368.77  │ 0.48    │ 'https://yield.fi/vaults/yprism' │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 2       │ '0x839e7e610108Cf3DCc9b40329db33b6E6bc9baCE-saga'          │ 'saga'          │ 'yieldfi' │ 'YUSD'   │ 9285345.06  │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ 'coingecko:usd-coin' ]                         │
│ 3       │ '0x2e3C5e514EEf46727DE1FE44618027A9b70D92FC-ethereum'      │ 'ethereum'      │ 'yieldfi' │ 'VYUSD'  │ 2779574.86  │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │
│ 4       │ '0x704a58f888f18506C9Fc199e53AE220B5fdCaEd8-saga'          │ 'saga'          │ 'yieldfi' │ 'VYUSD'  │ 1101074.13  │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ 'coingecko:usd-coin' ]                         │
│ 5       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-arbitrum'      │ 'arbitrum'      │ 'yieldfi' │ 'VYUSD'  │ 165879.37   │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │
│ 6       │ '0x4772D2e014F9fC3a820C444e3313968e9a5C8121-base'          │ 'base'          │ 'yieldfi' │ 'YUSD'   │ 113855.21   │ -0.01   │ 'https://yield.fi/vaults/yusd'   │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 7       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-base'          │ 'base'          │ 'yieldfi' │ 'VYUSD'  │ 91128.85    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │
│ 8       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-plume_mainnet' │ 'plume_mainnet' │ 'yieldfi' │ 'VYUSD'  │ 35203.06    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0xdddd73f5df1f0dc31373357beac77545dc5a6f3f' ] │
│ 9       │ '0xF4F447E6AFa04c9D11Ef0e2fC0d7f19C24Ee55de-sonic'         │ 'sonic'         │ 'yieldfi' │ 'VYUSD'  │ 32988.54    │ -0.01   │ 'https://yield.fi/vaults/vyusd'  │ [ '0x29219dd400f2Bf60E5a23d13Be72B486D4038894' ] │
└─────────┴────────────────────────────────────────────────────────────┴─────────────────┴───────────┴──────────┴─────────────┴─────────┴──────────────────────────────────┴──────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/adaptors/yieldfi/index.js`:
- Around line 13-14: Replace the transposed DECIMALS key `yPYNM` with the
correct `yPYMN` in src/adaptors/yieldfi/index.js so it matches the existing
contract constant YPYMN_CONTRACTS and the `processToken` call that uses
`'yPYMN'`; update the DECIMALS object entry (currently `yPYNM: 18`) to `yPYMN:
18` and scan for any other occurrences of the mis-typed key to ensure
consistency across uses of YPYMN.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8e1cdbc8-033d-480f-a961-cd8fec1643b0

📥 Commits

Reviewing files that changed from the base of the PR and between bd50af8 and 51837c0.

📒 Files selected for processing (1)
  • src/adaptors/yieldfi/index.js

Comment on lines +13 to +14
yPYNM: 18,
yValos: 18
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Typo in DECIMALS key: yPYNM should be yPYMN.

The key yPYNM has the letters N and M transposed. The contract constant is YPYMN_CONTRACTS and the processToken call on line 295 uses 'yPYMN'. This should be consistent for maintainability.

🐛 Proposed fix
 const DECIMALS = {
   yUSD: 18,
   vyUSD: 18,
   yETH: 18,
   vyETH: 18,
   yBTC: 18,
   vyBTC: 18,
-  yPYNM: 18,
+  yPYMN: 18,
   yValos: 18
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/adaptors/yieldfi/index.js` around lines 13 - 14, Replace the transposed
DECIMALS key `yPYNM` with the correct `yPYMN` in src/adaptors/yieldfi/index.js
so it matches the existing contract constant YPYMN_CONTRACTS and the
`processToken` call that uses `'yPYMN'`; update the DECIMALS object entry
(currently `yPYNM: 18`) to `yPYMN: 18` and scan for any other occurrences of the
mis-typed key to ensure consistency across uses of YPYMN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants