Merging updates from defillama - #3
Open
iagoLD wants to merge 6664 commits into
Open
Conversation
* origami-finance: call origami server vault-apy endpoint * added axios timeout + switch to Promise.allSettled * update to calculate tvl from onchain * throw on unsupported vault_kinds + remove error catching on vaultKindTvl * update to Promise.allSettled in apy()
* accountable: fix NAV vault APY (use annualized APY from API) * accountable: omit null supply/borrow, include point names in rewardTokens * accountable: null apyReward when rewardTokens empty (invariant guard) * ci: re-run accountable adapter checks * fix(accountable): use 7d/30d net APY for apyBase, drop since-inception * fix(accountable): batch + retry per-loan fetches to avoid 503 gaps * revert: drop per-loan batching/retry * fix(accountable): resolve vault + underlying on-chain to fix undefined fields * fix(accountable): drop points from apyReward, surface via poolMeta --------- Co-authored-by: pawel-accountable <282215858+pawel-accountable@users.noreply.github.com>
* feat: add everything pool apy * fix(everything): correct S3 bucket URL * fix: handle copilot finding * feat: use defillama sdk * feat: paginate swap fetching to avoid 1000-result cap * fix: skip farming campaigns that haven't started yet * fix: log swap query failures instead of silently zeroing apyBase * refactor(everything): remove dead fee-fetch code, harden chain fetching * feat: add ethereum pools * fix: remove formatSymbol call * fix: report apyBase as null when swap query fails --------- Co-authored-by: Alfred GAILLARD <a.gaillard@ra2.tech> Co-authored-by: cedric <c.ogire@ra2.tech>
* chore: rename symbols ton -> gram * more
* fix 3jane tvl and apy * use usdc price for tvl
* Add Cube DEX yield adapter * review: drop formatSymbol + harden underlyingTokens Per @0xkr3p review: - adapters no longer use utils.formatSymbol — pass symbol through verbatim - defensive Array.isArray guard on underlyingTokens before emitting --------- Co-authored-by: sepezho <evaaprotocol@gmail.com>
support pro price API routing in adapters
Add protocolId exports to yield adapter
Hipo: fix APY halved by outdated treasury state semantics
Add Atoma vault yield adapter
add royco-v2 yields adapter
feat: add HypeZion Finance yield adapter
Add Rubicon yield adapter (Aquila V2 + CLMM V3, with RUBI LP-staking rewards)
remove holder data
remove volatility matview
Add supply caps
…2813) * feat(metrom-adapter): integrate hold fungible asset campaign types * fix(metrom): remove hold campaigns
…nnet [feat] update sUSDp mainnet address and update function selector
* feat(k613): add xK613 reward apy (supply + borrow) * fix: rewardTokens --------- Co-authored-by: CryptoBetmen <CryptoBetmen@users.noreply.github.com>
* add zensats adapter Adds a yields adapter for ZenSats — ERC-4626 "Zenji" leverage-loop vaults that deposit a collateral asset, borrow USDT against it on LlamaLend, and loop the proceeds back in. Protocol slug zensats (id 7621) confirmed via https://api.llama.fi/protocols. Already listed on the TVL page. Pools (2) Chain Pools TVL Ethereum 2 $11,116 $11,116 total; 1 pool clears the $10k display floor. Both vaults launched 2026-06-13, so balances are still small. Chain Symbol Market TVL apyBase pricePerShare Ethereum WBTC USDT/crvUSD LlamaLend StakeDAO $10,076 3.95% 1.001482 Ethereum wstETH USDT/crvUSD LlamaLend StakeDAO $1,040 3.69% 1.001522 Data source Entirely on-chain, no API. totalAssets() for TVL and convertToAssets(1 share) for share price, batched via multiCall with permitFailure. Both vaults are standard ERC-4626; verified on-chain that asset() matches the configured underlying and that share decimals equal asset decimals (8 for WBTC, 18 for wstETH), which the convertToAssets scaling relies on. Calls use permitFailure, so a pool is dropped when its current share price cannot be read rather than published with apyBase: 0, which would overwrite the last good value with a rate the vault never paid. APY methodology apyBase is the annualized growth of convertToAssets(1 share) over a 7 day window, emitted as apyBase7d as well. The 24h figure is computed but used only as a fallback when the 7d reading is unusable. This follows the geth adapter. Not the 24h window, because these are leverage loops: the share price is collateral-denominated while the debt is stablecoin-denominated, so it marks to market and is not monotonic. The 24h readings measured +2.32% and -2.38% while 7d/14d/30d growth was positive throughout, and a negative apyBase is clamped to 0 downstream, so wstETH would publish 0% instead of 3.69%. Harvests are discrete, so one harvest inside the window visibly moves the number at this size — both vaults were harvested during testing, WBTC going 3.26% -> 3.95% and wstETH 2.94% -> 3.69% off a single ~0.014% step in share price each. No apyReward or rewardTokens; these vaults pay no incentive tokens. Three pools deliberately excluded The TVL registry entry also lists three pmUSD/crvUSD StakeDAO vaults, omitted here for now: WBTC (0x617A6877…) and wstETH (0xbaEc8343…) are both empty, and XAUt (0x7d5281D5…, 0.0359 XAUt) is effectively levered XAU/USD whose share price is driven by the gold price rather than yield (-25% annualized over 30d, +281% over 60d). They are a config-only addition if wanted later. Neither included pool id is claimed by another project, checked against yields.llama.fi/pools. Test npm run test --adapter=zensats PASS ./test.js Test Suites: 1 passed, 1 total Tests: 23 passed, 23 total * zensats: drop pool when current share price is unreadable Calls use permitFailure, so a failed convertToAssets read at the latest block left `current` as NaN. Both growth windows then returned null, apyBase fell through to 0, and pricePerShare was omitted — publishing a rate the vault never paid and overwriting the last good value. Return null for the pool instead. The `?? 0` fallback is kept: past the guard it means the current price is valid but no history is available, which is a genuinely new vault where 0% is truthful. Also drops the now-unreachable `current > 0` check inside growth() and emits pricePerShare unconditionally, since the guard makes it always available. * Make reviewer requested changes * coderabbitai review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.