Sunswap

Sunswap is managed through V3 NFT positions from funding to exit

Sunswap is a TRON liquidity workflow in which each V3 deposit becomes an NFT position tied to two tokens, one fee tier and a chosen price range. An LP funds that range, checks whether the current pool price keeps it active, adds capital without changing its boundaries and exits by removing liquidity and collecting both token balances. The NFT remains the ownership record throughout the position lifecycle.

A top-up keeps the original two range boundaries, so a new range requires a separate V3 position.

Funding the range and minting the position NFT

Funding a Sunswap V3 range mints one NFT that binds the deposit to fixed pool settings.

Start by connecting TronLink or TokenPocket to TRON, then open Earn, choose Liquidity Pools and select V3. Pick exactly two TRC-20 assets, such as WTRX and USDT, and select the existing pool that matches the intended fee tier. A new pool also needs an initial exchange rate. Set one lower boundary and one upper boundary, enter the token amount and review the automatically calculated second amount. The Provide action triggers any missing token approval before the wallet signs the mint transaction.

Use this five-point decision check before the wallet creates the position:

  • Both token contract addresses match the intended TRC-20 assets.
  • The fee tier matches the exact pool and its expected price movement.
  • The lower price sits below the upper price in the displayed quote direction.
  • The current price sits where the intended one-token or two-token deposit requires.
  • The wallet holds enough TRON Energy, Bandwidth or TRX to complete approval and mint calls.

Sunswap V3 supports four fixed pool fee tiers: 0.01%, 0.05%, 0.3% and 1%.

The contracts encode those tiers as 100, 500, 3000 and 10000 parts per million. Their usable tick spacings are 1, 10, 60 and 200 ticks in the same order, while every tick changes the price ratio by a factor of 1.0001. Narrower boundaries concentrate more liquidity around the current tick and require more frequent monitoring. Once the mint confirms, the NonfungiblePositionManager assigns one token ID and the wallet receives the TRC-721 position NFT. That token ID anchors later balance checks, top-ups and exits.

Reading the NFT balance and active range

The Sunswap position page shows the NFT balance, token mix and whether its range is active. One position ties together two token addresses, one fee tier, two boundary ticks and a liquidity value. The record exposes 12 fields, including token0, token1, tickLower, tickUpper, liquidity, tokensOwed0 and tokensOwed1. Compare the current price with both boundaries: inside means active, while either side means inactive. TronWeb integrators read slot0, where sqrtPriceX96 uses Q64.96 encoding and the current tick supplies the range test.

What happens when the price leaves the range?

A Sunswap V3 position becomes inactive and holds one token after price crosses either range boundary. Active liquidity stops serving swaps at that point, so it stops accruing new trading fees. Fees earned before the crossing remain attached to the NFT. If price later returns between the two ticks, the existing position becomes active again without a wallet transaction.

The three observable states are below range, inside range and above range. Below one boundary, the position converts toward one pool asset; above the other, it converts toward the opposite asset. Token0 and token1 follow contract-address ordering, so the interface’s quote direction decides which named token appears on each side. Reversing the displayed pair also reverses the human-readable boundary prices. A range owner should therefore read the current-price marker and both asset balances together. Creating a different range requires a second NFT with new lower and upper ticks.

Adding funds without changing the range

A Sunswap top-up increases liquidity inside the NFT’s existing range, pair and fee tier. The Add action changes principal size rather than position geometry.

Open My Positions, choose the relevant token ID and select Add. The page locks the two TRC-20 contracts, four-tier fee choice and two price boundaries from the original mint. Enter one amount; the interface calculates the second from the current pool price and range location. An in-range position normally needs both tokens, while an out-of-range position accepts the single asset that its current side requires. Confirm the displayed contribution before signing because price movement between quote and execution changes the final amount that the contract uses.

The increaseLiquidity call carries six fields: one token ID, two desired amounts, two minimum amounts and one deadline. Minimum amounts enforce the wallet’s chosen execution tolerance, while the deadline limits how long the signed call remains valid. A top-up also needs enough TRC-20 allowance for each token that the contract draws. Every state-changing call uses Bandwidth and Energy; insufficient resources cause TRX to cover the network cost. One TRX equals 1,000,000 sun, while uppercase SUN names a separate governance token.


Removing principal and collecting two token balances

A Sunswap exit removes principal first, then collects both tokens owed to the NFT. Choose a partial percentage to shrink the position or 100% to set its liquidity to zero.

