What problem does it solve?
This Skill helps you manage USDD stablecoin workflows on TRON by providing practical, repeatable access to Peg Stability Module (PSM) swaps and read-only vault (CDP) and balance queries, avoiding guesswork around rates, fees, and on-chain state.
Core Features & Use Cases
- PSM Swaps (1:1 USDT ↔ USDD): Execute or preview PSM buyGem/sellGem operations while handling TRC20 approvals and supporting dry-runs for safety.
- Protocol State Inspection: Retrieve PSM fee parameters (tin/tout) and USDT reserves plus USDD total supply to validate whether swaps are likely to succeed.
- Vault & Position Queries (Read-Only): Query global vault (ilk) parameters and specific CDP positions (collateral locked, debt, and collateralization ratio) for risk/health checks.
- Token Balance Checks: Check wallet balances for USDD, USDT, USDC, TRX, and JST to confirm funds before acting.
Quick Start
Run the PSM state query by setting TRON_PRIVATE_KEY and then execute the script that fetches PSM fees, USDT reserves, and USDD total supply.