Torch DEX
WebsiteSwap
  • Overview
  • Terms of Use
  • Getting Started
    • Introduction
    • Challenges on TON
    • Solution for TON
    • Architecture
      • Concept
      • Core Components
        • Factory
        • Vault
        • Pool
        • LP Account
        • Oracle
      • Comparison
      • Interoperability
      • Meesage Flows
        • Deposit
        • Swap
        • Withdraw
        • Cross-Pool Operations
  • Developer Guide
    • DEX SDK Guide
      • Setup
      • Perform Swap
      • Deposit Liquidity
      • Withdraw Liquidity
      • How to send transaction
        • Mnemonic (Node JS)
        • TonConnect (React)
      • Deployments
  • USER Guide
    • Getting Started
  • Protocol
    • Audits
    • Tokenomics
  • Other
    • Brand Kit
    • Contacts
    • Achievements
  • FAQ
    • How to get Transaction hash by Message hash
    • React (Vite) - Buffer Issues
Powered by GitBook
On this page
  • Limitations of STON fi's Design
  • Torch Finance vs. DeDust
  • Key Differences Between Torch and DeDust
  • Summary
  1. Getting Started
  2. Architecture

Comparison

Among the decentralized exchanges (DEXes) on TON, STON fi and DeDust are the most prominent. This section highlights the differences between Torch Finance and these platforms.

PreviousOracleNextInteroperability

Last updated 4 months ago

Limitations of STON fi's Design

STON fi utilizes a Router contract architecture, where all assets are consolidated within a single Router contract.

  • Issue: During periods of network congestion, all transactions could get stuck within the Router contract, slowing down swaps.

This centralized asset management can easily become a bottleneck, negatively impacting user experience and transaction efficiency.

While STON fi's V2 contracts introduce cross-pool operations, they still primarily rely on a single Router.

  • Although multiple Router instances have been proposed, this could fragment liquidity, reducing overall trading efficiency.

Since Torch Finance shares a similar design framework with DeDust, we will focus on comparing the two.


Torch Finance vs. DeDust

Like Torch Finance, DeDust adopts a design where Vaults manage assets and Pools handle mathematical operations. However, Torch introduces several optimizations to offer more flexibility and cost-effective solutions.


Key Differences Between Torch and DeDust

  1. LP Vault and Preminting Mechanism

    • DeDust: Pools mint LP tokens for users only after assets are deposited.

    • Torch: Each Pool has a dedicated LP Vault, and LP tokens are preminted during deployment and stored in the LP Vault.

    • Reasoning:

      • Torch’s cross-pool operations primarily occur between Base Pools and Meta Pools.

      • Preminting LP tokens reduces gas fees during each interaction, increasing efficiency in cross-pool swaps.

      • If you want to fully understand the benefits of preminting, refer to the and .

  2. More Efficient LP Account Creation

    • DeDust:

      • When depositing assets, the Factory requires two transactions (tx) to create and notify the LP Account:

        1. The first transaction creates the LP Account.

        2. The second transaction notifies the LP Account of the user's deposit.

      • Drawback: Each deposit requires two transactions, increasing costs.

    • Torch:

      • Torch’s Factory completes LP Account creation and deposit notification in a single transaction, significantly reducing gas fees and enhancing user experience.

  3. Avoiding LP Account Address Collisions

    • DeDust: The calculation of LP Account addresses lacks a clear identifier (such as queryId), leading to:

      • When a user deposits assets consecutively, the second deposit may mix with the first, causing asset confusion.

    • Torch:

      • Torch incorporates a unique identifier (e.g., queryId) in LP Account address calculations, ensuring each deposit is handled separately, avoiding asset mix-ups.

  4. Flexible Deposits for Multi-Asset Liquidity

    • DeDust: In traditional models like Uniswap V2, liquidity providers must deposit an equal value of all asset pairs. For example, to provide liquidity for the USDC-USDT pool, users are required to deposit $1,000 USDC and an equivalent $1,000 worth of USDT simultaneously. This rigid requirement limits flexibility.

    • Torch: With Torch's Stable Swap model, users can deposit liquidity in any configuration. For example, a user can choose to provide $1,000 USDC alone (single-sided liquidity) or $500 USDC and $2,000 worth of USDT (multi-sided liquidity), depending on their preference. This flexibility simplifies liquidity provisioning, lowers barriers to entry, and accommodates users with varying asset allocations

  5. Flexible Withdrawal Options

    • DeDust: Liquidity can only be withdrawn proportionally across all assets (Withdraw All).

    • Torch: Torch offers two withdrawal modes:

      • Withdraw All: Proportionally withdraws all assets in the pool.

      • Withdraw One Mode: Withdraws only one specific asset from the pool, catering to users who need a particular asset, increasing flexibility.


Summary

Torch Finance's contract design carefully addresses gas fees, asset management efficiency, and liquidity flexibility, introducing several innovative features to address the shortcomings of DeDust and STON fi. These improvements make Torch more competitive when handling large-scale liquidity and multi-asset deposits, providing users with a smoother and more cost-effective trading experience.

Deposit
Cross-Pool sections