Skip to content

feat: add Axis sUSDx yield adapter - #2962

Open
axis-guzus wants to merge 1 commit into
DefiLlama:masterfrom
axis-guzus:codex/axis-yield-adaptor
Open

feat: add Axis sUSDx yield adapter#2962
axis-guzus wants to merge 1 commit into
DefiLlama:masterfrom
axis-guzus:codex/axis-yield-adaptor

Conversation

@axis-guzus

@axis-guzus axis-guzus commented Aug 30, 2026

Copy link
Copy Markdown

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.

  • Project slug: axis
  • Protocol ID: 8466
  • sUSDx: 0xEB892628D1E58BC475A6dCB7F5dBC4F591632AA4
  • Underlying USDx: 0xa1fA7777974312f7d801A8880714a218F76233f8

Methodology

The adapter reports one sUSDx pool using on-chain vault state:

  • Validates that asset() returns the canonical USDx contract.
  • Reads totalAssets() for TVL and applies the DefiLlama USDx price for USD denomination.
  • Reads convertToAssets(1 share) at the current block and the block from 24 hours earlier.
  • Calculates realized base APY as ((currentRate / priorRate) ** 365 - 1) * 100.
  • Reports 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=axis

Result: 16/16 tests passed, returning one Ethereum pool with finite TVL, APY, and price-per-share values.

Summary by CodeRabbit

  • New Features
    • Added yield tracking for Axis’s sUSDx vault on Ethereum.
    • Reports the vault’s APY, TVL, USDx pricing, and price-per-share data.
    • Includes validation to prevent reporting invalid vault or pricing data.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 073f1a92-a8eb-4e76-a75a-24359d206703

📥 Commits

Reviewing files that changed from the base of the PR and between 9d8fa6f and f758ffc.

📒 Files selected for processing (1)
  • src/adaptors/axis/index.js

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Added 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.

Changes

Axis yield reporting

Layer / File(s) Summary
Vault yield calculation
src/adaptors/axis/index.js
The new adaptor reads sUSDx vault data, validates USDx as the underlying asset, calculates APY and TVL, validates computed values, and exports the Axis pool configuration.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to f758f

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding the Axis sUSDx yield adapter.
Docstring Coverage ✅ Passed 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…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

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)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

The axis adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 16 passed, 16 total
Snapshots: 0 total
Time: 0.243 s
Ran all test suites.

Nb of pools: 1
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬─────────┬─────────┬──────────────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬──────────────────────────────────────────────┬───────────────────┬───────────────────────┐
│ (index) │ pool                                                  │ chain      │ project │ symbol  │ tvlUsd           │ apyBase            │ pricePerShare      │ underlyingTokens                                 │ token                                        │ isIntrinsicSource │ url                   │
├─────────┼───────────────────────────────────────────────────────┼────────────┼─────────┼─────────┼──────────────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼──────────────────────────────────────────────┼───────────────────┼───────────────────────┤
│ 0       │ '0xeb892628d1e58bc475a6dcb7f5dbc4f591632aa4-ethereum' │ 'Ethereum' │ 'axis'  │ 'sUSDx' │ 34066655.9684731 │ 23.015377460566743 │ 1.0133191673974848 │ [ '0xa1fA7777974312f7d801A8880714a218F76233f8' ] │ '0xEB892628D1E58BC475A6dCB7F5dBC4F591632AA4' │ true              │ 'https://app.axis.to' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴──────────────────────────────────────────────┴───────────────────┴───────────────────────┘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants