Przejdź do treści
Biblioteka skilli
Finanse i księgowość · Integracja z narzędziem

tron-swap

/tron-swap

Pobiera wycenę i wybiera trasę wymiany tokenów w sieci TRON, agregując płynność z kilku DEX-ów, takich jak SunSwap.

Licencja
MIT
Ostatnia zmiana repozytorium
23.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 23.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pobiera wycenę i wybiera trasę wymiany tokenów w sieci TRON, agregując płynność z kilku DEX-ów, takich jak SunSwap.

Wyzwalacze z opisu

swap tokens on TRONbuy token on TRONsell TRC-20 tokentrade TRX for USDTexchange tokens on SunSwapDEX trade on TRONget swap quote on TRONbest route for TRON swap
Oryginalny opis (EN)

This skill should be used when the user asks to 'swap tokens on TRON', 'buy token on TRON', 'sell TRC-20 token', 'trade TRX for USDT', 'exchange tokens on SunSwap', 'DEX trade on TRON', 'get swap quote on TRON', 'best route for TRON swap', or mentions swapping, trading, buying, selling, or exchanging tokens on the TRON network. Aggregates liquidity from SunSwap V2/V3, Sun.io, and other TRON DEXes. Do NOT use for staking — use tron-staking. Do NOT use for token research — use tron-token.

Jak działa

  1. Pre-flight Checks
  2. Resolve the CLI path
  3. Commands
  4. DEX Router Addresses (Mainnet)
  5. Swap Cost Estimation
  6. Slippage Guide
  7. Safety Checks Before Swap
Sekcje z nagłówków SKILL.md, w oryginale · 114 linii, 600 słów
Podgląd SKILL.md
---
name: tron-swap
description: "This skill should be used when the user asks to 'swap tokens on TRON', 'buy token on TRON', 'sell TRC-20 token', 'trade TRX for USDT', 'exchange tokens on SunSwap', 'DEX trade on TRON', 'get swap quote on TRON', 'best route for TRON swap', or mentions swapping, trading, buying, selling, or exchanging tokens on the TRON network. Aggregates liquidity from SunSwap V2/V3, Sun.io, and other TRON DEXes. Do NOT use for staking — use tron-staking. Do NOT use for token research — use tron-token."
license: MIT
metadata:
  author: tronlink-skills
  version: "1.1.0"
  homepage: "https://trongrid.io"
---

# TRON DEX Swap

3 commands for swap quote, route optimization, and transaction status tracking (read-only queries).

## Pre-flight Checks

1. **Confirm Node.js 24.22.1**:
   ```bash
   node -v  # must print v24.22.1
   ```

2. **Check energy before swapping**: Swaps consume significant Energy (typically 50,000–200,000). Run:
   ```bash
   node "$TRON_API" resource-info --address <YOUR_ADDRESS>
   ```
   If energy is insufficient, consider freezing TRX first (`tron-staking`) or accept TRX burn cost.

## Resolve the CLI path

Every command below runs `node "$TRON_API"`. Set `$TRON_API` once per session so it works no matter how the skill was installed (Claude Code plugin, `install.sh` → `~/.tronlink-skills`, or inside the cloned repo):

```bash
TRON_API="${CLAUDE_PLUGIN_ROOT:-$HOME/.tronlink-skills}/scripts/tron_api.mjs"
[ -f "$TRON_API" ] || TRON_API="scripts/tron_api.mjs"   # fallback when run inside the repo
```

> **Read-only:** these commands quote and inspect swaps; they do **not** sign or broadcast transactions.

## Commands

### 1. Swap Quote

```bash
node "$TRON_API" swap-quote \
  --from-token <FROM_CONTRACT_OR_TRX> \
  --to-token <TO_CONTRACT_OR_TRX> \
  --amount <HUMAN_READABLE_AMOUNT> \
  [--slippage 0.5]
```

Returns: expected output amount, `slippage_pct`, `minimum_received` (= amount_out × (1 − slippage), your worst-case fill), price impact, fee, route path, and estimated energy cost. Default slippage is 0.5%; `--slippage` is validated to the **0–50%** range (a larger value is rejected rather than producing a negative `minimum_received`). `--amount` must be a positive number. The same `slippage` parameter is also exposed on the MCP `tron_swap_quote` tool.

⚠️ **Amount is human-readable** — pass `100` for 100 TRX, NOT `100000000`.

