SunSwap calculates the amount you receive by taking the pool fee from your input, then pricing the remainder against the pool’s token reserves. An automated market maker has no order book: the reserves set the starting rate, and your trade moves that rate as it uses liquidity.
SunSwap swaps TRC-20 tokens through liquidity pools on TRON. The SunSwap exchange gives you a pool-based output to compare with the amount you expected.
How SunSwap V2 prices 1,000 USDT for TRX
SunSwap V2 uses a constant-product pool, expressed as x × y = k. An exact-input calculation has four parts:
-
ReserveIn: USDT already in the pool.
-
ReserveOut: TRX-equivalent liquidity on the other side.
-
NetIn: your input after the pool fee.
-
AmountOut: the output released by the curve.
The fee reduces the input used for pricing. AmountOut = ReserveOut × NetIn ÷ (ReserveIn + NetIn), where NetIn = amountIn × (1 − fee). The full input enters the pool, but its fee portion buys no output on the curve. As the pool releases TRX, each further unit becomes more expensive.
Take an illustrative pool with 100,000 USDT and 500,000 TRX-equivalent, charging the V2 fee of 0.3%. Its starting spot rate is 5 TRX per USDT. A 1,000 USDT swap pays a 3 USDT fee, leaving 997 USDT for pricing. The calculation is 500,000 × 997 ÷ 100,997, giving about 4,935.79 TRX. Multiplying 1,000 by the starting spot rate suggests 5,000 TRX; that rate cannot apply to every unit of a trade that changes the reserves.
Before this illustrative swap, the pool holds 100,000 USDT and 500,000 TRX-equivalent. Afterward, it holds 101,000 USDT and about 495,064.21 TRX-equivalent. The assets and pricing rule stay the same; the balances and spot rate change. The full 1,000 USDT enters the reserve even though 997 USDT determined the output.
Put 2,000 USDT against those same starting reserves. After its 6 USDT fee, output is about 9,775.08 TRX. The shortfall from starting spot output grows from 64.21 to 224.92 TRX, more than doubling. Measured as a percentage of fee-adjusted spot output, curve impact rises from about 0.99% to 1.96%, slightly less than twice as much. Absolute shortfall and percentage impact describe different effects.
The Uniswap V2 Core whitepaper derives the fee-on-input constant-product rule used in this V2-style calculation. Its result applies to one constant-product pool; a V3 range or a route across pools needs further calculations.
Why a route through TRX changes the output
A route through TRX applies a fee and a price curve at each pool. The first pool’s output becomes the next pool’s input, so an intermediate amount is never the final amount.
Continue the illustrative case. The first pool yields 4,935.79 TRX. Say a second V2-style pool holds 500,000 TRX-equivalent and 100,000 units of another TRC-20 token, with a 0.3% fee. About 14.81 TRX is deducted for pricing, leaving 4,920.98 TRX to produce about 974.60 units of the final token. The route pays one pool fee in USDT and another in TRX, and both trades move their own pool’s price.
Universal Router can chain pools or split a trade among paths. Splitting reduces the amount pressing on any one pool, but every used hop still applies its fee and curve. Compare final-token outputs: fewer hops alone cannot settle the choice when reserves differ. SunSwap V3 concentrates liquidity near a price, which can reduce impact while that liquidity is active; crossing a range edge changes the available liquidity. The SUN.io trading-fee documentation gives V2’s fee and V3’s per-pool fee tiers.
Your output depends on the reserves, fee and trade size at every pool in the route. Because each hop uses liquidity, a starting spot rate cannot predict the final amount; compare the quote’s output, price impact and minimum received for the whole route.
Related questions
What does price impact mean on SunSwap?
Price impact is the effect your own trade has on a pool’s exchange rate. In the illustrative swap, removing TRX makes later units cost more USDT, lowering the average output below the starting spot rate. The pool fee is separate: it reduces the input used on that curve.
Why does the received amount differ from the quote?
The received amount can change when other trades alter reserves between quote and execution. The quote already includes your trade’s expected price impact; slippage describes a subsequent change in pool conditions.
What does minimum received mean on SunSwap?
Minimum received is the lowest output accepted under your slippage tolerance. For an illustrative 4,935.79 TRX quote and 0.5% tolerance, it is about 4,911.11 TRX. The swap reverts if execution would deliver less; the minimum is a floor, not the predicted output.
Questions to ask next
How can you reduce price impact on a large SunSwap trade?
Compare deeper pools and routes that divide the trade among available liquidity. A trade that is smaller relative to active reserves moves the price less. Judge any split by its combined final output after every pool fee.
Which SunSwap V3 fee tier should you pick for a pair?
Compare quoted output and active liquidity at your trade size. A lower fee can yield less than a higher-fee pool with deeper liquidity, particularly when the trade crosses a concentrated-liquidity range edge. Choose by the full route’s output after fees and impact.