Merging updates from defillama#3
Open
iagoLD wants to merge 6364 commits into
Open
Conversation
Also removes old, unused code.
Co-authored-by: Ardor Baal <ardor.baal@gmail.com>
* Add Arche (arUSD) yield adapter Arche is a yield-bearing stablecoin vault (protocol id 7740 on DefiLlama). Adapter reports a single pool — the arUSD ERC-4626 vault on Ethereum — sourcing TVL from totalAssets() on-chain and APY from the project's public API at https://arche.money/api/apy. * arche: address CodeRabbit feedback - Validate Arche API returns a finite apr; throw on bad input instead of silently falling back to 0 - Use utils.formatAddress for both token and underlyingTokens to keep address normalization consistent * arche: switch APY to on-chain 7d mark-to-market + add pricePerShare Address review feedback from @0xkr3p: - APY now derived from on-chain 7d delta of pricePerShare (no longer depends on arche.money/api/apy). - pricePerShare added to the returned pool object. Mark-to-market detail: arUSD is a Yearn v3 vault holding yvUSDC-1 as its sole strategy. Yearn v3 books strategy yield only when process_report() runs (lazy accounting), so vault.totalAssets() / vault.convertToAssets() lag actual yield between reports. To produce an honest on-chain rate, we mark the strategy holdings to current yvUSDC-1 share value: real_assets = totalIdle + yvUSDC.convertToAssets(yvUSDC.balanceOf(vault)) real_pps = real_assets / vault.totalSupply() Skipped the getERC4626Info helper because (a) it computes 1d APY whereas the request was 7d, and (b) its pricePerShare formula assumes 18-decimal shares — arUSD is 6-decimal.
* fix pancake swap amm * fix coderabbit issues
* fix lagoon (remove price from req) * add isFinite filter for apy
add isIntrinsicSource
* ZealousSwap: Add Igra Network * Suggested fix
* Add Gami Labs yield adapter * Add apyBase: 0 to pass validator, rename Coinshift Leveraged USPC * Re-trigger CI * Use 30d apyBase as primary, fix Silo V2 via totalAssets/totalSupply ratio * Drop apyBase30d from pool output (use internally only for apyBase fallback) * Fix Spectra USDC Vault
add borrowToken where missing
* feat: add Brix wiTRY yield adapter
Adds a yield adapter for wiTRY, the yield-bearing staking wrapper for
Brix's iTRY (a TRY-pegged stablecoin backed by Turkish money market
funds).
APY is computed entirely on-chain, anchored to actual yield-distribution
events rather than fixed-window block sampling:
1. Collect RewardsReceived events from the wiTRY vault (last 21d)
2. end_event = latest distribution
start_event = latest event with ts <= end_event.ts - 7d
3. Sample convertToAssets at (event.ts + getVestingPeriod()) so each
anchor event's distribution is fully reflected — vesting-aware
4. elapsedDays dynamic (typically 7-9)
5. APY = (rateEnd / rateStart) ^ (365 / elapsedDays) - 1
This is robust to multi-day distribution gaps (Turkish public holidays,
weekends) — both anchors freeze symmetrically when no new distribution
arrives, so the displayed APY stays flat through dry periods and the
catch-up distribution at the end of a gap is absorbed without a spike.
The 10% performance fee is deducted by YieldForwarder before yield is
streamed into the wiTRY vault, so convertToAssets growth already
reflects net yield — no fee multiplier needed.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* address review: null apyBase fallback, add pricePerShare
- use null instead of 0 for the <2-events fallback so the empty case
is not ingested into the time-series and doesn't skew smoothing
- add pricePerShare (current convertToAssets(1e18) at latest block)
to the pool object
* add isIntrinsicSource field
---------
Co-authored-by: İsmail Emin Erdoğdu <ismailemin@192.168.1.101>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: ismailemin <ismail@inverter.network>
Co-authored-by: kr3p <123127490+0xkr3p@users.noreply.github.com>
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.