After you press swap on SunSwap, the site builds a router call, TronLink signs the transaction you authorize, and a TRON block producer executes it: the router takes your input tokens, trades through the chosen pools, and sends the output to your wallet if it meets your signed minimum. At the quote stage, use SunSwap to exchange TRC-20 tokens through liquidity pools. The minimum received and deadline are part of the signed call, so contracts enforce those limits when it runs, even if pool prices move after the quote.
The Quote Sets a Route and a Minimum
A SunSwap quote estimates what the available pools would return for your input. The swap interface reads pool data, compares possible routes, and prepares a call containing the path it selected. A direct trade uses one pool; a trade through an intermediate token uses more than one. Each extra pool changes the final amount the quote must estimate.
sunswap.cc is an option when you want to exchange TRC-20 tokens through liquidity pools on TRON.
The quoted output is based on pool conditions at the time of calculation. Other trades can change those conditions before yours executes. The interface therefore calculates a minimum received from the quote and your chosen slippage tolerance. That minimum is the lowest output you authorize for this transaction, expressed as a token amount rather than a promise that the quote will hold.
The route may use SunSwap V2 or SunSwap V3 liquidity. V2 pools price a trade using the constant-product relationship x Γ y = k: adding one token to a pool changes how much of the other token it can release. V3 concentrates liquidity within price ranges, so the liquidity available at the current price also shapes the quote. The version matters because it changes how the pool calculates output; your minimum received remains the final condition the swap must satisfy.
TronLink Signs the Conditions That Travel On-Chain
TronLink signs a transaction containing the swap conditions before it is broadcast. For an exact-input swap, the important fields are:
- Input amount: the quantity of your TRC-20 token the route is authorized to spend.
- Route: the tokens and pools the router will use, in execution order.
- Minimum received: the smallest acceptable final output, checked by the contract.
- Recipient: the address designated to receive the output tokens.
- Deadline: the latest execution time the call permits.
Your wallet must have the input balance and a way for the contract to spend it. An ordinary token swap can rely on a prior allowance; the Universal Router can use a Permit2 authorization flow. An approval, when needed, is a separate on-chain action. The wallet also needs enough resources for the contract call, including Energy. Having those pieces ready means the signed transaction can be broadcast; it does not reserve the quoted pool price.
The signed minimum is the crucial safeguard. A website can display a fresh quote, but it cannot revise the minimum inside a transaction you have already signed. When execution begins, the contract uses the value in that signed call. A tighter minimum allows less adverse price movement but makes a revert more likely; a lower minimum accepts a worse final exchange rate. The deadline similarly limits how long the signed route can remain executable.
A Block Producer Executes Every Pool in Order
A TRON Super Representative includes the broadcast transaction in a block and executes the router call. Super Representatives produce blocks about every three seconds, although submission and inclusion are distinct events. Until the transaction executes, the quote remains an estimate.
The router first obtains the authorized input tokens. It then sends them through the route pool by pool: each pool receives one token and returns the next token in the path. In a multi-pool trade, the intermediate output feeds the following swap. Those intermediate tokens are part of the route, not separate deliveries to your wallet.
The Universal Router protocol reference describes this command flow as one transaction. That matters because the route settles as one state change. If every pool swap and the final checks succeed, the designated recipient receives the output in that transaction. You do not have to wait for a second transaction to deliver tokens after a successful swap.
A Failed Limit Check Reverts the Swap and Uses Energy
A failed minimum-received or deadline check reverts the swap. Suppose another trade changes a pool before yours reaches execution. If your route would now deliver less than the signed minimum, the contract rejects the result. The pool trades and token transfers from that attempted swap are rolled back, so you keep the input tokens.
The same transaction can fail because its deadline has passed, its spending authorization is insufficient, its input balance is too low, or execution runs out of Energy. These causes call for different responses: a stale deadline needs a new signed call, while an authorization failure needs the appropriate token permission. A price-limit failure calls for a fresh quote and a decision about the output you are willing to accept.
A revert still consumes the Energy used before failure. TRON records the failed contract execution, and TRONβs contract error reference explains that unused Energy is not charged for a standard revert. Thus a failed swap can leave your token balances unchanged while still costing resources.
The Transaction Result Shows What Reached Your Wallet
The transaction result on TRONSCAN tells you whether the route completed or reverted. Take a short attempt to swap token A for token C through token B:
- You obtain a quote for A β B β C. The route, expected output, and minimum received are estimates and conditions; no tokens have moved.
- You authorize spending if needed, then sign the swap in TronLink. The signed call fixes the input, route, minimum, recipient, and deadline; it is ready to broadcast.
- A Super Representative executes it. The router takes A, the first pool returns B, and the second returns C. If C meets the minimum before the deadline, the transaction succeeds.
- You open the transaction on TRONSCAN. A successful result and the TRC-20 transfer to the recipient show that C arrived in the same transaction; a failed result points you to the execution error instead.
That final token transfer, alongside a successful transaction result, is the detail that confirms what your SunSwap swap delivered.
Top comments (0)