LineHub Docs
  • πŸ›οΈ Context
  • πŸͺ™ LineHub Overview
  • LineHub Products
    • πŸ“ˆ Spot & Perpetual Trading
      • Spot DEX
      • V2 DEX
      • V3 DEX
      • Perp Dex Aggregator
      • GMX-Like Perp DEX vs LineHub Perp DEX
    • πŸ”₯Seamless DeFi with AI Assistant
    • Automated Liquidity Management
    • Bridging Solution
    • Aggregation
    • On-chain Casino Games
    • Sports Betting
    • More
  • Tutorials
    • How to easily earn LXP-L on LineHub with AI feature?
    • How to use AI assistant
    • How to use Zap to add liquidity in LineHub DEX V3
  • 🏈 Team
  • πŸ›£οΈ Roadmap
  • πŸ“œ Smart Contract Overview
Powered by GitBook
On this page
  1. LineHub Products
  2. πŸ“ˆ Spot & Perpetual Trading

V2 DEX

A UniV2-style DEX is a type of platform that operates as an Automated Market Maker (AMM), enabling users to trade cryptocurrencies directly through liquidity pools without the need for intermediaries or traditional order books.

The liquidity pools dynamically adjust token prices based on the supply of liquidity and the demand for swapping tokens within each pool.

The underlying smart contract algorithm used in these pools follows the formula: a * b = k, where:

'a' represents the quantity of one token in the pool.

'b' represents the quantity of another token in the pool.

'k' is a constant value.

As the quantity of one token (a) increases, the quantity of the other token (b) decreases to maintain the constant product (k).

This mechanism ensures that the relative token prices within the pool automatically adjust based on the ratio of tokens present.

Users can have the opportunity to become market makers by providing liquidity to the existing pools.

Furthermore, UniV2-style DEXs offer flexibility for users to create their own custom pools or introduce new token pairs that are not currently available.

PreviousSpot DEXNextV3 DEX

Last updated 7 months ago