feat: add the vault liquid staking adapter#2396
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughA new adapter module for the vSOL liquid staking pool on Solana is introduced. It fetches total supply, current SOL price, and APY data concurrently, validates the inputs, and returns computed TVL and APY metrics for the pool. Changes
Sequence DiagramsequenceDiagram
participant Caller as Caller/Client
participant Adapter as vSOL Adapter
participant OnChain as On-Chain Data
participant PriceAPI as Price API
participant APYData as APY Data Source
Caller->>Adapter: Call apy()
par Concurrent Fetches
Adapter->>OnChain: Fetch vSOL total supply
Adapter->>PriceAPI: Fetch current SOL price
Adapter->>APYData: Fetch latest APY
and
OnChain-->>Adapter: Supply value
PriceAPI-->>Adapter: Price value
APYData-->>Adapter: APY value
end
Adapter->>Adapter: Validate price & APY
Adapter->>Adapter: Convert APY to percentage
Adapter->>Adapter: Compute TVL (supply × price)
Adapter-->>Caller: Return pool array with TVL & APY
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary by CodeRabbit