Add Theoriq V2 tokenized vault adapter#18509
Conversation
Tracks TVL for the Theoriq V2 vault on Ethereum by summing asset balances across the vault and its four sub-accounts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Changes
Sequence Diagram(s)sequenceDiagram
participant Adapter as Adapter (theoriq-gold-vault)
participant API as DefiLlama API
participant Chain as Ethereum (Vault contracts)
Adapter->>API: tvl(api) -> api.erc4626Sum(calls: VAULTS, tokenAbi:'address:asset', balanceAbi:'uint256:getTotalAssets')
API->>Chain: call vault.asset() for each VAULT (via tokenAbi)
Chain-->>API: returns underlying asset addresses
API->>Chain: call getTotalAssets() for each VAULT (via balanceAbi)
Chain-->>API: returns asset balances per vault
API-->>Adapter: aggregated balances (sum per token)
Adapter-->>Adapter: export { ethereum: { tvl } , doublecounted, methodology }
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 adapter at projects/theoriq-v2 exports TVL: |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The adapter at projects/theoriq-gold-vault exports TVL: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@projects/theoriq-gold-vault/index.js`:
- Around line 21-23: The exported project metadata sets doublecounted: true
without documented cross-protocol overlap; remove the doublecounted property (or
set it to false) in the exported object and update the methodology string if
needed, or if you must keep true, add explicit evidence/comments describing
which other protocol adapters count the same balances and how overlap is
measured; specifically edit the doublecounted key and the methodology text in
the same exported object to either remove the flag or justify it with concrete
overlap details.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a0bffbe0-0a8e-4ed1-9e34-96f4e68ca7d7
📒 Files selected for processing (1)
projects/theoriq-gold-vault/index.js
Vault holds tokens directly without depositing into other protocols, so there is no cross-protocol TVL overlap. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The adapter at projects/theoriq-gold-vault exports TVL: |
|
The adapter at projects/theoriq-gold-vault exports TVL: |
|
The adapter at projects/theoriq-gold-vault exports TVL: |
Summary
0x0F54097295E97cE61736bb9a0a1066cDf3e31C8F)asset()and includes common tokens (ETH, USDC, USDT, WETH)Test plan
node test.js projects/theoriq-v2/index.jspasses locally with ~$47 TVL detected (XAUt, ETH, USDC)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Chores