SUN.io Docs
SUN.ioSunPump
  • SUN.io Overview
    • Get Started(TRON)
      • Create a Wallet
      • TRON Network Token Standards
      • Connect Your Wallet to SUN.io
    • Risks
    • Whitepaper
    • Terms of Service
    • Privacy Policy
    • Announcement
  • GET START
    • Exchange
      • Token Swaps
        • How to authorize a token?
        • How to exchange tokens?
        • How to check my recent transaction history?
        • How to view 24h price trend of a pair ?
      • Stablecoin Pool
        • Stablecoin pool overview
        • How to swap stablecoins?
        • How to provide liquidity for a stablecoin pool?
        • How to withdraw liquidity from a stablecoin pool?
        • How to check the liquidity you have provided?
      • Smart Router
      • Trading Fee
        • Claim Fee Rewards
      • Liquidity Pool
        • How to create a trading pair?
        • How to add liquidity?
        • How to remove liquidity?
        • How to calculate the ratio of tokens to be added to/removed from the pool?
        • How to record a new token?
        • What's the initial price for creating a fund pool?
      • Token Lists
    • Mining Pool
      • Mining Rules of SUN.io
      • How to participate in liquidity mining?
      • How to earn liquidity mining rewards?
      • How to exit liquidity mining?
      • How to calculate the boost rate of LP mining pool?
      • How to lock SUN?
      • How to vote?
      • How to reset votes?
      • Intelligent Boost Mining Pool
        • How to participate in Fixed Staking?
        • How to stake more assets in Fixed Staking?
        • How to extend duration in Fixed Staking?
        • How to make an early withdrawal in Fixed Staking?
        • How to claim rewards in Fixed Staking?
      • Farm
      • Ended Farming Pools
    • SunPump
      • 🌞 How to Participate?
      • 🚀 How to Launch?
      • 💡 Token Details
      • 👤 Personal Profile
      • 🏦 Service Fees
      • How to Use DLive Streaming on SunPump
    • SunPump Referral
      • How to Join
      • Rules
      • FAQ
    • PSM
      • How to swap between USDD and other stablecoins at 1:1 ratio in PSM?
    • Tokenomics
      • SUN Tokenomics
        • Buyback & Burning of the SUN Token
      • veSUN
      • Airdrop
  • GOVERNANCE
    • SUN DAO Governance
    • Participating Governance
      • Proposal
        • SUN DAO Forum
        • How to get more votes?
        • Create Proposal
        • How to vote on the SUN DAO?
        • SUN DAO proposal
      • Governance Rights
        • Weight
        • veSUN
  • DEVELOPERS
    • Swap
      • StableSwap Overview
      • SunSwap Overview
      • SunSwap V3 Overview
      • Smart Router
        • Contract
        • Calculation Service
        • Exchange Functions
        • Detailed Development Steps
    • Mining
      • Smart Mining V1
      • Smart Mining V2
      • Governance Mining
    • Sunpump
      • Sunpump Contracts
    • Github
    • Contracts and ABIs
  • FAQ
    • How to use Sun.io in TronLink Mobile?
    • How is price determined?
    • What tokens are supported for swap?
    • Why does my exchange fail?
    • Detailed Explanation of SUN.io Platform Energy Subsidies
Powered by GitBook
On this page
  • Background
  • Mechanism
  1. DEVELOPERS
  2. Swap

Smart Router

A tool that provides better trading strategy

PreviousSunSwap V3 OverviewNextContract

Last updated 1 day ago

Background

Smart Router is a robust trading tool introduced by Sun.io that provides users with a top-notch trading experience by finding them the best prices. Users simply need to select the trading pair and enter the amount they want to trade, and the Smart Router will look for the optimal routing in all the trading pools(SunSwap、SunCurve and PSM) on Sun.io.

The smart router plays an important role in SUN.io:

  1. Executing trades at the best price: The Smart Router finds the best price for traders by choosing the optimal path to execute trades based on the price difference across markets. This means users get more favorable trade prices at execution to maximize returns.

  2. Enhancing liquidity: The Smart Router utilizes the liquidity of different markets to provide better depth and liquidity for traders. By executing trades across multiple liquidity pools, it reduces slippage and market shocks, thus offering an enhanced trading experience.

  3. Improving liquidity utilization: The Smart Router helps improve the utilization of liquidity. By channeling liquidity from highly liquid markets to less liquid ones, it helps improve the overall utilization of liquidity and enables the completion of more trades.

Mechanism

SUN.io's Smart Router algorithm service retrieves data from SunSwap V1, SunSwap V2, SunSwap V3, PSM, and SunCurve by utilizing the contract image built on the server. It sorts trade paths by the amount of the token users can obtain and displays the top three as options for users. The contract of the Smart Router is a nested contract through which the liquidity pools on SunSwap V1, SunSwap V2, SunSwap V3, PSM, and SunCurve can be called to complete trades.

Smart Router Architecture Diagram