t2000-skills/skills/t2000-swap/SKILL.md
Swap tokens on Sui via Cetus Aggregator (20+ DEXs, best-route across SUI, USDC, USDsui, USDT, USDe, ETH, GOLD, NAVX, WAL, vSUI, and more). Use when asked to swap, trade, convert, exchange, or "turn X into Y". Do not use for sending — use the t2000-send skill for transfers.
npx skillsauth add mission69b/t2000 t2000-swapInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Convert between tokens at the best available rate. Cetus Aggregator routes across 20+ DEXs and picks the lowest-price-impact path. Slippage defaults to 1%; configurable up to 5%.
Swaps are NOT gasless. Unlike t2 send USDC / t2 send USDsui, Cetus swap transactions require SUI for gas (typically < $0.01 per swap). Ensure the wallet holds a small SUI balance before swapping.
t2 swap <amount> <from> <to> --quote (or call t2000_swap in dry-run via the MCP) and surface priceImpact + toAmount to the user before broadcasting.priceImpact > 0.5% (50 bps), warn the user and require explicit confirmation. If priceImpact > 5%, refuse — that's almost certainly a thin-liquidity trap.swap calls.t2 limit set --per-tx 50 and the swap exceeds the cap (when the from-side is USDC / USDsui), the CLI throws LIMIT_EXCEEDED. Use --force to override.t2 swap <amount> <from> <to> [--slippage <pct>] [--quote] [--force]
# Examples:
t2 swap 100 USDC SUI # 100 USDC → SUI, default 1% slippage
t2 swap 5 SUI USDC --slippage 2 # 5 SUI → USDC, 2% slippage
t2 swap 50 USDC USDsui # stable-to-stable; usually <0.05% impact
t2 swap 100 USDC SUI --quote # preview only (no signing)
Slippage is capped at 5% (any higher is rejected — that's degenerate liquidity).
--quote)t2 swap 100 USDC SUI --quote
Returns (no signing, no execution):
toAmount — estimated output (at current pool state)priceImpact — basis points moved by the traderoute — provider name(s) Cetus selected (e.g. BLUEFIN + CETUS + AFTERMATH)fee — total Cetus protocol fee baked into the quote--quote replaces the v3 t2000 swap-quote standalone command. One verb, one flag.
toAmount).✓ Swapped 100 USDC for 49.8721 SUI
Price impact: 0.04%
Route: USDC → SUI (Cetus + BLUEFIN)
Gas: 0.0038 SUI
Tx: https://suiscan.xyz/mainnet/tx/0xdigest...
{
"tx": "0xdigest...",
"from": "USDC",
"to": "SUI",
"amountIn": 100,
"amountOut": 49.8721,
"priceImpact": 0.04,
"route": ["CETUS", "BLUEFIN"],
"fee": 0.001,
"gasCost": 0.0038
}
| Error code | Meaning |
|---|---|
| SWAP_NO_ROUTE | No path from from to to in Cetus's pool graph. Suggest going via USDC as an intermediate. |
| INSUFFICIENT_LIQUIDITY | The requested size moves the pool too far. Suggest a smaller trade or splitting. |
| INSUFFICIENT_BALANCE | Wallet doesn't hold enough of the source token (after gas reserve). |
| INSUFFICIENT_GAS | Wallet has the source token but no SUI for gas. Run t2 swap 1 USDC SUI (or similar) first to top up gas. |
| SLIPPAGE_EXCEEDED | By the time the tx confirmed, the pool moved past the slippage limit. Retry with the same params; usually transient. |
| LIMIT_EXCEEDED | CLI hit a t2 limit set cap on the from-side USD value. Use --force to override. |
USDC, USDsui, USDT, USDe, SUI, vSUI, ETH, GOLD (XAUM), NAVX, WAL, and the long tail Cetus routes through. Use the canonical symbol or pass a full coin type (0x...::module::TYPE). The @t2000/sdk token registry resolves common symbols automatically.
t2000_swap tool){
"from": "USDC",
"to": "SUI",
"amount": 100,
"slippage": 0.01
}
t2 limit set caps (Phase D consolidation). Use the CLI for limit-gated swaps.--json mode (digest + amounts + price impact + route).tools
Set up a t2000 Agent Wallet end-to-end on the user's machine. Use when the user says "set up t2000", "install the wallet", "create my Agent Wallet", "connect t2000 to Claude / Cursor", or pastes a one-prompt install URL. Covers wallet creation, optional spending limits, and MCP wiring. Read this first when bootstrapping a new user; the other skills assume this has run.
development
Discover MPP services payable via `t2 pay`. Use when the user asks "what can I pay for?", "what AI models are available?", "show me the service catalog", "is there a weather API?", or any other discovery question. Pairs with the t2000-pay skill (discovery first, then pay).
development
Pay for an MPP-protected API service using the t2000 wallet. Use when asked to call an AI model, search the web, generate images, send email, buy gift cards, send physical mail, check weather, execute code, or any task that requires a paid API. Handles the full MPP 402 challenge automatically. Use t2000_services to discover all available services first.
data-ai
Rebalance the wallet to a target allocation by executing multiple swaps in one atomic Payment Intent. Use when asked to rebalance, adjust allocation, "shuffle my positions", or move from one set of holdings to another. Every leg prices against the same on-chain snapshot — no cross-leg slippage drift; user signs once.