Skip to content

MidasRWA: add new addresses#2568

Merged
0xkr3p merged 3 commits into
DefiLlama:masterfrom
midas-apps:master
Apr 29, 2026
Merged

MidasRWA: add new addresses#2568
0xkr3p merged 3 commits into
DefiLlama:masterfrom
midas-apps:master

Conversation

@dmytro-horbatenko
Copy link
Copy Markdown
Contributor

@dmytro-horbatenko dmytro-horbatenko commented Apr 8, 2026

Summary by CodeRabbit

  • New Features

    • Enabled XRP oracle support and added ETH oracle.
    • Added 12 new networks and many new asset deployments (mRE7, mEVUSD, mHyperETH, mHyperBTC, mevBTC, etc.).
    • Standardized chain names for several networks for clearer display.
  • Bug Fixes

    • Resilient token data fetching: chain failures are skipped with warnings so other chains continue.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

📝 Walkthrough

Walkthrough

Enabled and expanded on-chain oracle/contract configurations and defensive multicall handling: addresses.js adds many per-chain contract entries and activates previously commented oracles; fetchTokenData now catches per-chain multicall failures; index.js uses formatted chain names; utils.formatChain recognizes three new chain identifiers.

Changes

Cohort / File(s) Summary
Addresses configuration
src/adaptors/midas-rwa/addresses.js
Activated BASE_ASSET_ORACLES.ETH and XRP. Extended contractAddresses.ethereum and contractAddresses.base with new assets (e.g., mEVUSD, mHyperETH, mHyperBTC, mRE7, etc.). Added many new per-chain blocks (arbitrum, plume_mainnet, etlk, rsk, katana, xrplevm, bsc, monad, plasma, 0g, tac, optimism) with address, dataFeed, url, and some denomination fields; removed previously commented xrplevm block.
Multicall error handling
src/adaptors/midas-rwa/fetchTokenData.js
Catches exceptions from per-chain fetchCurrentData(chain, tokens), logs a warning identifying the skipped chain and error, and returns an empty result for that chain so other chains continue processing.
Pool output chain formatting
src/adaptors/midas-rwa/index.js
Uses utils.formatChain(chain) when populating the chain field on returned pool records instead of raw chain identifiers.
Chain name mappings
src/adaptors/utils.js
formatChain now maps xrplevm, etlk, and rsk to formatted names (XRPL EVM, Etherlink, Rootstock) in addition to existing mappings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through files with a twitch and grin,
I woke the XRP and let new chains in,
Multicalls now shrug and let the rest run free,
Names polished bright from chain to marquee,
A little rabbit dance for every added key.

