Merging updates from defillama - #3
Open
iagoLD wants to merge 6719 commits into
Open
Conversation
Add Monad for Pendle
fix: correct token symbol for native pool yield, new app url
…#2688) * feat: add Kerne Protocol yield adapter (kLP delta-neutral WETH vault on Base) Pool listed: KerneVault (ERC-4626) on Base, share symbol kLP, asset WETH. Strategy: delta-neutral basis trade (Lido stETH long, Hyperliquid perp short). Contract verified on Basescan: https://basescan.org/address/0x8005bc7A86AD904C20fd62788ABED7546c1cF2AC#code Data sources (no protocol API dependency in the critical path): - TVL : KerneVault.totalAssets() × WETH price (coins.llama.fi) - APY : KerneVault.projectedAPY() (governance-configured, basis points) - asset() sanity-checked = WETH Sets token (vault address) and isIntrinsicSource (yield-bearing primitive) per the current adaptor schema. Supersedes PR #2254 which was closed pending a TVL adapter; that prerequisite is opened in parallel against DefiLlama-Adapters. Local test output (npm run test --adapter=kerne-protocol equivalent): pool: 0x8005bc7a86ad904c20fd62788abed7546c1cf2ac-base chain: Base project: kerne-protocol symbol: kLP tvlUsd: 189.58 apyBase: 12 apyReward: 0 isIntrinsicSource: true * fix: rename adapter dir to 'kerne' to match DefiLlama-assigned slug * fix: track skUSD (staked synthetic dollar) instead of the pre-v2 WETH vault * fix: guard expectedAPY with a finite number check before computing apyBase * feat(kerne): compute APY on-chain from skUSD share price (review #2688) Addresses @0xkr3p review: - APY now derived on-chain from skUSD ERC-4626 share-price growth over a trailing 24h window (drops the kerne.fi/api dependency) - add pricePerShare - remove apyReward and rewardTokens (no token incentives) - remove poolMeta - export protocolId 7873 to match the kerne slug (new harness check) A genesis guard reports par price-per-share and 0 realized APY while the vault is below the seed threshold, so no transient pre-seed share-price noise is published; both values flow from on-chain share price once seeded. Pool stays below the public display threshold until then. * refactor(kerne): use shared price/block helpers instead of axios Replace the adapter's direct axios calls to coins.llama.fi with the shared utils helpers (getPriceApiData, getBlocksByTime), matching the rest of yield-server and routing through the pro-api endpoint when DL_API_KEY is set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: enerzy17 <liamlakevold@gmail.com> Co-authored-by: kr3p <123127490+0xkr3p@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
* Add tizi yield adapter * fix: change tizi/index.js * feat: add intrinsic source and search token override in tizi adapter * fix: handle errors and validate API responses in tizi adapter
#2758) * fix(strata-markets): add PRIME pools, fix stablecoin flags, update URL - Add Figure/PRIME market (srPRIME + jrPRIME yield pools) CDO: 0xff408b4843CDD4a33CD49EB2aBe057fE8D71C234 srPRIME: 0x35bFF778d3fc53a561486BF28e761428499232Eb jrPRIME: 0xF4C91F24E20EE8ed5eda905E501A1136334C2F27 Underlying: USDC (verified on-chain via asset()) - Fix stablecoin flag for mHYPER pools (underlying is USDC) - Fix stablecoin flag for mM1-USD pools (underlying is USD-pegged) - Fix stablecoin flag for PRIME pools (underlying is USDC) - Add poolMeta 'fixed-rate' for srUSDat (senior APY is set by keeper, constant by design) - Update url from strata.money to strata.markets (canonical domain) * fix: move stablecoin detection to checkStablecoin.js Per reviewer feedback: - Remove stablecoin: true from adapter overrides (was causing test failures) - Add project-level rule in checkStablecoin.js for strata-markets (all pools have USD-pegged underlyings: USDe, NUSD, USDC, mM1-USD, USDat)
* feat(neutral-trade): add adapter for Neutral Trade bundle vaults * feat(neutral-trade): point adapter at api.neutral.trade * feat(neutral-trade): declare absent share token explicitly * neutral-trade: use fixed APY window and vault metadata * neutral-trade: include visible Autopilot vault
…d of publishing 0% apy (#2889) * securitize funds: skip the pool when the 30d oracle read fails instead of publishing 0% apy * securitize funds: guard the current oracle price too, a zero read published a clipped 0% apy
* pricing fix * add retry
TVL came from vault.totalValue(), which counts the OToken the vault's own AMO strategies mint into Curve/Aerodrome pools -- protocol-owned liquidity, not depositor funds. That put superOETHb at ~$29M against ~$19M of holder-owned backing. It now reads Origin's protocolDailyStatDetails.tvl, which is already net of it. That figure is deliberately not Origin Ether's protocol TVL on DefiLlama, which on Base additionally drops the bridged wOETH strategy because that backing is already counted on Ethereum. Netting it out is right for protocol TVL and wrong for pool size: the bridged wOETH is precisely what backs superOETHb holders' balances. APY is now measured on-chain from rebasingCreditsPerTokenHighres over 7d, in a helper shared with the other origin-* adaptors. The squid's apy7DayAvg reads ~0.2pp low because it includes the in-progress day, annualised over a full day regardless of how much of it has elapsed. superOETHp is dropped -- the Plume product is retired. Smaller fixes: apyBase rather than apy, a per-pool url (there was none), and hardcoded chain names instead of capitalizing the sdk chain key.
The adapter reads vault.apy7dAfterFees, but api.neutral.trade/public/yields returns apy7d, apy30d, apy90d and apyInception. No vault has an apy7dAfterFees key, so toPct() gets undefined and returns null for both apyBase and apyBase7d. utils.keepFinite then requires at least one finite apyBase/apyReward/apy, so every pool is dropped and the adapter publishes nothing. Running the adapter on master returns 0 pools. After the change it returns all 12 vaults, $12.44M TVL. apy7d is the realized return net of fees. Checked it against the pool's own price per share on two vaults: HFT Multi-factor went 2.725121 to 2.740686 over 7 days, an implied 0.3458 against apy7d 0.34575, and Neutral Autopilot went 1.375248 to 1.376615, implied 0.0532 against apy7d 0.05317. The API also declares rateUnit "decimal", so the existing *100 is right. Some vaults currently report a negative 7d APY. Those are real drawdowns in the published price per share, not a units problem.
…2892) TVL was totalSupply x price, which counts the OUSD the vault's own Curve AMO minted into the pool -- protocol-owned liquidity, not depositor funds. It runs ~11% above the backing that belongs to holders. It now reads Origin's protocolDailyStatDetails.tvl, which is already net of it, converted out of the row's ETH denomination through rateETH so a dollar product is not valued through the ETH price. APY is now measured on-chain from rebasingCreditsPerTokenHighres over 7d, via a helper shared with the other origin-* adaptors (added here as origin-ether/otokenApy.js -- identical to the copy in the origin-ether and origin-sonic branches, so whichever lands first, the rest apply cleanly). The squid's apy7DayAvg reads ~0.2pp low because it includes the in-progress day, annualised over a full day regardless of how much of it has elapsed. underlyingTokens listed USDT and DAI, which the vault no longer holds; USDC is its only collateral asset today. An empty stats result previously threw a TypeError on row.tvl -- it now returns no pool for that run. Smaller fixes: apyBase rather than apy, and the pool url pointed at originprotocol.eth.limo rather than the app route the live product page links to.
* feat: add DorkFi yield adapter (Algorand + Voi Network) Reports supply and borrow APY for all 47 DorkFi lending markets across two chains and four pools. Pools: Algorand: 3333688282 (Pool A), 3345940978 (Pool B) Voi: 47139778 (Pool A), 47139781 (Pool B) APY computed from the protocol's kinked utilization curve: borrow APY = borrowRate + utilization × slope supply APY = borrow APY × utilization × (1 − reserveFactor) Markets include ALGO, USDC, goBTC, goETH, WBTC, WETH, LINK, SOL, USDT, VOI, UNIT, WAD, aUSDC, POW, tALGO, FINITE, FOLKS, COOP, GOLD$ and more. Data sourced from DorkFi API (dorkfi-api.nautilus.sh). * fix: add DorkFi underlying tokens * fix: address DorkFi yield review comments * dorkfi: drop per-pool poolMeta and url, format with prettier poolMeta was "Pool <appId>", an internal app identifier; the per-pool url duplicated the module-level export. The rest of the diff is prettier formatting only, with no behavioural change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * dorkfi: apply deposit/borrow indices to scaled balances totalScaledDeposits/totalScaledBorrows are index-scaled figures; the current balance is scaled * index / 1e18. computeRates and getUsdValues used the raw scaled numbers, which understates utilization on every market carrying debt -- by up to 6.4% -- because borrows accrue on a faster index than deposits. Confirmed against DorkFi's own analytics TVL: tvl / (indexedDeposits * price) is exactly 1e-12 for every market, while the raw figure drifts by precisely the depositIndex. Utilization feeds apyBase, apyBaseBorrow, totalBorrowUsd and tvlUsd, so all four were off. Indices are read defensively: a missing, zero or non-finite index falls back to 1.0 rather than zeroing the market. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: kr3p <123127490+0xkr3p@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: hastra, add ethereum * remove fallback * group into getMultipleAccounts * add auto w api
* origin-arm: list every ARM, with on-chain TVL and APY The adaptor listed only the Lido ARM. It now enumerates all five live ARMs (~$8.8M) from Origin's squid -- there is no on-chain registry to discover them from -- and reads every number on-chain or from Merkl. TVL is totalAssets(), the net value backing the shares: it nets out the pending withdrawal queue and includes assets parked in the ARM's lending market, so it is the complete pool size. The previous balanceOf sum missed both. APY is the growth of convertToAssets(1e18) over a trailing 30d window, replacing Origin's per-ARM REST endpoint, which only ever covered the Lido ARM. 30d rather than something shorter because ARM yield arrives in lumps: over 14d the OS ARM reads 0% and the Ethena ARM swings by 2pp. ARMs younger than the window, or recently reseeded, fall back to 14/7/3d. A share-price move above 0.5%/day is treated as a seeding event rather than yield -- the USDC ARM's price doubled overnight when it was funded out of its dust seed, which annualises to 7.1e9%. Merkl incentives now come through the shared merkl helper as apyReward, and the figure is reported as apyBase rather than apy. A /block response without a height throws instead of silently falling back to the latest block, which would make both ends of the window the same sample and report exactly 0%. The wound down OS ARM is excluded. * origin-arm: report pricePerShare, fix apyBase to a 7d window Review feedback on #2891: one time window for every ARM instead of a 30d window with shorter fallbacks, and expose the share price. The share price read that already backed the APY now also feeds pricePerShare, scaled out of the liquidity asset's decimals. Dropping the fallback ladder means an ARM younger than 7d, or one carrying a seeding jump, is left out until the event ages past the window.
* feat(symbiotic): add yield adapter for V1 and V2 vaults * fix(symbiotic): address yield adapter review * fix(symbiotic): restore 30-day reward window * fix(symbiotic): omit inactive v1 vaults
remove search token override
Co-authored-by: pawel-accountable <282215858+pawel-accountable@users.noreply.github.com>
The phUSD staking contract has been migrated from PhlimboEA (V2) to PhlimboV3 at 0x8D3A8E3ba43DEb8C7e2110DF437a92243523b6ca. All staked positions were moved across as part of the migration; V2 is wound down and mint-revoked, so its totalStaked no longer reflects live staking. The V3 contract exposes the same totalStaked / desiredAPYBps / rewardPerSecond views, so only the address constant changes. Co-authored-by: Justin <12531162+gititGoro@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Add Genesis Vault staking pool to StakeWise yields adaptor Adds the Genesis Vault (the protocol's main public vault) alongside the existing osETH pool, using the public StakeWise V3 subgraph for vault APY and total assets. Genesis TVL nets out the osETH minted against the vault, which the osETH pool already counts (~$195M today), so the pool reports only non-osETH-backed stake. The subgraph exposes minted shares per allocator only, so they are paged over with a bounded id cursor; if the pages run out the pool is dropped rather than reported with an understated deduction. Also fixes the osETH pool pricing its supply with the ETH price (osETH is an appreciating token trading above ETH), guards an empty AvgRewardPerSecondUpdated window that produced a NaN apy, and surfaces subgraph errors instead of dropping them silently. * Drop the Genesis pool instead of flooring a negative TVL to zero --------- Co-authored-by: Mike Diamond <kadyr@stakewise.io>
* Add Agua yield adapter (protocol id 8351) Adds yields for the existing Agua protocol (slug: agua). One pool per ERC-4626 vault, starting with the Global Carry Vault (aguaUSDCgc) on Ethereum. TVL from totalAssets() priced via coins.llama.fi; apyBase is the annualized 7-day share-price growth from convertToAssets() at the current block vs the block ~7 days ago. Structured around a vault config array so future vaults are a one-line addition. * agua: address review feedback - point url at the vault deposit page on the Reservoir app - add pricePerShare - apyBase falls back to null instead of 0 when history is unavailable - use utils.getBlocksByTime instead of a hardcoded coins.llama.fi call
stakewise rename
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.