Skip to content

Merging updates from defillama#3

Open
iagoLD wants to merge 6011 commits intoWindow-Finance:masterfrom
DefiLlama:master
Open

Merging updates from defillama#3
iagoLD wants to merge 6011 commits intoWindow-Finance:masterfrom
DefiLlama:master

Conversation

@iagoLD
Copy link
Copy Markdown

@iagoLD iagoLD commented Jul 18, 2022

No description provided.

0xkr3p and others added 28 commits February 17, 2026 12:37
* fix: meta pool eth, add new spETH pool

* adjust apy calculation
* fix: reserve protocol

* use token itself as underlying
* add stke sol by sol strategies

* add spl-stake-pool library

* pacakge lock rebase

* new calcSolanaLstApy helper func

* use big int
* feat: add starke-staked-sol

* add guard for apy data
* remove taiko chain and add try / catch

* add console error
* add new field migration

* add token address field

* modify adapters to include tokenAddress

* use eth address for underlying

* change field name from tokenAddress to token

* change adapters to use token field

* remove all token instances from yield query
* feat: add bonk staked sol

* update url
* feat: add dfdv staked sol

* add pool url
* feat: pico staked sol adapter

* update urls

* total supply guard
* feat: add stronghold staked sol adapter

* add guard for total supply
0xkr3p and others added 30 commits April 2, 2026 20:54
* add hastra adapter

* tweaks
* add OnRe adapter

* fix
* add superstate-ustb adapter

* use format chain
chore: 🤖 add NUSD tranches in strata
* remove burned supply

* exclude burn addresses

* update to fetch 13
* add ankr fallback for suspicious data

* update comment

* cleaner

* remove == null pools

* ensure project gets triggered

* remove dead code
* Refactor LP price calculation and APY function

* Enhance fallback APY calculation and add URL

Added fallback chart URL and improved fallback APY logic.

* Update index.js

* Update index.js

* Update index.js

* Update index.js

* Update index.js

* Update index.js

* Update index.js

* Update index.js

* Update index.js

* Update index.js

* Update index.js

Switched to a stable 7d APY as the main metric and added apyBase30d for additional context.

Also improved robustness with retries and block fallback for all on-chain reads.

All checks are passing, ready to merge.

* Update index.js

Now using a stable 7d APY as the main metric with proper error handling and block fallback.

All checks should pass.

* fix: restore compounding APY, single 7d window, cleanup fields

- Restore compound annualization (Math.pow) instead of linear
- Use single 7d window for apyBase, remove redundant apy/apyBase7d
- Fix rewardTokens: null -> []
- Lowercase underlyingTokens addresses

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: kr3p <123127490+0xkr3p@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add surf-liquid yield adapter

Pools:
- USDC/WETH/cbBTC vault pools with Morpho lending APY (after 10% fee)
- SURF staking pool (14% for 6M, 18% for 12M lock)

APY is sourced from Morpho GraphQL API for the underlying vaults
that Surf Liquid deposits into, with 10% performance fee deducted.

* Address reviewer feedback: on-chain APY, pool IDs, remove GraphQL dependency

- Replace Morpho GraphQL API with on-chain share price calculation
  (totalAssets/totalSupply at current vs 1-day-ago blocks)
- Derive staking APR from on-chain contract (apr6Months, apr12Months,
  BASIS_POINTS) instead of hardcoded value
- Change pool IDs to use contract addresses (factory/staking address + chain)
- Remove graphql-request dependency
- Get asset prices from coins.llama.fi instead of Morpho API

* Address reviewer feedback: remove hardcoded fallbacks, guard edge cases

- Remove totalSupply fallback to '1'; skip vaults with zero supply instead
  of fabricating APY values
- Guard BASIS_POINTS against zero before APR division
- Use total TVL (staking + subscriptions) for visibility threshold
- Only add rewardTokens/apyReward when reward APY > 0
- Clean up BigInt comparisons to use 0n literals

* fix pool IDs to use asset address, remove inflated staking TVL, simplify poolMeta

- Pool IDs now use asset address instead of symbol for stability
- Remove CreatorBid subscription TVL from staking pool (different mechanism)
- Simplify poolMeta to '6M / 12M lock' (APR already in apyReward)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* shorten vault pool IDs to surf-{asset}-{chain}

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: kr3p <123127490+0xkr3p@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* add stakeTHENA

* enable timetravel

* enable timetravel

---------

Co-authored-by: root <root@server1.eliteness.network>
* fix(superform): use onchain methods to calculate apy

* protect if no address
* handle merkl missing apr

* fix: add APR fallback chain to prevent reward dropout during Merkl recomputation

Merkl API intermittently returns apr=0 for FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE
campaigns during recomputation windows. This caused DefiLlama to store null
apyReward. Mirrors the backend's getCampaignApr 3-level fallback:
campaign.apr > Opportunity.apr > params.distributionSettings.apr

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add Townsquare

* Add Merkl rewards
* onchain fallback aerodrome-slipstream

* fix
* Add Apyx Protocol yield adapter

* fix: use Promise.all for concurrent calls and multiply by token price

* fix: guard against undefined token price from price API

* rename: apyx-protocol -> apyx

* fix: rename adapter dir to match protocol slug apyx-protocol

The CI test requires the adapter directory name to match a known
DeFiLlama protocol slug. The protocol is listed as "apyx-protocol"
so the directory and project field must match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: remove incorrect token field

The token field is extracted from the pool id, so setting it explicitly
to the wrong value causes issues. Removed to let the system derive it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: kr3p <123127490+0xkr3p@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* update the adapter to use the ekubo campaigns endpoint

* bigint chain ids

* address comments

* address comments from the bot

* address finding

* address another nitpick

* address comments
* add fluxion network adapter

* per pool url
* chore: add api.berachain.com tracking

* berapaw operation name

* fix nan for pools in berapaw
- Fetch pairs and volume data for both Kasplex and Igra
- Uses existing backend API with ?network=igra parameter
- Same 1% fee structure and APY calculation

Igra DEX Factory: 0x21350BcDa9E81731CF4cDE3DbC457e3de2739c01

Co-authored-by: Marko (KaspaCom Bot) <marko@kaspacom.com>
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.