🚥 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 'MidasRWA: add new addresses' directly and accurately summarizes the main change—adding new oracle/contract configurations and addresses across multiple chains to the MidasRWA adaptor.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/adaptors/midas-rwa/addresses.js`:
- Around line 105-108: The mHyperBTC entry in
src/adaptors/midas-rwa/addresses.js is missing a denomination and will default
to 'USD'; update the mHyperBTC object (the entry named mHyperBTC with keys
address, dataFeed, url) to include the denomination 'BTC' (matching the
BTC-denominated product entries referenced elsewhere) so tokenHelpers.js won't
treat it as USD-quoted.
- Around line 162-165: The mEVUSD entry uses the token address (matches
ethereum.mMEV.address) as its dataFeed, so update the mEVUSD.dataFeed value to
the correct oracle/feed contract address (not the ERC20 token) using
getAddress('...') so fetchCurrentData -> getDataInBase18 receives the actual
oracle; verify the replaced address is the canonical Base oracle for mEVUSD and
that fetchCurrentData (with permitFailure: true) then returns valid data.
- Around line 14-18: fetchCurrentData is passing adaptor chain keys directly
into sdk.api.abi.multiCall causing unsupported chains (etherlink, katana,
xrplevm, monad, plasma, 0g, tac) to silently fail; add a canonical chain alias
mapping (e.g., map "etherlink" -> "etlk", and for chains with no SDK alias
explicitly skip or map to a supported fallback) and validate/translate the chain
key before calling sdk.api.abi.multiCall and any base-price resolution (e.g.,
the bsc.mXRP path); update the mapping lookup used in fetchCurrentData and in
the base-price resolver so unsupported chains are filtered or remapped and
multicalls are not invoked with invalid chain values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 80787d60-f008-4ebe-bf2a-2ae88365336b

📥 Commits

Reviewing files that changed from the base of the PR and between 3309233 and 4423aef.

📒 Files selected for processing (1)
  • src/adaptors/midas-rwa/addresses.js

Comment thread src/adaptors/midas-rwa/addresses.js
Comment thread src/adaptors/midas-rwa/addresses.js
Comment thread src/adaptors/midas-rwa/addresses.js
@0xkr3p
Copy link
Copy Markdown
Contributor

0xkr3p commented Apr 17, 2026

hi @dmytro-horbatenko, thanks for the PR, are you able to check the codebase comments pls? 'xrplevm' will need to be added to the formatChain helper and should return as "XRPL EVM". The other issues pls just double check the addresses are correct

thanks again!

@github-actions
Copy link
Copy Markdown

The midas-rwa adapter exports pools:

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

Nb of pools: 45
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────────────┬─────────────────┬─────────────┬─────────────┬────────────────────┬─────────┬───────────────────────────────┬──────────────────────────────────────────────────┐
│ (index) │ pool                                                       │ chain           │ project     │ symbol      │ tvlUsd             │ apyBase │ url                           │ underlyingTokens                                 │
├─────────┼────────────────────────────────────────────────────────────┼─────────────────┼─────────────┼─────────────┼────────────────────┼─────────┼───────────────────────────────┼──────────────────────────────────────────────────┤
│ 0       │ '0x238a700ed6165261cf8b2e544ba797bc11e466ba-ethereum'      │ 'Ethereum'      │ 'midas-rwa' │ 'mFONE'     │ 70263626.90476651  │ 11.28   │ 'https://midas.app/mfone'     │ [ '0x238a700eD6165261Cf8b2e544ba797BC11e466Ba' ] │
│ 1       │ '0xdd629e5241cbc5919847783e6c96b2de4754e438-ethereum'      │ 'Ethereum'      │ 'midas-rwa' │ 'mTBILL'    │ 51970682.9733255   │ 2.91    │ 'https://midas.app/mtbill'    │ [ '0xDD629E5241CbC5919847783e6C96B2De4754e438' ] │
│ 2       │ '0xc8495eaff71d3a563b906295fcf2f685b1783085-ethereum'      │ 'Ethereum'      │ 'midas-rwa' │ 'mHyperBTC' │ 37168613.2190107   │ 4.65    │ 'https://midas.app/mhyperbtc' │ [ '0xC8495EAFf71D3A563b906295fCF2f685b1783085' ] │
│ 3       │ '0x9b5528528656dbc094765e2abb79f293c21191b9-ethereum'      │ 'Ethereum'      │ 'midas-rwa' │ 'mHYPER'    │ 31354561.926266313 │ 5.88    │ 'https://midas.app/mhyper'    │ [ '0x9b5528528656DBC094765E2abB79F293c21191B9' ] │
│ 4       │ '0xcc5c22c7a6bcc25e66726aef011dde74289ed203-ethereum'      │ 'Ethereum'      │ 'midas-rwa' │ 'mM1USD'    │ 27026981.67428079  │ 3.7     │ 'https://midas.app/mm1usd'    │ [ '0xCc5C22C7A6BCC25e66726AeF011dDE74289ED203' ] │
│ 5       │ '0x7cf9dec92ca9fd46f8d86e7798b72624bc116c05-ethereum'      │ 'Ethereum'      │ 'midas-rwa' │ 'mAPOLLO'   │ 11586771.441839268 │ 0.07    │ 'https://midas.app/mapollo'   │ [ '0x7CF9DEC92ca9FD46f8d86e7798B72624Bc116C05' ] │
│ 6       │ '0x87c9053c819bb28e0d73d33059e1b3da80afb0cf-ethereum'      │ 'Ethereum'      │ 'midas-rwa' │ 'mRe7YIELD' │ 11515343.544296583 │ 0       │ 'https://midas.app/mre7yield' │ [ '0x87C9053C819bB28e0D73d33059E1b3DA80AFb0cf' ] │
│ 7       │ '0x5a42864b14c0c8241ef5ab62dae975b163a2e0c1-ethereum'      │ 'Ethereum'      │ 'midas-rwa' │ 'mHyperETH' │ 11408783.828038989 │ 3.79    │ 'https://midas.app/mhypereth' │ [ '0x5a42864b14C0C8241EF5ab62Dae975b163a2E0C1' ] │
│ 8       │ '0x7d611dc23267f508de90724731dc88ca28ef7473-plume_mainnet' │ 'Plume Mainnet' │ 'midas-rwa' │ 'mMEV'      │ 7205778.075474095  │ 4.8     │ 'https://midas.app/mmev'      │ [ '0x7d611dC23267F508DE90724731Dc88CA28Ef7473' ] │
│ 9       │ '0x67e1f506b148d0fc95a4e3ffb49068ceb6855c05-ethereum'      │ 'Ethereum'      │ 'midas-rwa' │ 'mROX'      │ 6405495.568728297  │ 4.83    │ 'https://midas.app/mrox'      │ [ '0x67E1F506B148d0Fc95a4E3fFb49068ceB6855c05' ] │
└─────────┴────────────────────────────────────────────────────────────┴─────────────────┴─────────────┴─────────────┴────────────────────┴─────────┴───────────────────────────────┴──────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/adaptors/midas-rwa/index.js`:
- Line 31: The call to utils.formatChain(chain) in the adaptor is missing an
explicit mapping for the "xrplevm" key so it falls back to generic
capitalization (Xrplevm) instead of the required "XRPL EVM"; update the
formatChain implementation to include a specific mapping entry for "xrplevm" ->
"XRPL EVM" (ensure the mapping lookup in formatChain covers lowercase keys and
returns the exact "XRPL EVM" string), then verify the adaptor code that calls
formatChain (in the module referencing formatChain) will now produce the
expected value.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 34b6d784-b0ff-40a5-8114-0eb491be4d60

📥 Commits

Reviewing files that changed from the base of the PR and between 4423aef and eccf0fc.

📒 Files selected for processing (4)
  • src/adaptors/midas-rwa/addresses.js
  • src/adaptors/midas-rwa/fetchTokenData.js
  • src/adaptors/midas-rwa/index.js
  • src/adaptors/utils.js
✅ Files skipped from review due to trivial changes (1)
  • src/adaptors/utils.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/adaptors/midas-rwa/addresses.js

Comment thread src/adaptors/midas-rwa/index.js
@dmytro-horbatenko
Copy link
Copy Markdown
Contributor Author

@0xkr3p hello, should be fine now

Copy link
Copy Markdown
Contributor

@0xkr3p 0xkr3p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @dmytro-horbatenko, approved

@0xkr3p 0xkr3p merged commit 1727e8d into DefiLlama:master Apr 29, 2026
2 checks passed
rav-ipor pushed a commit to IPOR-Labs/yield-server that referenced this pull request May 8, 2026
* MidasRWA: add new addresses

* MidasRWA: xrplevm support; ETH denomination
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