Conversation
Made-with: Cursor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new adaptor module for the APYX protocol is introduced that computes APY metrics by querying the APYUSD vault and RATE_VIEW contracts. The module processes blockchain data and returns standardized pool information including TVL, APY, and metadata. Changes
Sequence DiagramsequenceDiagram
participant Client
participant APY Function
participant APYUSD Vault
participant RATE_VIEW Contract
Client->>APY Function: Call apy()
APY Function->>APYUSD Vault: Query totalAssets
APYUSD Vault-->>APY Function: totalAssets (raw value)
APY Function->>RATE_VIEW Contract: Query apy
RATE_VIEW Contract-->>APY Function: apy (raw value)
APY Function->>APY Function: Convert to human-readable units<br/>(TVL in USD, base APY)
APY Function->>APY Function: Construct pool object with metadata<br/>(pool ID, chain, project, symbol, etc.)
APY Function-->>Client: Return [poolObject]
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 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)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
Summary
Adding yield tracking for Apyx Protocol's apyUSD vault.
apyUSD is an ERC-4626 vault where users deposit apxUSD and earn yield on the underlying collateral backing apxUSD. Yield is vested linearly over a configurable period.
Pool Details
0x38EEb52F0771140d10c4E9A9a72349A329Fe8a6A(apyUSD)0x98A878b1Cd98131B271883B390f68D2c90674665(apxUSD)ApyUSDRateViewcontract at0xCABa36EDE2C08e16F3602e8688a8bE94c1B4e484Links
Summary by CodeRabbit