USDD / JUST Protocol

Execute USDT-USDD PSM swaps and query CDP vaults on TRON.

91|14|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/BofAI/skills --skill usdd-just-protocol
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: USDD / JUST Protocol
Source: https://github.com/BofAI/skills/tree/main/usdd-skill
Command: npx skills add https://github.com/BofAI/skills --skill usdd-just-protocol

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tronweb, and includes scripts (resource) components.

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.

Frequently Asked Questions about USDD / JUST Protocol

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I swap USDD and USDT on TRON using the Peg Stability Module?

You can execute 1:1 USDT ↔ USDD swaps on TRON by running PSM buyGem or sellGem operations. The process handles TRC20 allowance and approval flows automatically, and supports dry-run previews to check rates before committing.

What is a USDD Peg Stability Module and how does it work on TRON?

The USDD Peg Stability Module (PSM) enables 1:1 stablecoin swaps between USDT and USDD on the TRON network. You can query PSM fee parameters like tin and tout, check USDT reserves, and verify USDD total supply to validate swap viability.

How do I check JUST Protocol vault positions and collateralization ratios on TRON?

You can perform read-only queries of JUST Protocol CDP vaults on TRON to inspect specific positions. This retrieves collateral locked, outstanding debt, and the current collateralization ratio for risk and health checks across common vault types.

Do I need tronweb and a private key to query USDD vault states?

You need Node.js 18+ and the tronweb dependency to interact with TRON contracts. While vault parameter and position queries are read-only, executing PSM swaps requires setting the TRON_PRIVATE_KEY environment variable for transaction signing.

Can I check my TRC20 token balances for USDD, USDT, and JST before executing a swap?

You can check wallet balances for USDD, USDT, USDC, TRX, and JST on TRON. Verifying these token balances before acting ensures you have sufficient funds to cover the swap and any associated transaction fees.

Why does my USDD PSM swap fail on TRON despite having sufficient token balance?

A USDD PSM swap may fail if TRC20 allowance approvals are not set correctly, or if PSM fee parameters and USDT reserves are insufficient. Use the dry-run preview feature and inspect protocol state to diagnose the exact failure point.