Skip to content

Add apyee yields adapter#2836

Open
kimandy7778 wants to merge 2 commits into
DefiLlama:masterfrom
kimandy7778:add-apyee-yields
Open

Add apyee yields adapter#2836
kimandy7778 wants to merge 2 commits into
DefiLlama:masterfrom
kimandy7778:add-apyee-yields

Conversation

@kimandy7778

@kimandy7778 kimandy7778 commented Jul 19, 2026

Copy link
Copy Markdown

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 (id 8243) confirmed via https://api.llama.fi/protocols.

Pools (5)

Chain Tier Vault
Ethereum Balanced 0xE46aac58214B963125a3A88541e1DBE56c4eD5f7
Base Balanced 0xeA8FB89F44A1fa47E52354D44E7e6D4682C8529a
Base Aggressive 0x87922c630A980e431fb045A178e53F58d3f07F85
Arbitrum Balanced 0x94f89d1E2825d40627CD2aE24Eba8590F675049C
BNB Chain Balanced 0x27DB5a2B203D6bd3C9490E8EA4488B968675f5Bf

Vaults 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). poolMeta carries the tier (Balanced / Aggressive).

APY methodology

Uses the shared getERC4626Info helper — annualises the 24h change in convertToAssets(1e17) (i.e. share-price growth). This is inherently net APY:

  • Apyee's 15% streaming performance fee accrues by minting new shares to the treasury on every _accrue() hook (deposit / withdraw / setFeeRate).
  • Those newly minted treasury shares dilute the share pool, which suppresses share-price growth by the same 15%.
  • So the on-chain price-per-share growth already reflects what a user actually receives after fees — no separate subtraction required.
  • No pre-mined rewards, no locked incentives, no boosted values.

Local run (sanity check):

  • Ethereum Balanced — $15,040 TVL, apyBase 3.33%
  • Base Balanced — $520 TVL, apyBase 3.92%
  • Base Aggressive — $595 TVL, apyBase 3.35%
  • Arbitrum Balanced — $529 TVL, apyBase 2.81%
  • BSC Balanced — $550 TVL, apyBase 3.85%

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 VAULTS config; TVL normalises via underlyingDecimals per 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, commit e737779, source-verified on all 4 chain explorers).

Summary by CodeRabbit

  • New Features
    • Added support for tracking Apyee’s non-custodial, multi-chain USDC yield vaults.
    • Vault cards now include key pool metrics such as TVL, base APY, and share price, plus underlying token details and deposit links.
    • Enhanced results handling to tolerate individual vault lookup failures, ensuring available vault data still loads and displays.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7a5e53c0-17ae-4e81-89f2-29580ff0416f

📥 Commits

Reviewing files that changed from the base of the PR and between 005c54d and d232ebe.

📒 Files selected for processing (1)
  • src/adaptors/apyee/index.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/adaptors/apyee/index.js

📝 Walkthrough

Walkthrough

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

Changes

Apyee adaptor

Layer / File(s) Summary
Vault metadata and pool fetch
src/adaptors/apyee/index.js
Defines whitelisted multi-chain USDC vaults, fetches ERC-4626 data concurrently, ignores failed lookups, normalizes TVL, and assembles pool records.
Adaptor export wiring
src/adaptors/apyee/index.js
Exports protocol ID 8243, disables timetravel, wires the apy handler, and provides the adaptor URL.

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main change: adding the Apyee yields adapter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions

Copy link
Copy Markdown

The apyee adapter exports pools:

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

Nb of pools: 4
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬─────────┬────────┬──────────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬──────────────┬───────────────────────────────────┬──────────────────────────────────────────────┐
│ (index) │ pool                                                  │ chain      │ project │ symbol │ tvlUsd       │ apyBase            │ pricePerShare      │ underlyingTokens                                 │ poolMeta     │ url                               │ token                                        │
├─────────┼───────────────────────────────────────────────────────┼────────────┼─────────┼────────┼──────────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼──────────────┼───────────────────────────────────┼──────────────────────────────────────────────┤
│ 0       │ '0xe46aac58214b963125a3a88541e1dbe56c4ed5f7-ethereum' │ 'Ethereum' │ 'apyee' │ 'USDC' │ 15039.768809 │ 3.3336770518486816 │ 1.00055533813      │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │ 'Balanced'   │ 'https://apyee.com/vault/deposit' │ '0xE46aac58214B963125a3A88541e1DBE56c4eD5f7' │
│ 1       │ '0x87922c630a980e431fb045a178e53f58d3f07f85-base'     │ 'Base'     │ 'apyee' │ 'USDC' │ 595.41388    │ 3.348260116786278  │ 1.0006852432600002 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'Aggressive' │ 'https://apyee.com/vault/deposit' │ '0x87922c630A980e431fb045A178e53F58d3f07F85' │
│ 2       │ '0x94f89d1e2825d40627cd2ae24eba8590f675049c-arbitrum' │ 'Arbitrum' │ 'apyee' │ 'USDC' │ 529.335288   │ 2.8052277511288395 │ 1.00063446943      │ [ '0xaf88d065e77c8cC2239327C5EDb3A432268e5831' ] │ 'Balanced'   │ 'https://apyee.com/vault/deposit' │ '0x94f89d1E2825d40627CD2aE24Eba8590F675049C' │
│ 3       │ '0xea8fb89f44a1fa47e52354d44e7e6d4682c8529a-base'     │ 'Base'     │ 'apyee' │ 'USDC' │ 520.374896   │ 3.926734082641218  │ 1.00071079119      │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'Balanced'   │ 'https://apyee.com/vault/deposit' │ '0xeA8FB89F44A1fa47E52354D44E7e6D4682C8529a' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴─────────┴────────┴──────────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴──────────────┴───────────────────────────────────┴──────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/adaptors/apyee/index.js (1)

64-65: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Add a defensive guard for r.value.

If the shared getERC4626Info utility internally catches exceptions and resolves to a falsy value (like null or undefined) rather than rejecting the Promise, destructuring r.value will throw a TypeError and 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9e6eda2 and 005c54d.

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

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.

1 participant