At contract level, decreaseLiquidity accepts five fields: token ID, liquidity amount, two minimum token amounts and a deadline. The minimums protect the two-token withdrawal from an execution change between preview and inclusion. Removing liquidity leaves the range, fee tier and NFT record intact. A partial exit keeps the remaining liquidity active whenever price stays inside its original two bounds. The updated position page should show the smaller liquidity value and revised amounts after the TRON receipt reports successful execution.

Decreased principal and earned fees appear as two owed-token balances before collection transfers them to the recipient wallet. The collect call has four inputs: token ID, recipient and maximum amounts for token0 and token1. Fees never compound automatically into the V3 range; collecting sends them out, while compounding requires a separate top-up. The NFT can be burned only after liquidity equals 0 and both owed-token counters equal 0. This three-condition gate keeps the certificate until no value remains attached.

Read the wallet’s final TRC-20 balances, not only the removed-liquidity banner. WTRX represents TRX inside V3 contracts, so an exit from a WTRX pair returns WTRX unless the interface also unwraps it. TRON produces blocks on 3-second slots, while solidified finality requires at least 19 of 27 active Super Representatives to reach the transaction block height or move beyond it. For balance reconciliation, the solidified receipt closes the lifecycle.

The V3 lifecycle beside newer and older Sunswap pools

The Sunswap V3 NFT workflow remains distinct from V2 shares and V4 programmable positions. V3 launched June 28, 2023 and remains selectable on TRON. V2 represents a pool share with fungible LP tokens and spreads liquidity across the full curve. V3 assigns one non-fungible certificate per chosen range. V4, launched March 2, 2026, keeps concentrated liquidity while adding Hooks, Singleton architecture and native TRX alongside WTRX. V3 positions follow the same mint, monitor, increase, decrease and collect sequence.

Sunswap - common questions

Does transferring a Sunswap V3 NFT also transfer the liquidity position?

Yes, transferring the TRC-721 position NFT transfers control of the range and its liquidity to the recipient address. The new owner controls increase, decrease, collect and burn actions through the token ID. Fees remain attached to the position until collected. Wallet interfaces may need time to index the NFT, so the recipient should identify it by token ID and confirm ownership on TRON before managing the position.

How long does a Sunswap V3 position transaction take to settle on TRON?

A position transaction normally enters a block around the next 3-second TRON slot, while solidified finality typically arrives around 1 minute later. Inclusion shows that a Super Representative executed the contract call, but it does not establish irreversible state. That distinction matters during withdrawals. Solidification requires at least 19 of the 27 active Super Representatives to reach that height or move beyond it. Wallet interfaces and indexers add their own display delay, so use the execution receipt for status and the solidified receipt for final balance reconciliation.

Is another token approval needed before increasing an existing V3 position?

Another approval is required only when the existing TRC-20 allowance does not cover the amount that the top-up will use. The NFT identifies the position, but it does not grant the NonfungiblePositionManager permission to transfer new tokens. TronLink or TokenPocket presents an approval signature when allowance is insufficient, followed by the increase-liquidity signature. Energy and Bandwidth apply to each state-changing call, so two calls consume more resources than one.

Which TRON resources pay for Sunswap V3 position management?

TRON Bandwidth carries transaction data and Energy pays for smart-contract execution during mint, increase, decrease and collect actions. A wallet with sufficient allocated resources spends those resources; otherwise the network burns TRX under its resource-pricing rules. Contract Energy consumption and live network parameters at each call’s execution time set the exact TRX charge. One TRX contains 1,000,000 sun, which is the six-decimal base unit and differs from the uppercase SUN governance token. Resource balances differ between addresses and between successive transactions from one address.

Where do unused tokens go if the final funding ratio changes before execution?

Unused tokens remain in the wallet because the position manager draws only the amounts that the executed liquidity calculation requires. The two desired amounts set ceilings, while amount0Min and amount1Min set acceptable floors. If price movement pushes the required contribution outside those minimums, the transaction fails and transfers no liquidity. Request a fresh quote afterward. Check the execution receipt and wallet balances because the preview shows intended amounts rather than final contract amounts.

Must WTRX be unwrapped after closing a TRX-paired V3 position?

WTRX must be unwrapped only when the holder wants native TRX after the V3 exit. Sunswap V3 contracts represent TRX-side liquidity as the TRC-20 token WTRX, so contract-level collection returns WTRX. Some interface routes combine collection and unwrapping, while a direct NonfungiblePositionManager call does not. Compare the received token symbol and contract address before taking another action. WTRX uses 6 decimals like TRX, and 1 WTRX represents 1 TRX through the wrap and unwrap mechanism. That unwrap is a separate state change when no bundled route handles it.