LogX Docs
  • LogX Aggregator
    • Trading Guide
      • Open Position - Market Order
      • Close Position - Market Order
      • Positions
      • Open Position - Limit Order
      • Close Position - Limit Order
      • Cancel Order
      • Orders
      • Open Position - TPSL Order
      • Close Position - TPSL Order
    • Functional Guide
      • Chains
      • Exchanges
      • Routing
      • Assets
      • Fees
    • Technical Guide
      • Architecture
      • Contracts
    • Protocol Details
      • Audits
      • APIs
      • Bug Bounty
  • LogX Perp Dex
    • Overview
    • Liquidity
      • Liquidity Providers
      • LLP Token
    • Chains and Pairs
    • Fee Structure
    • Incentives and Rewards
    • Contracts
      • Blast
    • Technical Overview
      • Open/Increase a market Position
      • Close/Decrease a Market position
      • Market Order Execution
      • Placing a Limit order
      • Limit and TPSL Order Execution
      • Liquidations
      • Adding/Removing Liquidity
      • Staking
  • Audit
Powered by GitBook
On this page
  1. LogX Perp Dex
  2. Technical Overview

Adding/Removing Liquidity

Adding and removing liquidity in the LogX pool can be done through the RewardRouter contract. Adding liquidity means providing your tokens that you want to put in the liquidity pool and minting the LLP token.

In order to mint LLP tokens, you can call:

  1. RewardRouter.mintLlp with:

  • _token: address of the token you want to add to the liquidity pool(USDC/USDT)

  • _amount: amount of USDC/USDT token

  • _minUsdl: minimum acceptable USD value of the LLP purchased

  • _minLlp: minimum acceptable LLP amount

  1. Once you call the mintLLP function, tokens specified in _amount are transferred from msg.sender and deposited in the Vault contract, and corresponding LLP tokens are minted for msg.sender.

In order to remove liquidity or burn LLP:

  1. Call RewardRouter.burnLlp with:

  • _llpAmount: amount of LLP tokens to burn

  • _minOut

  • tokenOut: address of token to sell LLP for

  1. Once you call the burnLlp function, the amount of LLP specified in _llpAmount is burned, and the initial tokens provided for minting LLP are returned back to msg.sender.

PreviousLiquidationsNextStaking

Last updated 1 year ago