Configuration reference
Every environment variable the Tron service reads, the shared Ecosystem variables that change its behaviour, the chain constants baked into the code, and the admin endpoints and permissions involved.
Everything the Tron addon reads, in one place. Variables live in the project root
.env; none of them are present in .env.example, so all of them are added by
hand.
The service is a singleton constructed on first use and nothing re-reads these values. Restart the backend after any change.
pm2 restart backendTron variables
Only the RPC variable matching the selected network is read. Setting
TRON_SHASTA_RPC while TRON_NETWORK="mainnet" does nothing.
Some providers embed a token in the path rather than a header. The diagnostics
console echoes only the host of a TRON_*_RPC value for that reason. Treat these
variables as secrets if yours is that shape.
Shared Ecosystem variables that affect Tron
These are not Tron-specific but they change Tron behaviour directly.
The vault variables — ENCRYPTED_ENCRYPTION_KEY and
ENCRYPTION_KEY_PASSPHRASE — encrypt every Tron key this addon creates. They are
documented in Ecosystem: master wallets and the vault;
losing either makes every Tron address on the install permanently unspendable.
Chain facts
| Property | Value |
|---|---|
| Chain key | TRON |
| Native symbol | TRX |
| Decimals | 6 (1 TRX = 1,000,000 sun) |
| Derivation path | m/44'/195'/0'/0/0 |
| Address format | base58, starts with T |
| Explorer | https://tronscan.org |
| Seeded product ID | 54577641 |
| Licence file | lic/54577641.lic |
| Service module | backend/src/blockchains/tron.ts |
| Token deployment | Not supported — import only |
| Custodial contracts | Not supported |
Tron is classified as a special chain alongside Solana, TON and Monero, and
as a network-agnostic chain for the purposes of the token-network check. The
second classification means Ecosystem's guard against issuing an address for a
token whose network disagrees with the chain's configured network never fires
on Tron. Nothing warns you when they diverge.
Constants baked into the code
None of these are configurable. They are listed because they explain observed behaviour and because the numbers matter when you are reading a log.
| Constant | Value | Where it applies |
|---|---|---|
| Deposit poll interval | 30 s | Per-session monitor, both asset types |
| Poll start jitter | 0–5 s random | Avoids a thundering herd at page open |
| Backoff on 429 | ×2 per error, 5 min ceiling | Rate limiting |
| Backoff on 403 | ×3 per error, 5 min ceiling | Bad or missing API key |
| Consecutive errors before shutdown | 10 | The monitor deletes its own loop |
| Native dust floor | 0.001 TRX | Ignored, counted and logged |
| TRC-20 dust floor | 1 / 10^(decimals − 3) |
0.001 for a 6-decimal token |
| Records fetched per poll | 50 | Both endpoints |
| Processed-hash memory | 30 min | In-process duplicate suppression |
| Transaction history cache | 30 min | Redis, per address |
TRC-20 feeLimit |
100 TRX | Hard ceiling per transfer |
| Default energy estimate | 65,000 | Used when the simulation is unavailable |
| Bandwidth sizing | 350 bytes | A signed TRC-20 triggerSmartContract |
| Gas top-up headroom | 20% | Applied to the computed shortfall |
| Chain-parameter cache | 10 min | getEnergyFee, getTransactionFee |
| Fallback energy price | 420 sun | Only if the node cannot be read |
| Fallback bandwidth price | 1,000 sun | Only if the node cannot be read |
| Native bandwidth price assumption | 10,000 sun per missing point | Informational estimate only |
| Top-up confirmation window | 30 × 3 s = 90 s | Then the withdrawal is requeued |
| Receipt confirmation window | 20 × 3 s = 60 s | Then the row becomes TIMEOUT |
| New-account activation figure | 1 TRX | Informational metadata, never charged |
| Licence and toggle cache | 5 min | Both gates, read together |
Endpoints
Tron has no routes of its own. It is driven through Ecosystem's admin and user endpoints.
balance.get.ts has its own copy of the balance-refresh logic, and that copy
knows about UTXO chains and getProvider() and nothing else. getProvider()
builds an ethers JSON-RPC provider from chainConfigs, and the TRON entry there
carries explorer hosts but no chainId, so the call throws "Chain ID not found
for TRON on mainnet". The error is caught, written to the console, and the row
keeps whatever balance it already had.
The one-minute cache belongs to the list route; this one holds its figures for five. If a Tron master wallet balance looks stale, reload the wallets list — calling this endpoint will never move it.
Diagnostic checks the console runs
Selecting Tron on the Requirements page and running its test performs, in order:
- Network configured —
TRON_NETWORKresolves to a host and that host is a validhttp(s)URL. A failure here short-circuits the rest, because the service cannot be constructed at all. - Node liveness —
POST /wallet/getnowblock, expecting a numeric block height back. - TronGrid REST + API key — a one-record account-transactions read against Tron's burn address, which always exists on every network. This is the exact path deposit polling uses. It passes with a warning when no API key is set, and reports 401/403 as an invalid key and 429 as anonymous rate limiting.
- Chain service installed — whether
@b/blockchains/tronresolves. - Licence + DB toggle active — both gates.
Readiness for deposits and withdrawals is derived from node liveness plus the last two checks, and then further downgraded by signing prerequisites — a locked vault or a missing or disabled master wallet fails withdrawal readiness even though every probe above passed.
Related
- Install — the order these are set in
- Energy and bandwidth — what the constants above buy
- Ecosystem: environment reference — the shared variables
- Troubleshooting