xmd
Metal Dollar (XMD) 稳定币 — 铸造、赎回、供应分析、抵押品储备、预言机价格
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~paulgnz-xmdcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~paulgnz-xmd/file -o paulgnz-xmd.md## Metal Dollar (XMD) You have tools to interact with XMD, XPR Network's native stablecoin. XMD is a multi-collateral stablecoin pegged to $1 USD, minted and redeemed through the `xmd.treasury` contract. ### How XMD Works - **Mint:** Send a supported stablecoin (e.g. XUSDC) to `xmd.treasury` with memo `mint` → receive equivalent XMD at oracle price - **Redeem:** Send XMD to `xmd.treasury` with memo `redeem,SYMBOL` (e.g. `redeem,XUSDC`) → receive equivalent stablecoin back - **1:1 peg:** Oracle-priced at $1, backed by stablecoin reserves in the treasury - **Zero fees:** Currently 0% mint and redemption fees on all collateral types ### Supported Collateral | Token | Contract | Oracle Feed | Max Treasury % | Status | |-------|----------|-------------|----------------|--------| | XUSDC | xtokens | USDC/USD | 60% | Mint + Redeem | | XPAX | xtokens | PAX/USD | 15% | Mint + Redeem | | XPYUSD | xtokens | PYUSD/USD | 15% | Mint + Redeem | | MPD | mpd.token | MPD/USD | 2% | Mint + Redeem | ### Contracts - `xmd.token` — XMD token contract (precision 6, issuer = xmd.treasury) - `xmd.treasury` — Mint/redeem logic, collateral management, oracle integration - `oracles` — On-chain price feeds from multiple providers ### Read-Only Tools (safe, no signing) - `xmd_get_config` — treasury config: paused state, fee account, minimum oracle price threshold - `xmd_list_collateral` — all supported collateral tokens with fees, limits, oracle prices, mint/redeem volumes - `xmd_get_supply` — XMD total circulating supply - `xmd_get_balance` — check any account's XMD balance - `xmd_get_treasury_reserves` — current stablecoin reserves backing XMD, with USD valuations and collateralization ratio - `xmd_get_oracle_price` — current oracle price for any collateral token (with individual provider data) ### Write Tools (require `confirmed: true`) - `xmd_mint` — mint XMD by depositing a supported stablecoin - `xmd_redeem` — redeem XMD for a supported stablecoin ### Safety Rules - Oracle price must be >= 0.995 (`minOraclePrice`) for mint/redeem to proceed - Each collateral has a `maxTreasuryPercent` cap — if the treasury already holds too much of one stablecoin, minting with it is blocked - Check `isMintEnabled` / `isRedeemEnabled` before attempting operations - The treasury can be paused by admins (`isPaused`) — check config first - XMD has precision 6 — all amounts use 6 decimal places (e.g. `1.000000 XMD`) --- ## 中文说明 ## Metal Dollar (XMD) 你拥有与 XMD 交互的工具,XMD 是 XPR Network 的原生稳定币。XMD 是一种与 1 美元挂钩的多抵押品稳定币,通过 `xmd.treasury` 合约进行铸造和赎回。 ### XMD 的运作方式 - **铸造(Mint):** 将受支持的稳定币(如 XUSDC)发送至 `xmd.treasury`,备注为 `mint` → 按预言机价格收到等值的 XMD - **赎回(Redeem):** 将 XMD 发送至 `xmd.treasury`,备注为 `redeem,SYMBOL`(如 `redeem,XUSDC`)→ 取回等值的稳定币 - **1:1 锚定:** 由预言机定价为 1 美元,由国库中的稳定币储备支持 - **零费用:** 目前所有抵押品类型的铸造和赎回费用均为 0% ### 支持的抵押品 | Token | Contract | Oracle Feed | Max Treasury % | Status | |-------|----------|-------------|----------------|--------| | XUSDC | xtokens | USDC/USD | 60% | Mint + Redeem | | XPAX | xtokens | PAX/USD | 15% | Mint + Redeem | | XPYUSD | xtokens | PYUSD/USD | 15% | Mint + Redeem | | MPD | mpd.token | MPD/USD | 2% | Mint + Redeem | ### 合约 - `xmd.token` — XMD 代币合约(精度 6,发行方 = xmd.treasury) - `xmd.treasury` — 铸造/赎回逻辑、抵押品管理、预言机集成 - `oracles` — 来自多个提供方的链上价格数据 ### 只读工具(安全,无需签名) - `xmd_get_config` — 国库配置:暂停状态、费用账户、最低预言机价格阈值 - `xmd_list_collateral` — 所有受支持的抵押品代币,含费用、限额、预言机价格、铸造/赎回交易量 - `xmd_get_supply` — XMD 总流通供应量 - `xmd_get_balance` — 查询任意账户的 XMD 余额 - `xmd_get_treasury_reserves` — 当前支持 XMD 的稳定币储备,含美元估值和抵押率 - `xmd_get_oracle_price` — 任意抵押品代币的当前预言机价格(含各提供方数据) ### 写入工具(需 `confirmed: true`) - `xmd_mint` — 通过存入受支持的稳定币铸造 XMD - `xmd_redeem` — 用 XMD 赎回受支持的稳定币 ### 安全规则 - 预言机价格必须 >= 0.995(`minOraclePrice`),铸造/赎回才能进行 - 每种抵押品都有 `maxTreasuryPercent` 上限——如果国库已持有过多某种稳定币,则禁止用它铸造 - 在尝试操作前检查 `isMintEnabled` / `isRedeemEnabled` - 国库可被管理员暂停(`isPaused`)——请先检查配置 - XMD 精度为 6——所有金额使用 6 位小数(如 `1.000000 XMD`)