Add Reflect V1 + V2 TVL adapters (Solana)#19947
Open
kubaplata wants to merge 1 commit into
Open
Conversation
|
Error while running adapter at projects/reflect: |
Contributor
📝 WalkthroughWalkthroughAdds Reflect Solana TVL adapters for V1 and V2, with V1 including an exploit-based cutoff and historical backfill. The Reflect index now defaults to V2 while documenting the two adapter variants. ChangesReflect V1 Adapter
Reflect V2 Adapter
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant api as Adapter API
participant rpc as Solana RPC
participant allium as Allium
participant adaptor as Reflect V1 adapter
api->>adaptor: tvl(api.timestamp)
adaptor->>adaptor: check DEAD_FROM_TS
alt timestamp before cutoff
adaptor->>allium: query solana.assets.balances_daily
allium-->>adaptor: daily receipt balances
adaptor->>api: add underlying mint balances
else timestamp at or after cutoff
adaptor-->>api: return without TVL
end
adaptor->>rpc: fetch Main and StrategyController accounts
rpc-->>adaptor: account data
adaptor->>api: add live deposited_vault_value balances
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Standalone Solana adapters under projects/reflect/, TVL read from on-chain account data and deserialized manually (no new deps): - v2.js: Reflect V2 (program RfLCtMS8AAqwDyK3RckKk5oarhZoNGx1rkz1BoozRq9) - v1.js: Reflect V1 (program rFLctqnUuxLmYsW5r9zNujfJx9hGpnP1csXr9PYwVgX); historical backfill via receipt-token supply (Allium), deadFrom 2026-04-02 (Drift exploit + protocol freeze) - index.js: folder default -> V2 (CI entry point; V1 listed separately from v1.js)
f2826e0 to
bab0190
Compare
|
The adapter at projects/reflect exports TVL: |
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.
Adds two standalone Solana adapters under
projects/reflect/. TVL is read entirely from on-chain account data, deserialized manually (no new npm deps, Solana-only).v2.js— Reflect V2 (current), programRfLCtMS8AAqwDyK3RckKk5oarhZoNGx1rkz1BoozRq9v1.js— Reflect V1 (original), programrFLctqnUuxLmYsW5r9zNujfJx9hGpnP1csXr9PYwVgX; discontinued after the 2026-04-01 Drift exploitEach file maps to its own DefiLlama dashboard (Reflect V1, Reflect V2).
index.js— folder default (re-exports V2) so the repo's folder-level CI can load the adapter; V1 and V2 remain separate dashboards viav1.js/v2.js.Listing info
Token addresses (receipt tokens)
USDvv9Dst5KLrwd61AStBPzLF93MpebsuKDSzJ5xT9i,UsdaiNeTrorKL2n7VP5QJRbV2DPz3Ymonk1sP9iajfU,bondNKkoPV3axmrdfwV93NAbsWLxKkUPDtzaBFy1Lmcusd63SVWcKqLeyNHpmVhZGYAqfE5RHE8jwqjRA2ida2(USDC+),uSDtYeMVYuQwhziLKMpdMz74WPFNytoWLGGiU9SDnZx(USDT+)Methodology
AutoCompound.deposited_vault_value(collateral attributed to holders), valued in the strategy's underlying SPL (USDC/USDT) resolved from theMainaccount SPL registry.solana.assets.balances_daily) valued in the underlying stablecoin.deadFrom: 2026-04-02forces TVL to 0 after the Drift loss + freeze (the on-chain field is frozen/stale). Both adapters aredoublecounted(collateral sits in externally-listed venues).Logo
"Allow edits by maintainers" is enabled.
Summary by CodeRabbit
Summary by CodeRabbit