Skip to main content

Tron Swap API

Broker as a Service (BaaS) swaps TRX and the listed TRC-20 tokens on Tron to and from every other supported chain, through the REST API and the MCP server. This page collects what is specific to Tron: minimums and token contracts, addresses, deposits and refunds, vault swaps and pitfalls. For the general flow, start with Starting a Swap and View Available Assets.

Assets and minimums​

AssetidDecimalsMinimumNative minimumContract
TRXtrx.tron630 TRX30000000—
USDTusdt.tron610 USDT10000000TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t

Snapshot captured on 2026-11-17 from the production /assets endpoint. Minimums are Chainflip's current source (ingress) minimum deposit amounts; query /assets for live values. Destination-side egress minimums depend on fees and are not in /assets; see Error Codes for egress_below_minimum and egress_fee_not_covered. minimalAmountNative is in the asset's smallest unit (sun for TRX). Assets disabled upstream are omitted.

The Contract column is the TRC-20 token contract; check it before you send a token.

Addresses​

BaaS accepts a Tron address in base58check form: 34 characters starting with T, with version byte 0x41 and a 20-byte body. The hex form is rejected by BaaS, so always pass the T… address.

A destination address is checked with the destination asset's rules and a refund address with the source asset's, so a Tron refundAddress is required when the source asset is on Tron.

Deposits and refunds​

A /swap call opens a deposit channel and returns the address the user sends the source asset to.

  • Deposit channels close after 24 hours. Open a new channel for every deposit-channel swap and send the deposit immediately (Chainflip: closure of deposit channels).
  • minimumPrice and refundAddress are required.
  • retryDurationInBlocks is optional: omitted or negative, it is the 150-block (15-minute) default, and a value above Chainflip's current runtime limit is lowered to that limit. Use the quote's recommendedRetryDurationInBlocks.
  • If the minimum price or live price protection is not met within the retry window, the source asset is refunded to refundAddress. For DCA, only unexecuted chunks are refunded; executed chunks still pay out to the destination.

See Starting a Swap and Chainflip's Swapping Basics.

Chainflip's ingress table lists a 19-block safety margin for Tron deposits, about a minute. Show users the quote's estimatedDurationSeconds rather than a fixed number.

Vault swaps​

Chainflip recommends vault swaps on Tron. A Tron vault swap is a direct transfer with the swap parameters attached as a note: it needs no deposit channel and no token approval, and it is cheaper for the user because the protocol does not have to fetch the deposit, which removes the ingress fee. /tx-payload/tron takes sourceAmount (in the source asset's smallest unit), minimumPrice, refundAddress and retryDurationInBlocks, and returns:

  • to - the address to send the transaction to. Use it exactly as returned.
  • callData - 0x for a TRX source; the encoded token transfer for a TRC-20 source.
  • value - the TRX amount in sun, hex-encoded; 0x0 for a TRC-20 source.
  • note - the encoded swap parameters. Attach it to the transaction: it is what identifies the transfer to Chainflip.
  • sourceTokenAddress - only for a TRC-20 source: the token contract.

For a TRC-20 transfer, set an appropriate Tron transaction feeLimit; Chainflip's example uses 100000000 (100 TRX). This is a Tron transaction setting, not a BaaS parameter, and a TRX transfer does not need it.

See Chainflip's Tron Vault Swaps for the protocol details.

Boost is documented for Bitcoin deposits; see the Bitcoin page.

Known pitfalls​

  • Missing note. A vault transfer without the note is not recognised as a swap.
  • Fee limit. A TRC-20 transfer with too low a feeLimit runs out of energy and fails on chain.
  • Base58check only. Hex-encoded Tron addresses are rejected.
  • Do not rewrite to. Send to the returned to as given, for TRX and TRC-20 alike.