Add VIRTUS Protocol TVL adapter (Base)#18516
Add VIRTUS Protocol TVL adapter (Base)#18516cto-virtus wants to merge 1 commit intoDefiLlama:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a new DeFiLlama adapter module that computes TVL by summing a Uniswap V3-derived TVL and a Uniswap V2-like Changes
Sequence DiagramsequenceDiagram
participant Adapter as Virtus Adapter
participant UV3 as Uniswap V3 TVL Calculator
participant UV2 as Uniswap V2-like TVL Calculator
participant SDK as SDK Utilities
Adapter->>UV3: request V3 TVL (factory, startBlock, event ABI, topic)
UV3-->>Adapter: V3 TVL result
Adapter->>UV2: request V2-like TVL (factory, pool ABIs, core assets, stable pools)
UV2-->>Adapter: V2-like TVL result
Adapter->>SDK: sdk.util.sumChainTvls([V3_TVL, V2_TVL])
SDK-->>Adapter: aggregated TVL
Adapter-->>Adapter: export { misrepresentedTokens: true, base.tvl }
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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/virtus-protocol exports TVL: |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
projects/virtus-protocol/index.js (1)
19-27: Consider adding a shortmethodologyexport.A concise methodology string documenting “Base TVL = CL factory + V2-like factory pools” would improve maintainability and reviewer/operator context.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@projects/virtus-protocol/index.js` around lines 19 - 27, Add a brief methodology export to module.exports describing how TVL is calculated: "Base TVL = CL factory (clTvl.base.tvl) + V2-like factory pools (getUniTVL with factory 0x7F03ae4452192b0E280fB0d4f9c225DDa88C7623)". Update the exported object (module.exports) to include a methodology string field next to misrepresentedTokens and base so reviewers/operators understand that the base TVL sums clTvl.base.tvl and the getUniTVL result using the v2Abis and hasStablePools flag.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@projects/virtus-protocol/index.js`:
- Around line 19-27: Add a brief methodology export to module.exports describing
how TVL is calculated: "Base TVL = CL factory (clTvl.base.tvl) + V2-like factory
pools (getUniTVL with factory 0x7F03ae4452192b0E280fB0d4f9c225DDa88C7623)".
Update the exported object (module.exports) to include a methodology string
field next to misrepresentedTokens and base so reviewers/operators understand
that the base TVL sums clTvl.base.tvl and the getUniTVL result using the v2Abis
and hasStablePools flag.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 26902508-5551-489f-8489-7023a621ca6c
📒 Files selected for processing (1)
projects/virtus-protocol/index.js
7fec068 to
533d087
Compare
|
The adapter at projects/virtus-protocol exports TVL: |
|
Added #18519 |
Adds TVL adapter for VIRTUS Protocol (Aerodrome fork) on Base mainnet.
Uses uniswapV2 helper for basic AMM pools (PoolFactory: 0x7F03ae4452192b0E280fB0d4f9c225DDa88C7623) and uniswapV3 helper for concentrated liquidity pools (CLFactory: 0x0e5Ab24beBdA7e5Bb3961f7E9b3532a83aE86B48).
Website: https://virtus-protocol.com
Twitter: https://x.com/VirtusCEO
Summary by CodeRabbit