Add USDX stablecoin adapter#754
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ 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. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new USDX pegged-asset adapter and registry entry: a per-chain Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
There was a problem hiding this comment.
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/peggedData/peggedData.ts`:
- Around line 7668-7670: The entry sets gecko_id to null which can collide in
the price map keyspace; update the asset object so gecko_id is a unique non-null
string (e.g., a stable slug or fallback id) even if onCoinGecko is "false" and
priceSource is "defillama", ensuring you do not change the intent of onCoinGecko
or cmcId; locate the object with properties onCoinGecko, gecko_id, cmcId in
peggedData (the asset record) and replace gecko_id: null with a unique string
identifier for that asset.
🪄 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: 11d7cd59-d12e-40f8-a423-58836b652ad9
📒 Files selected for processing (2)
src/adapters/peggedAssets/stable-usdx/index.tssrc/peggedData/peggedData.ts
| onCoinGecko: "false", | ||
| gecko_id: null, | ||
| cmcId: null, |
There was a problem hiding this comment.
Set a unique non-null gecko_id for this asset.
gecko_id: null at Line 7669 can collide in the price map keyspace and break/overwrite pricing entries.
💡 Proposed fix
onCoinGecko: "false",
- gecko_id: null,
+ gecko_id: "stable-usdx",
cmcId: null,Based on learnings: In this codebase, gecko_id is used as a unique dictionary key in the price pipeline, so it must be a unique non-null string even when priceSource: "defillama".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/peggedData/peggedData.ts` around lines 7668 - 7670, The entry sets
gecko_id to null which can collide in the price map keyspace; update the asset
object so gecko_id is a unique non-null string (e.g., a stable slug or fallback
id) even if onCoinGecko is "false" and priceSource is "defillama", ensuring you
do not change the intent of onCoinGecko or cmcId; locate the object with
properties onCoinGecko, gecko_id, cmcId in peggedData (the asset record) and
replace gecko_id: null with a unique string identifier for that asset.
|
hey @gumdropsteve, do you have more detail on what currently backs USDX? Mostly trying to understand: If there’s already a page or reserve report that covers this, would be great to take a look |
|
hey @realdealshaman thanks for the comment. can't believe i didn't catch it sooner. please find responses inline below
A real time breakdown between Reserves (USDC, lending pools) and Mortgages can be found on the mint page https://app.trystable.co/mint.
Those mortgages are represented onchain as NFTs, which can be found from the Official Accounts and USDX Contract Addresses sections in the docs. Collection
Properties are valued through 3rd party appraisals and 3rd party Automated Valuation Models (AVMs). We discuss risks, transparency, and hedging in these sections of the docs:
Currently there is no central page for this. There will be, and I can prioritize a simple one if that helps with our submission. |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/peggedData/peggedData.ts (1)
7770-7771:⚠️ Potential issue | 🔴 CriticalSet a unique non-null
gecko_idfor USDX.
gecko_id: nullwill collide with other non-CoinGecko assets in the pricing map, so this needs a stable unique string instead.Suggested fix
- gecko_id: null, + gecko_id: "stable-usdx",Based on learnings:
gecko_idinsrc/peggedData/peggedData.tsis a unique dictionary key throughout the price pipeline.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/peggedData/peggedData.ts` around lines 7770 - 7771, The USDX asset entry currently has gecko_id: null which collides with other non-CoinGecko assets; update the USDX entry in peggedData (the USDX object where onCoinGecko is "false") to use a stable, unique non-null string (e.g., "usdx" or another canonical identifier) for gecko_id so it can serve as a distinct dictionary key throughout the price pipeline; ensure the chosen string is unique across the file and replace the null value with that identifier.
🤖 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/peggedData/peggedData.ts`:
- Around line 7767-7770: The mintRedeemDescription property currently uses
double quotes across multiple lines which breaks parsing; update the
mintRedeemDescription value to a template literal (backticks) so the multiline
text is valid (keep the same content and the trailing comma), e.g. modify the
mintRedeemDescription assignment inside the object where mintRedeemDescription
is defined so it uses backticks instead of double quotes; no other logic changes
required.
---
Duplicate comments:
In `@src/peggedData/peggedData.ts`:
- Around line 7770-7771: The USDX asset entry currently has gecko_id: null which
collides with other non-CoinGecko assets; update the USDX entry in peggedData
(the USDX object where onCoinGecko is "false") to use a stable, unique non-null
string (e.g., "usdx" or another canonical identifier) for gecko_id so it can
serve as a distinct dictionary key throughout the price pipeline; ensure the
chosen string is unique across the file and replace the null value with that
identifier.
🪄 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: e6ffbed9-399f-4a94-b8c0-a33f78162329
📒 Files selected for processing (1)
src/peggedData/peggedData.ts
Updated mintRedeemDescription to use backticks for formatting and clarified liquidity pools.
Updated mintRedeemDescription to include additional minting options for USDX.
Reserves & Transparency page has been spun up at trystable.co/reserves Cc @realdealshaman, @RohanNero (DefiLlama/DefiLlama-Adapters#18730) |
|
@gumdropsteve can we see the properties anywhere, other than via the nfts? |
No that would be a huge privacy concern as it would completely dox our users |
|
@gumdropsteve this still leaves the concern of how can we verify the backing. Maybe it would be a good idea to move forward with this: |
hey @realdealshaman! yes, agreed, went ahead and we pushed this about a week ago to https://trystable.co/reserves ! please see my above comment #754 (comment) :) we were also recently listed on RWAxyz as a company/platform and stablecoin (USDX). do these updates help? thanks |
|
gm gm @realdealshaman kindly following up :) we have launched the reserves page a few weeks ago as requested and unified docs including listings on rwa.xyz :) are we able to proceed here? It would be awesome to get listed! |
|
@gumdropsteve unfortunately there is still no way to confirm that houses exist or merit the valuations |
We can work on this but that same issue exists for all onchain credit as far as I know, so I am not sure where to start. For example, there is no information about the loans, borrowers, or collateral in ACRED. Do you have any thoughts on how we can address your concerns? |


