feat: add Axis sUSDx yield adapter - #2962
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughAdded an Ethereum Axis yield adaptor for the sUSDx ERC-4626 vault. The adaptor calculates base APY, price per share, and USD-denominated TVL from on-chain vault data and the USDx price. ChangesAxis yield reporting
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change adds one localized Axis sUSDx pool integration using read-only on-chain data through the existing adaptor interface. No actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant apy
participant OnChainProvider
participant sUSDxVault
participant USDxPrice
apy->>OnChainProvider: Fetch prior-day block
apy->>sUSDxVault: Read vault asset, decimals, totalAssets, and exchange rate
apy->>USDxPrice: Read USDx price
apy->>apy: Validate values and calculate APY, pricePerShare, and tvlUsd
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. ✨ 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 axis adapter exports pools: Test Suites: 1 passed, 1 total |
Summary
Adds a yield adapter for Axis sUSDx, the share token of the Axis Rewards Vault on Ethereum—a vault whose underlying asset is USDx, Axis’s synthetic dollar.
axis84660xEB892628D1E58BC475A6dCB7F5dBC4F591632AA40xa1fA7777974312f7d801A8880714a218F76233f8Methodology
The adapter reports one sUSDx pool using on-chain vault state:
asset()returns the canonical USDx contract.totalAssets()for TVL and applies the DefiLlama USDx price for USD denomination.convertToAssets(1 share)at the current block and the block from 24 hours earlier.((currentRate / priorRate) ** 365 - 1) * 100.pricePerShare, the sUSDx token address, USDx as the underlying token, and marks sUSDx as an intrinsic yield source.No Axis API or off-chain yield or reward feed is used.
Testing
npm run test --adapter=axisResult: 16/16 tests passed, returning one Ethereum pool with finite TVL, APY, and price-per-share values.
Summary by CodeRabbit