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
  • Withdrawal Methods
  • Withdrawal Process Breakdown
  1. Getting Started
  2. Architecture
  3. Meesage Flows

Withdraw

PreviousSwapNextCross-Pool Operations

Last updated 4 months ago

TorchWithdrawFlow

Torch supports multiple withdrawal methods to accommodate different liquidity needs. Below is an overview of the available withdrawal modes, followed by a detailed breakdown of the withdrawal process.


Withdrawal Methods

  1. Withdraw All

    • Users withdraw all assets proportionally from the pool, receiving liquidity that reflects the asset ratio within the pool. This method does not incur any fees.

  2. Withdraw One

    • Users withdraw a specific asset from the pool. The fees for this method depend on the level of imbalance caused to the pool by the withdrawal.


Withdrawal Process Breakdown

  1. Transfer LP Tokens to LP Vault

    • Users transfer their LP tokens from the pool to the corresponding LP Vault.

  2. LP Vault Notifies Pool

    • After receiving the tokens, the LP Vault sends an op::withdraw_internal message to the Pool, notifying it of the withdrawal request and relevant details.

  3. Pool Calculates and Notifies Vault

    • The Pool processes the withdrawal logic, determines the amount of assets to withdraw, and sends an op::payout message to the Vault.

    • The Vault then transfers the assets to the user’s designated recipient address as instructed.

  4. Cross-Pool Withdrawal Operations

    • If the withdrawal involves cross-pool operations, the first Pool carries the withdrawal details and sends an op::withdraw_between message to the next Pool to continue the process.

A detailed explanation of cross-pool operations will be provided in the .

following sections