# Tron

Source: https://developers.bitgo.com/docs/tron

## TRON

TRON (TRX) is an account-based blockchain. BitGo supports **on-chain multisig** wallets and **MPC (TSS/MPCv2, ECDSA secp256k1)** wallets. Multisig wallets use legacy half-sign and Express `sendmany` flows; MPC wallets use the [TransactionRequest](/reference/v2wallettxrequestcreate) intent flow.

TRON (TRX) can be accessed with the following coin types:

| Environment         | Coin Type | Faucet                                                                                                                                     |
| :------------------ | :-------- | :----------------------------------------------------------------------------------------------------------------------------------------- |
| TRON Production     | trx       |                                                                                                                                            |
| TRON Testnet        | ttrx      | <a href="https://developers.tron.network/docs/networks#testnet" target="_blank" rel="noreferrer">https://developers.tron.network/docs/networks#testnet</a> |

Use `trx` on mainnet and `ttrx` on testnet in API and SDK calls unless noted otherwise.

### Explorer

<a href="https://tronscan.org/" target="_blank" rel="noreferrer">https://tronscan.org/</a>

## Wallet Types

BitGo enables holding TRX and TRC-20 tokens in the following wallet types:

| | Multisig Cold | Multisig Hot | MPC Cold | MPC Hot |
|-| ------------- | ------------ | -------- | ------- |
| **Custody** | ✅ | ✅ | ✅ | ✅ |
| **Self-Custody** | ✅ | ✅ | ✅ | ✅ |