Example:
```bash
# Quote: 100 TRX → USDT
node "$TRON_API" swap-quote \
  --from-token TRX \
  --to-token TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t \
  --amount 100
```

### 2. Best Route

```bash
node "$TRON_API" swap-route \
  --from-token <FROM_CONTRACT> \
  --to-token <TO_CONTRACT> \
  --amount <AMOUNT>
```

Returns the same best-route data as `swap-quote` — this command is currently an **alias** of it. The chosen route, `path`, `pool_versions`, and price impact are already part of the `swap-quote` response; multi-hop paths (e.g. TRX → WTRX → USDT) appear in those fields when the router returns them.

### 3. Transaction Status

```bash
node "$TRON_API" tx-status --txid <TRANSACTION_HASH>
```

Returns: confirmation status, block number, energy used, bandwidth used, result.

## DEX Router Addresses (Mainnet)

| DEX | Router Contract |
|-----|----------------|
| SunSwap V2 Router | `TKzxdSv2FZKQrEqkKVgp5DcwEXBEKMg2Ax` |
| SunSwap V3 Router | `TQAvWQpT9H916GckwWDJNhYZvQMkuRL7PN` |
| Sun.io Swap | `TKcEU8ekq2ZoFzLSGFYCUY6aocJBX9X31b` |

## Swap Cost Estimation

TRON swap costs differ from EVM chains:

| Operation | Bandwidth | Energy | TRX Burn (if no resources) |
|-----------|-----------|--------|---------------------------|
| TRX → TRC-20 | ~345 | ~65,000 | ~6.5 TRX |
| TRC-20 → TRX | ~345 | ~50,000 | ~5 TRX |
| TRC-20 → TRC-20 | ~345 | ~130,000 | ~13 TRX |
| Approve (first time) | ~345 | ~30,000 | ~3 TRX |

⚠️ TRX-burn = energy × `getEnergyFee` ÷ 1e6. The figures above use the live fee ≈ **100 SUN (mid-2026)**; it was 420 SUN in 2023–2024 (~4.2× higher). Always check the current price:
```bash
node "$TRON_API" energy-price
```

## Slippage Guide

| Token Type | Recommended Slippage |
|-----------|---------------------|
| Stablecoins (USDT↔USDC) | 0.1% |
| Major tokens (TRX, JST, SUN) | 0.5% |
| Mid-cap tokens | 1-2% |
| Low-cap / Meme tokens | 3-5% |
| New launches | 5-10% (⚠️ high risk) |

## Safety Checks Before Swap

1. **Security heuristic**: Run `node "$TRON_API" token-security --contract <TOKEN>` before trading unfamiliar tokens (first-pass risk snapshot, not a full audit)
2. **Liquidity check**: Run `node "$TRON_API" pool-info --contract <TOKEN>` — avoid tokens with < $10k liquidity
3. **Energy check**: Run `node "$TRON_API" resource-info --address <YOUR_ADDRESS>` — swap without energy burns TRX
4. **Price impact**: If price impact > 3%, consider splitting into smaller trades

Wersje

W bazie nie ma innych skilli o nazwie tron-swap.

Migawka bazy z 28.10.2026 · wersja paczki 3fb4f502d392 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100tron-token
    Wyszukuje tokeny TRC-20 w sieci TRON, sprawdza ich metadane, rozkład posiadaczy i weryfikację kontraktu.
  • 100tron-wallet
    Sprawdza saldo i historię transakcji portfela TronLink, w tym tokeny TRC-20, bez handlu i stakowania.
  • 90ton-swap
    Wymienia tokeny w sieci TON przez DEX, np. GRAM na USDT, i pomaga przy kupnie, sprzedaży lub konwersji jettonów.
  • 100swap-planner
    Planuje wymianę tokenów, na przykład ETH na USDC, na łańcuchach obsługiwanych przez Uniswap, a także wyszukuje i bada tokeny do zakupu.
  • 100tronscan-token-scanner
    Sprawdza tokeny TRON pod kątem podaży, kapitalizacji, ceny, ratingu, czasu startu i posiadaczy, w tym ceny i podaży TRX oraz trendu podaży.
  • 87okx-dex-swap
    Wymienia tokeny między łańcuchami, podaje wycenę i najtańszą trasę przez agregator OKX z ochroną przed poślizgiem ceny.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.