add underlyingTokens to missing pools#2342
Conversation
|
Important Review skippedToo many files! This PR contains 182 files, which is 32 over the limit of 150. You can disable this status message by setting the
✨ 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 aave-v3 adapter exports pools: Test Suites: 1 passed, 1 total |
|
The aave-v3 adapter exports pools: Test Suites: 1 passed, 1 total |
|
The aave-v3 adapter exports pools: Test Suites: 1 passed, 1 total |
|
The aave-v3 adapter exports pools: Test Suites: 1 passed, 1 total |
|
The aave-v3 adapter exports pools: |
|
The aave-v3 adapter exports pools: Test Suites: 1 passed, 1 total |
|
The aave-v3 adapter exports pools: |
|
The aave-v3 adapter exports pools: Test Suites: 1 passed, 1 total |
Summary
Add
underlyingTokensfield to 182 adapters that were missing it. Combined with 4 adapters that already provideunderlyingTokensvia upstream APIs/shared code, effective coverage reaches 821 of 856 adapters (95.9%), with only 33 truly blocked (dead APIs/protocols).The
underlyingTokensfield identifies the actual tokens deposited into each pool, enabling better token-level tracking and price attribution across DefiLlama.Changes by Category
On-Chain Contract Lookups (4 adapters)
Added contract calls to fetch underlying tokens dynamically:
coins(i)from Curve pool contractstoken0()/token1()from LP contractswant()from vault contractstoken()from vault contractsStatic Token Mappings (24 adapters)
Hardcoded token addresses where data isn't available from APIs:
zunami-protocol, return-finance, stlos-liquid-staking, stfil, predy-v5, dexswap, crowdswap, interport-finance, killswitch, nucleus, yel-finance, zkp2p, spice-finance, sovryn-dex, line-token, bolide, vector-finance, wing-finance, stablebase, securo-finance, deri-protocol, umoja-ybtc, francium, pluto
Non-EVM Token Identifiers (17 adapters)
Added chain-native identifiers (not EVM addresses) — IBC denoms, ESDT identifiers, canister IDs, Obyte asset hashes, NEAR account IDs, etc.:
API-Sourced (4 adapters)
Passed through or extracted
underlyingTokensfrom upstream API data:cian-yield-layer, steadefi, zeroliquid, minswap
Address Case Fixes (3 adapters)
Lowercased checksummed addresses that were failing validation:
bifrost-liquid-staking, sommelier, neutra-finance
API/Endpoint Fixes (2 adapters)
Fixed broken data sources alongside adding
underlyingTokens:Straightforward Additions (126 adapters)
Token addresses were already available in the data flow — added
underlyingTokensfield referencing existing variables:aave-v3, abracadabra-spell, accountable, aegis, allbridge-classic, alpaca-finance-2.0, alpaca-leveraged-yield-farming, amnis-finance, amphor, angle, animeswap, anzen-v2, aqua-patina, archimedes-finance, aries-markets, aura, avantis, azuro, b14g, bella-protocol, bfx-(blast-futures), bitu-protocol, cap, cat-in-a-box, cellana-finance, ceto-swap, chainflip, clave, concentrator, cream-lending, crvusd, d2-finance, davos-protocol, deficurrent, ethena-usde, filet-finance, flashstake, folks-finance-lending, fractal-protocol, fuel-staking, fx-protocol, garden, gauntlet, ghost, glif, harmonix-finance, harvest-finance, hashking, hatom-lending, hipo, hubble-exchange, index-coop, infinifi, ionic-protocol, isle-finance, javsphere, jelly, kai-finance, keom-protocol, kokoa-finance, kyberswap-fairflow, landx-finance, liquidswap, lista-cdp, lombard-lbtc, loopring, magik-farm, meme-dollar, meso-finance, metastreet-v2, metavault.trade, midas-rwa, minto, moola-market, morfi, mortgagefi, mover, mu-digital, navi-lending, nodedao, ondo-yield-assets, openeden-tbill, opyn-squeeth, paladin-warlord, pepeteam-swaves, polytrade, project-0, qidao, raft, raydium-amm, realt-tokens, reflexer, renzo, reservoir-protocol, resolv, resupply, rhino.fi, scallop-lend, sdai, sendit, sensi, sft-protocol, sharpe-magnum, singularity-finance, sky-lending, smardex-amm, smardex-usdn, spark-savings, sprinter, stable-jack-v1, stake.link-index, stake.link-liquid, strata-markets, strx-finance, superstate-uscc, swapr-v2, tempus-finance, tenderize-v1, tortuga, unitas, unizen, velodrome-v2, wink, wise-lending, wise-lending-v2, yieldfi, zipswap
Remaining (38 adapters without explicit underlyingTokens in code)
Every adapter in the repo that does not have
underlyingTokensexplicitly in its own code is listed below. 4 already work via upstream/shared code, 2 are special cases, and 32 are truly blocked. All alive APIs have been investigated and fixed where possible.Already Working via Upstream (4 adapters — not blocked)
These adapters already provide
underlyingTokensthrough passthrough APIs or shared code, no changes needed:data.aptin.ioalready includesunderlyingTokens(Aptos type paths)app.fullsail.financealready includesunderlyingTokens(Sui object IDs)beets-dex/utils.tswhich already handlesunderlyingTokensquipuswap-stableswap/helpers.jswhich already handlesunderlyingTokensviacontractAddressDead APIs — adapter cannot fetch data (13)
Dead / Inactive Protocols (8)
Commented Out Code (2)
Pure Passthrough — upstream API doesn't include token data (5)
[]— no poolsExotic Chains / Dead APIs (4)
Special Cases (2)
underlyingTokensnot applicableCoverage
underlyingTokens* Includes 4 adapters (aptin-finance-v2, full-sail, beets-dex-v3, kolibri) that already provide
underlyingTokensvia upstream APIs/shared code — not modified in this PR but confirmed working. Remaining 34 adapters have dead APIs/protocols (32 blocked) + 2 special cases (line-token-rewards N/A, affluent on separate branch). polynomial-liquidity hasunderlyingTokensin code but API is dead (Cloudflare 403) — will work when API comes back.Test plan
npm run test --adapter={name}for all modified adapters where APIs are aliveunderlyingTokensformat matches existing patterns (array of strings, raw addresses)underlyingTokensis an optional fieldunderlyingTokensvia upstream