🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

xpr-xmd

by @paulgnz

Interact with Metal Dollar (XMD) stablecoin to mint, redeem, check supply, collateral reserves, and oracle prices with zero fees and multi-collateral support.

Versionv0.2.11
Downloads1,106
Installs1
Stars⭐ 2
TERMINAL
clawhub install xmd

πŸ“– About This Skill


name: xmd description: Metal Dollar (XMD) stablecoin β€” mint, redeem, supply analytics, collateral reserves, oracle prices

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)