On this page

TRON GasFree: Gasless TRC20 Transfers

GasFree lets users send TRC20 tokens (e.g. USDT) on TRON without holding TRX for gas. The transfer fee is paid in the transferred token itself, and a GasFree service provider broadcasts the transaction on-chain on the user's behalf in exchange for that token fee.

GasFree applies to TRC20 token transfers only (wallet withdrawals). Native TRX transfers and atomic swaps are not gasless. TRON support in the Komodo DeFi Framework is currently wallet-only.

Each user address has a deterministic GasFree custody address — a smart-contract account derived from the user's address and a per-network controller contract (via TVM CREATE2). Tokens held at this custody address are eligible for gasless transfers.

  1. Activate the TRON platform coin with a tron_gasless_provider, and optionally a per-token gasless constraint. Activation returns each address's gasfree_address (see enable_eth_with_tokens).
  2. Fund the GasFree custody address with the token you want to transfer gaslessly.
  3. Withdraw with fee_method: "gasless" (withdraw). The framework computes the provider fee, signs a TIP-712 PermitTransferMessage authorizing {token, serviceProvider, user, receiver, value, maxFee, deadline, nonce}, and returns the signed authorization (a relay_type: "tron_gasfree" payload) plus a TronGasless fee breakdown.
  4. Submit the signed authorization to the provider via send_raw_transaction (passed as a tx_json object). The provider pays the TRX gas, settles the transfer on-chain, and the call returns a trace_id.
  5. Track the transfer with gasless::trace_status (one-off poll) or stream::gasless_trace::enable (live updates) using the trace_id.

If the GasFree custody address has never been used, the first transfer also pays a one-time activation fee (in the token), reported as activation_fee in the TronGasless fee details.

Fees are paid in the transferred token, not in TRX:

  • transfer_fee — the provider's fee to broadcast and settle the transfer.
  • activation_fee — a one-time fee, charged in the token, when the GasFree custody address is inactive and must be activated on its first transfer (omitted otherwise).
  • total_token_fee — the total charged in the token (transfer_fee + activation_fee).

You can cap the fee you are willing to pay with the gasless.max_fee option at withdraw time (which is bound into the signed permit), or at activation time with a per-token gasless.transfer_max_fee. Set gasless.fallback_to_native: true to fall back to a normal TRX-paid transfer when a gasless transfer is unavailable.

The service field of the tron_gasless_provider selects how the node authenticates to the gasless backend:

  • gas_free — the node calls the public GasFree API directly, authenticating each request with your own HMAC-SHA256 api_key/api_secret.
  • komodo_proxy — requests are routed through the Komodo proxy, which holds the GasFree credentials on your behalf. No API secret is stored on the node; the node authenticates to the proxy with its libp2p key.