Add apyee yields adapter#2836
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a non-custodial, multi-chain Apyee adaptor that reads whitelisted ERC-4626 vault metrics, normalizes TVL by token decimals, and exposes pool metadata, APY, price-per-share, and deposit information. ChangesApyee adaptor
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Vaults
participant apy
participant getERC4626Info
Vaults->>apy: Provide configured vaults
apy->>getERC4626Info: Fetch vault metrics concurrently
getERC4626Info-->>apy: Return ERC-4626 metrics
apy-->>apy: Normalize TVL and assemble pool records
🚥 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 apyee adapter exports pools: Test Suites: 1 passed, 1 total |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/adaptors/apyee/index.js (1)
64-65: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueAdd a defensive guard for
r.value.If the shared
getERC4626Infoutility internally catches exceptions and resolves to a falsy value (likenullorundefined) rather than rejecting the Promise, destructuringr.valuewill throw aTypeErrorand crash the adapter. Consider adding a quick falsy check to safely skip empty results.🛡️ Proposed refactor
- if (r.status !== 'fulfilled') continue; + if (r.status !== 'fulfilled' || !r.value) continue; const { tvl, apyBase, pricePerShare } = r.value;🤖 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/apyee/index.js` around lines 64 - 65, Update the fulfilled-result handling near the getERC4626Info results to skip entries when r.value is falsy before destructuring tvl, apyBase, and pricePerShare. Preserve the existing rejection skip and processing behavior for fulfilled results containing a value.
🤖 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.
Nitpick comments:
In `@src/adaptors/apyee/index.js`:
- Around line 64-65: Update the fulfilled-result handling near the
getERC4626Info results to skip entries when r.value is falsy before
destructuring tvl, apyBase, and pricePerShare. Preserve the existing rejection
skip and processing behavior for fulfilled results containing a value.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 547ef756-1d92-48e1-a09c-6cdd8c7587b9
📒 Files selected for processing (1)
src/adaptors/apyee/index.js
Adds a yields adapter for Apyee — a non-custodial multi-chain USDC yield aggregator.
TVL adapter merged in DefiLlama/DefiLlama-Adapters#20115. Protocol slug
apyee(id8243) confirmed viahttps://api.llama.fi/protocols.Pools (5)
0xE46aac58214B963125a3A88541e1DBE56c4eD5f70xeA8FB89F44A1fa47E52354D44E7e6D4682C8529a0x87922c630A980e431fb045A178e53F58d3f07F850x94f89d1E2825d40627CD2aE24Eba8590F675049C0x27DB5a2B203D6bd3C9490E8EA4488B968675f5BfVaults are immutable ERC-4626 (
VaultV2, source-verified on each chain explorer). Each vault routes USDC into a whitelisted set of DeFi lending strategies (Aave V3, Compound V3, Morpho MetaMorpho, Fluid, Venus, Spark).poolMetacarries the tier (Balanced/Aggressive).APY methodology
Uses the shared
getERC4626Infohelper — annualises the 24h change inconvertToAssets(1e17)(i.e. share-price growth). This is inherently net APY:_accrue()hook (deposit / withdraw /setFeeRate).Local run (sanity check):
TVL values match the TVL adapter output at
https://api.llama.fi/protocol/apyee.Decimals
BSC USDC (Binance-Peg) is 18-decimal, others are 6-decimal. Handled explicitly in the
VAULTSconfig; TVL normalises viaunderlyingDecimalsper pool.Audit / security
Soken PASS 91/100 — 4 reports published at https://apyee.com/security. The final residual review (APY-2026-06-002-B) is also published on the auditor's own repository: https://github.com/sokenteam/Soken.io-smart_contract_audits/blob/main/Apyee_Security_Audit_v2.1.3.pdf
Source: https://github.com/coinlive-apyee/apyee-protocol (tag
v2.1.3, commite737779, source-verified on all 4 chain explorers).Summary by CodeRabbit