Summary
Adds USDX (by Stable — trystable.co) as a new pegged asset listing. USDX is a fully-collateralized stablecoin backed by tokenized real estate mortgage debt NFTs plus on-chain yield reserves (idle USDC, Jupiter Lend, Kamino). Active on Solana today, with token contracts also deployed on Ethereum and Monad.
Naming: There are two existing entries using USDX — Kava's USDX (id 42) and usdx.money's USDX Money USDX (id 214). This PR does not touch either. This adapter uses the folder/module name
stable-usdxto avoid collision with the existing folders. The displaynameisUSDX.Files changed
src/adapters/peggedAssets/stable-usdx/index.ts— 14-line adapter usingaddChainExportsto readtotalSupply()on each issuing chainsrc/peggedData/peggedData.ts— appends entry id374for USDXTest results
All three chains return real-time on-chain data, no extrapolation.
(Template answers)
Name (to be shown on DefiLlama):
USDX
Website Link:
https://trystable.co
Logo (High resolution, will be shown with rounded borders):
Brand kit: https://www.trystable.co/brand
Chain:
Solana (primary), Ethereum, Monad
Coingecko ID (leave empty if not listed):
Coinmarketcap ID (leave empty if not listed):
Short Description:
USDX is a fully-collateralized stablecoin issued by Stable, backed by tokenized real estate mortgage debt NFTs plus on-chain yield reserves (idle USDC, Jupiter Lend, Kamino). It is pegged 1:1 to the US dollar.
mintRedeemDescription:
USDX is minted against tokenized real estate mortgage NFTs through an admin mint flow: a debt position is created on-chain recording the loan terms, a debt NFT is minted as proof of the underlying collateral, and an equivalent amount of USDX is issued to the recipient. Holders can also swap into and out of USDX on Raydium (Solana) and Uniswap (Monad) liquidity pools.
Token address and ticker:
USDX —
9Gst2E7KovZ9jwecyGqnnhpG1mhHKdyLpJQnZonkCFhA0xfea577f08d1984e6654813be0acee3140e5d7d420xd0a4BDb0422DB3fA77dC46189b6d043D2cd5A7B9pegType:
peggedUSD
pegMechanism:
crypto-backed
priceSource:
defillama
wiki:
https://docs.trystable.co
Twitter Link:
https://x.com/stable_tweets
List of audit links if any:
Related
Companion PR for protocol TVL listing: DefiLlama/DefiLlama-Adapters#18730
Summary by CodeRabbit