July 29

How the Liquidity Pool (IU/USDT pool) on DeDust Works

Adding Liquidity

When you add liquidity to the pool on DeDust (for instance, the IU/USDT pool), you provide equal value amounts of IU tokens and USDT. Here’s a step-by-step breakdown of the process:

  1. Deposit Tokens: You deposit IU tokens and USDT into the pool. The amount of each token should be equal in value. For example, if the current price is 0.01 USDT per IU, depositing 10,000 IU would require depositing 100 USDT.
  2. Receive LP Tokens: In return for providing liquidity, you receive Liquidity Provider (LP) tokens, which represent your share in the liquidity pool. These tokens can be used to redeem your share of the pool plus any accrued fees.

Swap Transactions

When a user swaps tokens (e.g., swapping TON for IU), the pool facilitates this exchange. Here’s how it works:

  1. Swap Request: A user initiates a swap, for example, exchanging TON for IU.
  2. Pool Balances Adjust: The pool uses its reserves to fulfill the swap. The TON is added to the pool, and the corresponding amount of IU is removed from the pool based on the current price and the pool's algorithm.
  3. Fees: A small fee is taken from the transaction and distributed to liquidity providers as an incentive for providing liquidity.
  4. Update Prices: The pool's algorithm (typically based on the constant product formula) updates the price of the tokens in the pool after the swap, maintaining the balance between the two assets.

Asset Transfer

When you perform a swap on the DeDust platform:

  1. Swapping TON to IU:
    • You send TON to the liquidity pool.
    • The pool calculates the equivalent amount of IU based on the current pool ratio and transfers IU to your wallet.
    • The received TON stays in the pool, increasing its TON reserves.
  2. Asset Ownership:
    • The IU tokens you receive during a swap come from the pool's reserves.
    • The TON tokens you send to the pool become part of the pool’s liquidity, increasing the pool's TON balance.

Detailed Example

Let's say you want to swap 100 TON for IU tokens:

  1. Initiate Swap: You use the DeDust interface to swap 100 TON for IU.
  2. TON to Pool: Your 100 TON is sent to the liquidity pool.
  3. Calculate IU: Based on the pool's reserves and the current exchange rate, the pool calculates how much IU you will receive.
  4. Receive IU: The calculated amount of IU is transferred from the pool to your wallet.
  5. Fees: A small transaction fee is deducted and distributed among liquidity providers.

Conclusion

By adding liquidity to the pool, you facilitate these swaps and earn a share of the transaction fees. When you perform a swap, the assets (TON, IU, USDT, etc.) are exchanged within the pool based on the current market rates and pool reserves.

For more information, you can visit the following links:

These links will provide you with the latest information on the IU token and the liquidity pool on DeDust.