Skip to content

Merging updates from defillama - #3

Open
iagoLD wants to merge 6671 commits into
Window-Finance:masterfrom
DefiLlama:master
Open

Merging updates from defillama#3
iagoLD wants to merge 6671 commits into
Window-Finance:masterfrom
DefiLlama:master

Conversation

@iagoLD

@iagoLD iagoLD commented Jul 18, 2022

Copy link
Copy Markdown

No description provided.

0xkr3p and others added 28 commits June 16, 2026 08:49
* 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
slasher125 and others added 30 commits July 29, 2026 06:18
…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
* add robinhood

* temp remove berachain until it supported
* feat: add neverland isolated market pools and merkl reward apy

Neverland now runs self-contained isolated markets alongside the canonical
one, and none of their reserves were listed. Separately, every incentivized
reserve already carries an on-chain DUST emission, so the shared Merkl
helper (which only fills a reward field the adapter left empty) was
discarding Neverland's Merkl APR entirely; the merkl adapter cannot pick it
up either, since `neverland` sits on its `protocolsBlacklist`.

Isolated markets:
- Replaced the single hardcoded data provider with a `markets` list, so a
  new market is one entry rather than a copy of the fetch path.
- Enumerated providers explicitly in src/adaptors/neverland/index.js:
  only the canonical provider is registered in the shared
  PoolAddressesProviderRegistry, so isolated ones are not discoverable.
- Tagged isolated pools with `poolMeta` and pointed them at /isolated,
  which takes no per-asset query param.

Merkl rewards:
- Added campaign apr on top of the on-chain apy instead of replacing it.
  No live campaign uses a target-apr distribution type (AAVE_NET_APR,
  AAVE_V4_NET_APR), the case getRewardApr already nets against nativeApr;
  all are MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE or DUTCH_AUCTION with a
  null nativeApr, so they pay alongside the market rate.
- Blanked the reward fields before delegating to addMerklRewardApy so it
  applies unconditionally, then restored the on-chain values. This leans
  on the helper's `!pool.apyReward` guard; if that becomes an `undefined`
  check, Merkl silently stops applying here.
- Skipped zero-apr campaigns, which keeps shMON's points campaign out of
  both apyReward and rewardTokens.

Refactor:
- Sourced aToken and debt addresses from getReserveTokensAddresses rather
  than relying on positional alignment with getAllATokens().
- Took decimals from the reserve config and deduped the price request,
  dropping two redundant round trips; on-chain reads go from roughly nine
  sequential waves to three.
- Dropped src/adaptors/neverland/poolAbi.js for the shared
  ../aave-v3/poolAbi, whose entries are identical and which 14 other
  adapters already use.
- Removed the unused axios import.

* fix: apply stream expiry consistently across neverland rewards
Co-authored-by: pawel-accountable <282215858+pawel-accountable@users.noreply.github.com>
* fix sui adapters

* remove comment

* use graphql instead

* remove redact urls
* fix bluefin spot

* remove fallback and apy7d
* fix xexchange

* add missing query
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.