See [MPC Wallets](#mpc-wallets-tss--mpcv2) for MPC setup and transaction flows.

## On-Chain Multisig Wallets

The sections below through [Gas Tank](#gas-tank) apply to **on-chain multisig** wallets unless stated otherwise.

### Create Multisig Wallet

To create a TRON multisig wallet using BitGoJS:

```javascript
bitgo
  .coin('ttrx')
  .wallets()
  .generateWallet({
    label: 'My Test Wallet',
    passphrase: 'secretpassphrase1a5df8380e0e30',
  })
  .then(function (wallet) {
    // print the new wallet
    console.dir(wallet);

    // print the new wallets address to send to
    console.dir(wallet.coinSpecific.rootAddress);
  });
```

You need to fund the wallet with 100 TRX as wallet creation costs this much for an individual user. You can find the
address to fill on the rootAddress field earlier. TRON accounts must also maintain a minimum balance of 0.1 TRX or else the account becomes deactivated and cannot read data from the Tron blockchain.

To create a TRON multisig wallet using the platform API:

```shell
LABEL="My Test Wallet"
PASSPHRASE="secretpassphrase1a5df8380e0e30"

curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d "{ \"label\": \"$LABEL\", \"passphrase\": \"$PASSPHRASE\" }" \
http://$BITGO_EXPRESS_HOST/api/v2/ttrx/wallet/generate
```

A similar operation needs to be provided to the resultant rootAddress.

### Creating Addresses

BitGo supports multiple receive addresses for TRON multisig and MPC wallets. To create a new receive address:

```javascript
const address = await wallet.createAddress({ label: 'My address' });
console.log(address);
```

### TRX and Token Withdrawal (Multisig)

> 📘 **Note:** This flow applies to **on-chain multisig** wallets only. MPC wallets must use the [TransactionRequest](/reference/v2wallettxrequestcreate) flow — see [MPC Withdrawals](#mpc-withdrawals).

You can send native TRX and TRC-20 tokens with the `.sendMany()` method. TRX transactions support sending to only **1 recipient** per transaction.

```javascript
const coin = 'ttrx:usdc'; // coin can be ttrx, trx or token name
const basecoin = bitgo.coin(coin);
const transaction = yield walletInstance.sendMany({
  recipients: [
    {
      amount: '10341234',
      address: 'TMtA4FQRddJaQ37yrdMmNsuC3jbkCs2Brt',
    },
  ],
  walletPassphrase: walletPassphrase,
  type: 'TokenTransfer',
});
```

### Balances

> 📘 **Note:** Balance fields and APIs apply to multisig and MPC wallets.

Tronix (TRX) is the native asset of the TRON blockchain. The base unit of Tronix is sun:

- 1 sun is (<code>10<sup>-6</sup></code>) or 0.000001 Tronix.
- 1 Tronix is (<code>10<sup>6</sup></code>) or 1000000 sun (1 million).

BitGo represents balances in string format: `balanceString`, `confirmedBalanceString`, and `spendableBalanceString`.

To obtain TRX and token balances for an entire wallet using BitGoJS:
```javascript
const basecoin = bitgo.coin(coin);
const walletInfo = basecoin.wallets().get({ id: walletId, allTokens: true });
// walletInfo.tokens() will return complete Tron Token information, including balances
```

You can also get balances (both native and tokens) based solely off address:
```javascript
const address = yield walletInstance.getAddress({ address: 'TTwW9apvyVL9EBqDVeTVDft15hf1Jnkpzy' });
const bal = address.balance;
return bal;
```

### Fees

> 📘 **Note:** The transfer fees below are for **on-chain multisig** transactions. For MPC fee amounts, see [MPC Fees](#mpc-fees).

Tron uses a resource model based on bandwidth and energy to handle the cost of TRX transfer and smart contract transactions.

`Bandwidth` is the unit that measures the size of the transaction bytes stored in the blockchain database.

An account receives 600 free bandwidth points per day. When the available bandwidth is not enough to pay for the transaction,
the network burns TRX.

`Energy` is the unit that measures the computational resources required to execute smart contracts.

You can obtain energy only by staking TRX. When energy is not available, the network burns TRX.
The contract execution calculates the energy quantity. The contract's `energy_factor` also affects energy consumption;
contract complexity determines that factor.

Because exact fee calculation involves several variables and the system also burns the TRX paid if the transaction fails
to execute successfully, BitGo uses a maximum fee approach to ensure transactions do not fail due to insufficient fees.
The network calculates and burns only the cost of the transaction.

- Transfer fee:
  - 2100000 sun (2.1 TRX) for TRX transactions
  - 15000000 sun (15 TRX) for USDT token transactions
  - 15000000 sun (15 TRX) for USDC token transactions
  - For token transfers, the TRX fee burned depends on whether the recipient already holds the token. If the recipient does not have the token, the TRX burned is double the amount compared to when the token is already present
- Wallet initialization fee:
  - 100000000 sun (100 TRX)

### Consolidate Balance (Multisig)

> 📘 **Note:** MPC wallets use the same consolidation APIs with lower native TRX fees — see [MPC Consolidation](#mpc-consolidation). For the generic consolidation guide, see [Consolidate Account Balance](/docs/wallets-consolidate).

To consolidate your receive address balances into the root address, enter the coin as TRX, or a Tron Token (trx:usdt, trx:usdc).

> 📘 **Note:** It's recommended to consolidate tokens and then consolidate the remaining TRX to minimize the dust left on the address. For TRX consolidation, you can consolidate only addresses that hold more than 1 TRX.

```javascript
const consolidationTxes = await wallet.buildAccountConsolidations();

try {
  for (const unsignedConsolidation of consolidationTxes) {
    const res = await wallet.sendAccountConsolidation({ walletPassphrase, prebuildTx: unsignedConsolidation });
    console.dir(res, { depth: 6 });
  }
} catch (e) {
  console.error(e);
}
```

## Gas Tank

> 📘 **Note:** Contact [support@bitgo.com](mailto:support@bitgo.com) to enable TRON gas tank auto-funding for your enterprise. BitGo enables the `enableTrxFundingFromGasTank` enterprise flag after setup. Auto-funding applies to multisig and MPC receive addresses when that flag is on — see [MPC Consolidation](#mpc-consolidation).

TRON is a non-EVM chain that still uses a [Gas Tank](/docs/get-started-gas-tanks) (TRX) to cover **token consolidation** fees on receive addresses, not other transaction fees.
The estimated gas for a token consolidation transaction is 15 TRX (the actual gas may be less). For this reason, TRON receive addresses need have a minimum balance of 15 TRX per unique token to be consolidated.
Whenever a receive address gets a token deposit, the gas tank calculates the amount of TRX needed on the receive address to consolidate the token, and initiates a transaction to fund the receive address with the calculated differential amount.
Some example scenarios:

- If a receive address gets USDC and has 0 TRX, the gas tank funds the receive address with 15 TRX
- If a receive address gets USDC and has 20 TRX, the gas tank does not fund the receive address as it already has sufficient TRX
- If a receive address gets both USDC and USDT and has 0 TRX, the gas tank funds the receive address with 30 TRX
- If a receive address gets both USDC and USDT and has 20 TRX, the gas tank funds the receive address with 10 TRX

For the gas tank -> receive address funding to happen smoothly, keep your gas tank appropriately funded. BitGo recommends a minimum gas-tank balance of:

`the average number of consolidations per cycle x 1.5 x 15`

> 📘 **Note:** If your gas tank balance is too low to fund the receive address, you must manually deposit TRX into impacted receive addresses.
Replenishing the gas tank doesn't automatically fund the receive addresses, because the gas tank only funds a receive address when there has been a token deposit.

While using the gas tank feature to fund receive addresses on token deposit, always consolidate tokens before TRX. If you consolidate TRX first, BitGo pulls out only the TRX you don't need for token consolidation fees. Example scenario:

- If a receive address has 1 USDT and 48 TRX, and you attempt TRX consolidation, BitGo consolidates only 33 (48-15) TRX to the root address
- Any subsequent attempts to consolidate TRX don't pull out additional TRX, though the receive address balance shows ~15 TRX
- Conversely, if you consolidate USDT first and then TRX, BitGo consolidates any remaining TRX to the root address

This is because of the preceding mechanism which ensures that receive addresses have enough TRX to cover for token consolidation fees

## MPC Wallets (TSS / MPCv2)

In addition to on-chain multisig wallets, BitGo supports **MPC (TSS/MPCv2, ECDSA secp256k1)** wallets for TRON. See [Wallet Types](#wallet-types) earlier for supported wallet types.

MPC is generally available for all enterprises — BitGo removed the `enableTrxMpc` feature flag after GA, so you no longer need it. New TRX MPC wallets use **MPCv2** when you set `multisigType` to `tss` (you do not need `walletVersion` as on EVM chains). GG18 → MPCv2 migration is not supported for TRX (`canMigrateToMPCv2: false`).

### Create MPC Wallet

Set `multisigType` to `tss` when generating a wallet. For self-custody MPC wallets, include `passcodeEncryptionCode` so you can decrypt the wallet passphrase during recovery. Wallet initialization (100 TRX funding) and the 0.1 TRX minimum balance requirement apply to MPC wallets the same as multisignature wallets.

```shell
export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>"
export COIN="ttrx"
export LABEL="My MPC Wallet"
export PASSPHRASE="secretpassphrase1a5df8380e0e30"
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"

curl -X POST \
  http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/generate \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "label": "'"$LABEL"'",
    "passphrase": "'"$PASSPHRASE"'",
    "enterprise": "'"$ENTERPRISE_ID"'",
    "multisigType": "tss"
  }'
```
```javascript
bitgo
  .coin('ttrx')
  .wallets()
  .generateWallet({
    label: 'My MPC Wallet',
    passphrase: 'secretpassphrase1a5df8380e0e30',
    passcodeEncryptionCode: '<RANDOM_ENCRYPTION_CODE>',
    enterprise: '<YOUR_ENTERPRISE_ID>',
    multisigType: 'tss',
  })
  .then(function (wallet) {
    console.dir(wallet);
    console.dir(wallet.coinSpecific.rootAddress);
  });
```

Fund the `rootAddress` with 100 TRX before using the wallet. Use `trx` instead of `ttrx` on mainnet.

### MPC Create Address

MPC wallets support multiple receive addresses the same way as multisig wallets — see [Creating Addresses](#creating-addresses).

### MPC Fees

MPC transactions use fewer bandwidth units than on-chain multisig transactions, so native TRX fees are lower:

| Operation | Multisig fee | MPC fee |
| --------- | ------------ | ------- |
| Native TRX transfer | 2.1 TRX (2,100,000 sun) | 1.1 TRX (1,100,000 sun) |
| Consolidation sweep | 2.1 TRX (default) | 1 TRX (1,000,000 sun) |
| TRC-20 transfer | ~15 TRX fee limit (token-specific) | ~15 TRX fee limit (same validation) |


### MPC Withdrawals

MPC wallets use the [TransactionRequest](/reference/v2wallettxrequestcreate) intent flow — not legacy half-sign or Express [`sendmany`](/reference/expresswalletsendmany). Express `sendmany` is not supported for TRX MPC wallets.

Each TRX payment or token transfer supports **one recipient** per transaction (same as multisig `sendMany`).

Supported MPC operations:

- Native TRX payment (`intentType`: `payment`, coin `ttrx` or `trx`)
- TRC-20 token transfer (`intentType`: `payment`, coin such as `ttrx:usdt` or `trx:usdc`)
- Consolidation (native and token)
- Staking and resource delegation (freeze, unfreeze, vote, claim, delegate/undelegate resources) — when the enterprise has the `trxStaking` flag enabled

#### Example: MPC payment (native TRX)

Create a transaction request, then complete signing per your wallet type (self-custody or custody). Amounts are in **sun** (base units).

>Endpoint: [Create transaction request](/reference/v2wallettxrequestcreate)

```shell
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"

curl -X POST \
  https://app.bitgo-test.com/api/v2/wallet/$WALLET_ID/txrequests \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "intent": {
      "intentType": "payment",
      "recipients": [
        {
          "address": { "address": "TMtA4FQRddJaQ37yrdMmNsuC3jbkCs2Brt" },
          "amount": { "value": "1000000", "symbol": "ttrx" }
        }
      ]
    },
    "apiVersion": "full"
  }'
```

For TRC-20 transfers, set `symbol` to the token identifier (for example, `ttrx:usdt`) and use the token amount in base units.

To complete the flow, follow the standard MPC guides:

- [Create MPC Wallets](/docs/wallets-create-mpc-keys)
- [Withdraw from Wallet - Self-Custody MPC (Simple)](/docs/withdraw-wallet-type-self-custody-mpc-simple)
- [Withdraw from Wallet - Self-Custody MPC (Manual)](/docs/withdraw-wallet-type-self-custody-mpc-manual)
- [Withdraw from Wallet - Custody MPC](/docs/withdraw-wallet-type-custody-mpc)
- [Withdraw Overview](/docs/withdraw-overview)

### MPC Consolidation

MPC wallets use the same `buildAccountConsolidations()` / [`consolidateAccount`](/reference/expresswalletconsolidateaccount) flow as multisig wallets. The MPC consolidation fee is 1 TRX (compared to 2.1 TRX for multisig native transfers). The same guidance applies: consolidate tokens before TRX, and only addresses with more than 1 TRX are eligible for native consolidation.

When the `enableTrxFundingFromGasTank` enterprise flag is enabled (see [Gas Tank](#gas-tank)), gas tank auto-funding on token deposit applies to MPC and multisig receive addresses.

### MPC Staking

TRON staking freezes TRX to obtain bandwidth or energy resources, or to vote for Super Representatives. Staking is available when the enterprise has the `trxStaking` flag enabled. MPC staking uses staking requests and TransactionRequest intents.

To learn more, see [Staking Overview](/docs/stake-overview) and [Stake Assets](/docs/stake-assets).

>Endpoint: [Create staking request](/reference/v1stakingrequestcreate)

```shell
export COIN="ttrx"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export CLIENT_ID="<CLIENT_ID>"
export AMOUNT="<AMOUNT_IN_SUN>"
export RESOURCE_TYPE="ENERGY"

curl -X POST \
  https://app.bitgo-test.com/api/staking/v1/$COIN/wallets/$WALLET_ID/requests \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "clientId": "'"$CLIENT_ID"'",
    "amount": "'"$AMOUNT"'",
    "type": "STAKE",
    "subType": "STAKE",
    "resourceType": "'"$RESOURCE_TYPE"'"
  }'
```

Use `trx` for mainnet staking requests.

### TRON APIs

| Operation | Endpoint |
| --------- | -------- |
| Bandwidth and energy per address | [Get account resources](/reference/v2walletgetaccountresources) |
| Resource delegations for a wallet | [Get resource delegations](/reference/v2walletgetresourcedelegations) |
| Fee estimate (sun) | [Get fee estimate](/reference/v2txgetfeeestimate) |
| MPC payment / transfer | [Create transaction request](/reference/v2wallettxrequestcreate) |
| Staking | [Create staking request](/reference/v1stakingrequestcreate) |

### See Also

- [BitGo Wallet Types](/docs/wallet-types)
- [Consolidate Account Balance](/docs/wallets-consolidate)
- [Consolidations](/docs/consolidations)
- [Create MPC Wallets](/docs/wallets-create-mpc-keys)
- [Fund Gas Tanks](/docs/get-started-gas-tanks)
- [Staking Overview](/docs/stake-overview)
- [Withdraw from Wallet - Custody MPC](/docs/withdraw-wallet-type-custody-mpc)
- [Withdraw from Wallet - Self-Custody MPC (Manual)](/docs/withdraw-wallet-type-self-custody-mpc-manual)
- [Withdraw from Wallet - Self-Custody MPC (Simple)](/docs/withdraw-wallet-type-self-custody-mpc-simple)
- [Withdraw Overview](/docs/withdraw-overview)
